NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkCorrectGMUsingNeighbourhoodFilter.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 itkCorrectGMUsingNeighbourhoodFilter_h
16 #define itkCorrectGMUsingNeighbourhoodFilter_h
17 
18 #include <itkImage.h>
20 
21 namespace itk
22 {
44 template <class TImageType>
46  public BaseCTESegmentationFilter< TImageType >
47 {
48 public:
52  typedef SmartPointer<Self> Pointer;
53  typedef SmartPointer<const Self> ConstPointer;
54 
56  itkNewMacro(Self);
57 
60 
62  typedef typename Superclass::InputImageType InputImageType;
65  typedef typename Superclass::InputImagePointer InputImagePointer;
66  typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
67  typedef typename Superclass::OutputPixelType OutputPixelType;
68  typedef typename Superclass::OutputImageType OutputImageType;
72  typedef typename Superclass::OutputImagePointer OutputImagePointer;
73  typedef typename Superclass::OutputImageConstPointer OutputImageConstPointer;
74 
76  void SetSegmentedImage(const InputImageType *image) {this->SetNthInput(0, const_cast<InputImageType *>(image)); }
77 
79  const std::vector<InputIndexType>& GetListOfGreyMatterPixelsBeforeCorrection() const;
80 
82  const std::vector<InputIndexType>& GetListOfGreyMatterPixelsAfterCorrection() const;
83 
85  itkGetMacro(NumberReclassified, unsigned long int);
86 
88  itkSetMacro(UseFullNeighbourHood, bool);
89  itkGetMacro(UseFullNeighbourHood, bool);
90 
91 protected:
92 
95 
97  virtual void PrintSelf(std::ostream&, Indent) const;
98 
99  /* The main filter method. Note, single threaded. */
100  virtual void GenerateData();
101 
102 private:
103 
104  CorrectGMUsingNeighbourhoodFilter(const Self&); // purposely not implemented
105  void operator=(const Self&); // purposely not implemented
106 
107  std::vector<InputIndexType> m_ListOfGreyMatterVoxelsBeforeCorrection;
108 
109  std::vector<InputIndexType> m_ListOfGreyMatterVoxelsAfterCorrection;
110 
111  bool m_UseFullNeighbourHood;
112 
113  unsigned long int m_NumberReclassified;
114 };
115 
116 } // end namespace itk
117 
118 #ifndef ITK_MANUAL_INSTANTIATION
119 #include "itkCorrectGMUsingNeighbourhoodFilter.txx"
120 #endif
121 
122 #endif
Superclass::InputImagePointer InputImagePointer
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:65
OutputImageType::IndexType OutputImageIndexType
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:70
ImageType::SizeType SizeType
Definition: niftkMakeLapUSProbeBasicModel.cxx:31
Implements section 2.3 in Acosta et al. doi:10.1016/j.media.2009.07.003.
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:45
SmartPointer< const Self > ConstPointer
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:53
void SetSegmentedImage(const InputImageType *image)
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:76
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: glew.h:4052
Definition: niftkITKAffineResampleImage.cxx:74
Superclass::OutputImageType OutputImageType
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:68
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
Superclass::OutputPixelType OutputPixelType
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:67
float InputPixelType
Definition: niftkCTEPrepareVolumes.cxx:33
OutputImageType::SizeType OutputImageSizeType
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:71
Superclass::OutputImageConstPointer OutputImageConstPointer
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:73
Base class for classes that manipulate the segmented volume before it gets to the Cortical Thickness ...
Definition: itkBaseCTESegmentationFilter.h:41
SmartPointer< Self > Pointer
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:52
CorrectGMUsingNeighbourhoodFilter Self
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:50
ImageType::RegionType RegionType
Definition: niftkMakeLapUSProbeBasicModel.cxx:30
Superclass::InputImageConstPointer InputImageConstPointer
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:66
Superclass::InputIndexType InputIndexType
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:64
BaseCTESegmentationFilter< TImageType > Superclass
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:51
Superclass::InputIndexType InputIndexType
Definition: itkBaseCTESegmentationFilter.h:57
Superclass::InputPixelType InputPixelType
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:63
Superclass::OutputImagePointer OutputImagePointer
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:72
virtual ~CorrectGMUsingNeighbourhoodFilter()
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:94
OutputImageType::RegionType OutputImageRegionType
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:69
Superclass::InputImageType InputImageType
Definition: itkCorrectGMUsingNeighbourhoodFilter.h:59