00001 #ifndef RXTHRESHOLDBASEDONCONFIGREGISTERALGORITHM_H
00002 #define RXTHRESHOLDBASEDONCONFIGREGISTERALGORITHM_H
00003
00004 #include "AnalysisAlgorithm.h"
00005
00006 namespace SctAnalysis {
00010 class RxThresholdBasedOnConfigRegisterAlgorithm : public AnalysisAlgorithm {
00011 public:
00012
00013 typedef enum {undecided,white,black,blackAndWhite,meaningfulData,coloured} Category;
00014 public:
00015 static std::string categoryToString(const Category & category) {
00016 return
00017 category==undecided ? "undecided" :
00018 category==white ? "white" :
00019 category==black ? "black" :
00020 category==blackAndWhite ? "blackAndWhite" :
00021 category==meaningfulData ? "meaningfulData" :
00022 category==coloured ? "coloured" :
00023 "couldNotFigureCategoryOut";
00024 };
00025 public:
00026 virtual bool canAnalyze() const;
00027 virtual void analyze();
00028 virtual void loadData();
00029 virtual shared_ptr<SctData::TestResult> createTestResult() const;
00030 virtual boost::shared_ptr<AnalysisAlgorithm> clone(shared_ptr<const TestData> testData, const string& moduleName) const throw();
00034 RxThresholdBasedOnConfigRegisterAlgorithm(shared_ptr<const TestData> testData, const string& moduleName, const AnalysisAlgorithm& alg) throw();
00038 virtual ~RxThresholdBasedOnConfigRegisterAlgorithm() throw() {}
00039
00040
00041 void setFraction(float fraction) {m_fraction=fraction;}
00042
00043 float getFraction() const {return m_fraction;}
00044 private:
00045
00046
00047
00048
00049
00050
00051
00052
00053 bool canRead(const std::vector<char> & wanted,
00054 const std::vector<bool> & have,
00055 std::vector<bool>::const_iterator & pos,
00056 const bool showDebug = false);
00057 private:
00058 float m_fraction;
00059 RxThresholdBasedOnConfigRegisterAlgorithm() {}
00060 static bool inMap;
00061 };
00062 }
00063
00064 #endif //RXTHRESHOLDBASEDONCONFIGREGISTERALGORITHM_H