ClassFlowDigit.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #pragma once
  2. #include "ClassFlowImage.h"
  3. #include "ClassFlowAlignment.h"
  4. #include "Helper.h"
  5. #include <string>
  6. struct roi {
  7. int posx, posy, deltax, deltay;
  8. int resultklasse;
  9. string name;
  10. CImageBasis *image, *image_org;
  11. roi* next;
  12. };
  13. struct digit {
  14. string name;
  15. std::vector<roi*> ROI;
  16. };
  17. class ClassFlowDigit :
  18. public ClassFlowImage
  19. {
  20. protected:
  21. // std::vector<roi*> ROI;
  22. std::vector<digit*> DIGIT;
  23. string cnnmodelfile;
  24. int modelxsize, modelysize;
  25. bool SaveAllFiles;
  26. string NameDigit;
  27. int DecimalShift;
  28. bool DecimalShiftEnabled;
  29. bool isLogImageSelect;
  30. string LogImageSelect;
  31. ClassFlowAlignment* flowpostalignment;
  32. bool doNeuralNetwork(string time);
  33. bool doAlignAndCut(string time);
  34. void SetInitialParameter(void);
  35. public:
  36. ClassFlowDigit();
  37. ClassFlowDigit(std::vector<ClassFlow*>* lfc);
  38. ClassFlowDigit(std::vector<ClassFlow*>* lfc, ClassFlow *_prev);
  39. bool ReadParameter(FILE* pfile, string& aktparamgraph);
  40. bool doFlow(string time);
  41. string getHTMLSingleStep(string host);
  42. string getReadout(int _digit);
  43. std::vector<HTMLInfo*> GetHTMLInfo();
  44. int getAnzahlDIGIT();
  45. digit* GetDIGIT(int _digit);
  46. digit* GetDIGIT(string _name, bool _create);
  47. digit* FindDIGIT(string _name_number);
  48. string getNameDIGIT(int _digit);
  49. void UpdateNameNumbers(std::vector<std::string> *_name_numbers);
  50. void DrawROI(CImageBasis *_zw);
  51. string name(){return "ClassFlowDigit";};
  52. };