ClassFlowCNNGeneral.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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, bool ContinuousLastDigit = false);
  31. int PointerEvalHybridNew(float zahl, float number_of_predecessors, int eval_predecessors, bool Analog_Predecessors = false, float AnalogToDigitTransitionStart=9.2, bool ContinuousLastDigit = false);
  32. bool doNeuralNetwork(string time);
  33. bool doAlignAndCut(string time);
  34. bool getNetworkParameter();
  35. public:
  36. ClassFlowCNNGeneral(ClassFlowAlignment *_flowalign, t_CNNType _cnntype = AutoDetect);
  37. ~ClassFlowCNNGeneral() override;
  38. bool ReadParameter(FILE* pfile, string& aktparamgraph);
  39. bool doFlow(string time);
  40. string getHTMLSingleStep(string host);
  41. string getReadout(int _analog, bool _extendedResolution = false, int prev = -1, float _before_narrow_Analog = -1, float AnalogToDigitTransitionStart=9.2, bool ContinuousLastDigit = false);
  42. string getReadoutRawString(int _analog);
  43. void DrawROI(CImageBasis *_zw);
  44. std::vector<HTMLInfo*> GetHTMLInfo();
  45. int getNumberGENERAL();
  46. general* GetGENERAL(int _analog);
  47. general* GetGENERAL(string _name, bool _create);
  48. general* FindGENERAL(string _name_number);
  49. string getNameGENERAL(int _analog);
  50. bool isExtendedResolution(int _number = 0);
  51. void UpdateNameNumbers(std::vector<std::string> *_name_numbers);
  52. t_CNNType getCNNType(){return CNNType;};
  53. string name(){return "ClassFlowCNNGeneral";};
  54. };
  55. #endif