ClassFlowCNNGeneral.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #pragma once
  2. #ifndef CLASSFLOWCNNGENERAL_H
  3. #define CLASSFLOWCNNGENERAL_H
  4. #include"ClassFlowDefineTypes.h"
  5. #include "ClassFlowAlignment.h"
  6. enum t_CNNType {
  7. AutoDetect,
  8. Analogue,
  9. Analogue100,
  10. Digit,
  11. DigitHyprid10,
  12. DoubleHyprid10,
  13. Digit100,
  14. None
  15. };
  16. class ClassFlowCNNGeneral :
  17. public ClassFlowImage
  18. {
  19. protected:
  20. t_CNNType CNNType;
  21. std::vector<general*> GENERAL;
  22. float CNNGoodThreshold;
  23. string cnnmodelfile;
  24. int modelxsize, modelysize, modelchannel;
  25. bool isLogImageSelect;
  26. string LogImageSelect;
  27. ClassFlowAlignment* flowpostalignment;
  28. bool SaveAllFiles;
  29. int PointerEvalAnalogNew(float zahl, int numeral_preceder);
  30. int PointerEvalAnalogToDigitNew(float zahl, float numeral_preceder, int eval_predecessors, float AnalogToDigitTransitionStart);
  31. int PointerEvalHybridNew(float zahl, float number_of_predecessors, int eval_predecessors, bool Analog_Predecessors = false, float AnalogToDigitTransitionStart=9.2);
  32. bool doNeuralNetwork(string time);
  33. bool doAlignAndCut(string time);
  34. bool getNetworkParameter();
  35. public:
  36. ClassFlowCNNGeneral(ClassFlowAlignment *_flowalign, t_CNNType _cnntype = AutoDetect);
  37. bool ReadParameter(FILE* pfile, string& aktparamgraph);
  38. bool doFlow(string time);
  39. string getHTMLSingleStep(string host);
  40. string getReadout(int _analog, bool _extendedResolution = false, int prev = -1, float _before_narrow_Analog = -1, float AnalogToDigitTransitionStart=9.2);
  41. string getReadoutRawString(int _analog);
  42. void DrawROI(CImageBasis *_zw);
  43. std::vector<HTMLInfo*> GetHTMLInfo();
  44. int getNumberGENERAL();
  45. general* GetGENERAL(int _analog);
  46. general* GetGENERAL(string _name, bool _create);
  47. general* FindGENERAL(string _name_number);
  48. string getNameGENERAL(int _analog);
  49. bool isExtendedResolution(int _number = 0);
  50. void UpdateNameNumbers(std::vector<std::string> *_name_numbers);
  51. t_CNNType getCNNType(){return CNNType;};
  52. string name(){return "ClassFlowCNNGeneral";};
  53. };
  54. #endif