ClassFlowDigit.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. ClassFlowAlignment* flowpostalignment;
  30. bool doNeuralNetwork(string time);
  31. bool doAlignAndCut(string time);
  32. void SetInitialParameter(void);
  33. public:
  34. ClassFlowDigit();
  35. ClassFlowDigit(std::vector<ClassFlow*>* lfc);
  36. ClassFlowDigit(std::vector<ClassFlow*>* lfc, ClassFlow *_prev);
  37. bool ReadParameter(FILE* pfile, string& aktparamgraph);
  38. bool doFlow(string time);
  39. string getHTMLSingleStep(string host);
  40. string getReadout(int _digit);
  41. std::vector<HTMLInfo*> GetHTMLInfo();
  42. int getAnzahlDIGIT();
  43. digit* GetDIGIT(int _digit);
  44. digit* GetDIGIT(string _name, bool _create);
  45. digit* FindDIGIT(string _name_number);
  46. string getNameDIGIT(int _digit);
  47. void UpdateNameNumbers(std::vector<std::string> *_name_numbers);
  48. void DrawROI(CImageBasis *_zw);
  49. string name(){return "ClassFlowDigit";};
  50. };