ClassFlowCNNGeneral.h 2.4 KB

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