ClassFlowCNNGeneral.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. Digital,
  11. DigitalHyprid10,
  12. DoubleHyprid10,
  13. Digital100,
  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. std::string cnn_name = "ClassFlowCNNGeneral";
  24. //moved to define.h
  25. //float Analog_error = 3.0;
  26. //float AnalogToDigtalFehler = 0.8;
  27. //float Digital_Uncertainty = 0.2;
  28. //int DigitalBand = 3;
  29. //float Digital_Transition_Range_Predecessor = 2;
  30. //float Digital_Transition_Area_Predecessor = 0.7; // 9.3 - 0.7
  31. //float Digital_Transition_Area_Forward = 9.7; // Pre-run zero crossing only happens from approx. 9.7 onwards
  32. string cnnmodelfile;
  33. int modelxsize, modelysize, modelchannel;
  34. bool isLogImageSelect;
  35. string LogImageSelect;
  36. ClassFlowAlignment* flowpostalignment;
  37. bool SaveAllFiles;
  38. int PointerEvalAnalogNew(float zahl, int numeral_preceder);
  39. int PointerEvalAnalogToDigitNew(float zahl, float numeral_preceder, int eval_predecessors, float analogDigitalTransitionStart);
  40. int PointerEvalHybridNew(float zahl, float number_of_predecessors, int eval_predecessors, bool Analog_Predecessors = false, float analogDigitalTransitionStart=9.2);
  41. bool doNeuralNetwork(string time);
  42. bool doAlignAndCut(string time);
  43. bool getNetworkParameter();
  44. public:
  45. ClassFlowCNNGeneral(ClassFlowAlignment *_flowalign, t_CNNType _cnntype = AutoDetect);
  46. ClassFlowCNNGeneral(ClassFlowAlignment *_flowalign, std::string _cnn_name);
  47. bool ReadParameter(FILE* pfile, string& aktparamgraph);
  48. bool doFlow(string time);
  49. string getHTMLSingleStep(string host);
  50. string getReadout(int _analog, bool _extendedResolution = false, int prev = -1, float _before_narrow_Analog = -1, float analogDigitalTransitionStart=9.2);
  51. string getReadoutRawString(int _analog);
  52. void DrawROI(CImageBasis *_zw);
  53. std::vector<HTMLInfo*> GetHTMLInfo();
  54. int getNumberGENERAL();
  55. general* GetGENERAL(int _analog);
  56. general* GetGENERAL(string _name, bool _create);
  57. general* FindGENERAL(string _name_number);
  58. string getNameGENERAL(int _analog);
  59. bool isExtendedResolution(int _number = 0);
  60. void UpdateNameNumbers(std::vector<std::string> *_name_numbers);
  61. t_CNNType getCNNType(){return CNNType;};
  62. string name(){return "ClassFlowCNNGeneral " + cnn_name;};
  63. };
  64. #endif