NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkCorrectGMUsingPVMapFilter.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef itkCorrectGMUsingPVMapFilter_h
16 #define itkCorrectGMUsingPVMapFilter_h
17 
18 #include <itkImage.h>
20 
21 
22 namespace itk
23 {
51 template <class TImageType>
52 class ITK_EXPORT CorrectGMUsingPVMapFilter :
53  public BaseCTESegmentationFilter< TImageType >
54 {
55 public:
59  typedef SmartPointer<Self> Pointer;
60  typedef SmartPointer<const Self> ConstPointer;
61 
63  itkNewMacro(Self);
64 
66  itkTypeMacro(CorrectGMUsingPVMap, BaseCTESegmentationFilter);
67 
69  typedef typename Superclass::InputImageType InputImageType;
72  typedef typename Superclass::InputImagePointer InputImagePointer;
73  typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
74  typedef typename Superclass::OutputPixelType OutputPixelType;
75  typedef typename Superclass::OutputImageType OutputImageType;
76  typedef typename Superclass::OutputImagePointer OutputImagePointer;
77  typedef typename Superclass::OutputImageConstPointer OutputImageConstPointer;
78 
80  void SetSegmentedImage(const InputImageType *image) {this->SetNthInput(0, const_cast<InputImageType *>(image)); }
81 
83  void SetGMPVMap(const InputImageType *image) {this->SetNthInput(1, const_cast<InputImageType *>(image)); }
84 
86  const std::vector<InputIndexType>& GetListOfGreyMatterPixelsBeforeCorrection() const;
87 
89  const std::vector<InputIndexType>& GetListOfGreyMatterPixelsAfterCorrection() const;
90 
92  itkSetMacro(GreyMatterThreshold, double);
93  itkGetMacro(GreyMatterThreshold, double);
94 
96  itkSetMacro(DoGreyMatterCheck, bool);
97  itkGetMacro(DoGreyMatterCheck, bool);
98 
100  itkSetMacro(DoCSFCheck, bool);
101  itkGetMacro(DoCSFCheck, bool);
102 
103 protected:
104 
107 
109  virtual void PrintSelf(std::ostream&, Indent) const;
110 
111  /* The main filter method. Note, single threaded. */
112  virtual void GenerateData();
113 
114 private:
115 
116  CorrectGMUsingPVMapFilter(const Self&); // purposely not implemented
117  void operator=(const Self&); // purposely not implemented
118 
119  std::vector<InputIndexType> m_ListOfGreyMatterVoxelsBeforeCorrection;
120 
121  std::vector<InputIndexType> m_ListOfGreyMatterVoxelsAfterCorrection;
122 
123  bool m_DoGreyMatterCheck;
124 
125  bool m_DoCSFCheck;
126 
127  double m_GreyMatterThreshold;
128 
129 };
130 
131 } // end namespace itk
132 
133 #ifndef ITK_MANUAL_INSTANTIATION
134 #include "itkCorrectGMUsingPVMapFilter.txx"
135 #endif
136 
137 #endif
Superclass::InputImageType InputImageType
Definition: itkCorrectGMUsingPVMapFilter.h:66
Superclass::OutputImageType OutputImageType
Definition: itkCorrectGMUsingPVMapFilter.h:75
Superclass::InputIndexType InputIndexType
Definition: itkCorrectGMUsingPVMapFilter.h:71
SmartPointer< const Self > ConstPointer
Definition: itkCorrectGMUsingPVMapFilter.h:60
Superclass::InputPixelType InputPixelType
Definition: itkCorrectGMUsingPVMapFilter.h:70
BaseCTESegmentationFilter< TImageType > Superclass
Definition: itkCorrectGMUsingPVMapFilter.h:58
void SetSegmentedImage(const InputImageType *image)
Definition: itkCorrectGMUsingPVMapFilter.h:80
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: glew.h:4052
Implements section 2.3.1 Correction Of Segmentation in Bourgeat MICCAI 2008.
Definition: itkCorrectGMUsingPVMapFilter.h:52
Superclass::OutputPixelType OutputPixelType
Definition: itkCorrectGMUsingPVMapFilter.h:74
Superclass::OutputImagePointer OutputImagePointer
Definition: itkCorrectGMUsingPVMapFilter.h:76
Definition: niftkITKAffineResampleImage.cxx:74
float InputPixelType
Definition: niftkCTEPrepareVolumes.cxx:33
Superclass::InputImageConstPointer InputImageConstPointer
Definition: itkCorrectGMUsingPVMapFilter.h:73
Superclass::OutputImageConstPointer OutputImageConstPointer
Definition: itkCorrectGMUsingPVMapFilter.h:77
void SetGMPVMap(const InputImageType *image)
Definition: itkCorrectGMUsingPVMapFilter.h:83
Base class for classes that manipulate the segmented volume before it gets to the Cortical Thickness ...
Definition: itkBaseCTESegmentationFilter.h:41
SmartPointer< Self > Pointer
Definition: itkCorrectGMUsingPVMapFilter.h:59
Superclass::InputIndexType InputIndexType
Definition: itkBaseCTESegmentationFilter.h:57
virtual ~CorrectGMUsingPVMapFilter()
Definition: itkCorrectGMUsingPVMapFilter.h:106
Superclass::InputImagePointer InputImagePointer
Definition: itkCorrectGMUsingPVMapFilter.h:72
CorrectGMUsingPVMapFilter Self
Definition: itkCorrectGMUsingPVMapFilter.h:57