ANIMA  4.0
animaLowMemNLMeansPatientToGroupComparisonBridge.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace anima
7 {
8 
10 {
11 public:
15 
19  typedef itk::Image <unsigned char,3> MaskImageType;
20 
23 
24  void SetComputationMask(std::string &cMask);
25 
26  void SetDatabaseNames(std::string &fileList)
27  {
28  m_DatabaseImages->SetFileNames(fileList);
29  }
30 
31  void SetTestFileName(std::string &fileName)
32  {
33  m_TestImage->SetUniqueFileName(fileName);
34  }
35 
36  std::string GetNameOfClass() {return "LowMemoryNLMeansPatientToGroupComparisonBridge";}
37 
38  void SetDatabaseCovarianceDistanceAverageFileName(std::string &fileName) {m_DatabaseCovarianceDistanceAverage->SetUniqueFileName(fileName);}
39  void SetDatabaseCovarianceDistanceStdFileName(std::string &fileName) {m_DatabaseCovarianceDistanceStd->SetUniqueFileName(fileName);}
40  void SetDatabaseMeanDistanceAverageFileName(std::string &fileName) {m_DatabaseMeanDistanceAverage->SetUniqueFileName(fileName);}
41  void SetDatabaseMeanDistanceStdFileName(std::string &fileName) {m_DatabaseMeanDistanceStd->SetUniqueFileName(fileName);}
42 
43  void SetOutputScoreName(std::string &pref) {m_OutputScoreName = pref;}
44  void SetOutputPValName(std::string &pref) {m_OutputPValName = pref;}
45  void SetOutputNPatchesName(std::string &pref) {m_OutputNPatchesName = pref;}
46 
47  void SetNbSplits(unsigned int nbSplits) {m_NbSplits = nbSplits;}
48  void SetNumberOfWorkUnits(unsigned int nbT) {m_NumThreads = nbT;}
49 
50  void SetWeightThreshold(double weight) {m_WeightThreshold = weight;}
51  void SetMeanThreshold(double weight) {m_MeanThreshold = weight;}
52  void SetVarianceThreshold(double weight) {m_VarianceThreshold = weight;}
53 
54  void SetBetaParameter(double beta) {m_BetaParameter = beta;}
55 
56  void SetPatchHalfSize(unsigned int patchHalf) {m_PatchHalfSize = patchHalf;}
57  void SetSearchStepSize(unsigned int searchStep) {m_SearchStepSize = searchStep;}
58  void SetSearchNeighborhood(unsigned int searchNeigh) {m_SearchNeighborhood = searchNeigh;}
59 
60  void Update(int specificSplitToDo = -1, bool genOutputDescriptionData = false);
61  void BuildAndWrite(OutputImageType *tmpIm, std::string resName, OutputImageType::RegionType finalROI);
62 
63 private:
64  void PrepareNoiseEstimates();
65 
66  std::string m_OutputScoreName;
67  std::string m_OutputPValName;
68  std::string m_OutputNPatchesName;
69 
70  unsigned int m_NbSplits;
71  unsigned int m_NumThreads;
72 
73  double m_WeightThreshold, m_MeanThreshold, m_VarianceThreshold;
74  double m_BetaParameter;
75 
76  unsigned int m_PatchHalfSize;
77  unsigned int m_SearchStepSize;
78  unsigned int m_SearchNeighborhood;
79 
80  ImageSplitterType *m_DatabaseImages, *m_TestImage;
81 
82  ScalarImageSplitterType *m_DatabaseCovarianceDistanceAverage, *m_DatabaseCovarianceDistanceStd;
83  ScalarImageSplitterType *m_DatabaseMeanDistanceAverage, *m_DatabaseMeanDistanceStd;
84 
85  MaskImageType::Pointer m_ComputationMask;
86 };
87 
88 } // end namespace anima
void SetUniqueFileName(std::string &inputFileName)
NLMeansPatientToGroupComparisonImageFilter< double >::OutputImageType OutputImageType
void SetFileNames(std::string &inputFileList)
void BuildAndWrite(OutputImageType *tmpIm, std::string resName, OutputImageType::RegionType finalROI)
void Update(int specificSplitToDo=-1, bool genOutputDescriptionData=false)
anima::NLMeansPatientToGroupComparisonImageFilter< double > MainFilterType
NLMeansPatientToGroupComparisonImageFilter< double >::OutputImageRegionType OutputImageRegionType
NLMeansPatientToGroupComparisonImageFilter< double >::InputImageType InputImageType