NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkSetGreyBoundaryToWhiteOrCSFFilter.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 itkSetGreyBoundaryToWhiteOrCSFFilter_h
16 #define itkSetGreyBoundaryToWhiteOrCSFFilter_h
17 
18 #include <itkImage.h>
20 
21 namespace itk
22 {
32 template <class TImageType, typename TScalarType, unsigned int NDimensions>
34  public BaseCTESegmentationFilter< TImageType >
35 {
36 public:
40  typedef SmartPointer<Self> Pointer;
41  typedef SmartPointer<const Self> ConstPointer;
42 
44  itkNewMacro(Self);
45 
48 
50  itkStaticConstMacro(Dimension, unsigned int, NDimensions);
51 
53  typedef typename Superclass::InputImageType InputImageType;
55  typedef typename Superclass::InputIndexType InputIndexType;
56  typedef typename Superclass::InputImagePointer InputImagePointer;
57  typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
58  typedef typename Superclass::OutputPixelType OutputPixelType;
59  typedef typename Superclass::OutputImageType OutputImageType;
60  typedef typename Superclass::OutputImagePointer OutputImagePointer;
61  typedef typename Superclass::OutputImageConstPointer OutputImageConstPointer;
62  typedef TScalarType ThicknessPixelType;
64 
66  void SetLabelImage(const InputImageType *image) {this->SetNthInput(0, const_cast<InputImageType *>(image)); }
67 
69  void SetOneLayerImage(const InputImageType *image) {this->SetNthInput(1, const_cast<InputImageType *>(image)); }
70 
72  void SetThicknessImage(const ThicknessImageType *image) {this->SetNthInput(2, const_cast<ThicknessImageType *>(image)); }
73 
75  itkSetMacro(ExpectedVoxelSize, float);
76  itkGetMacro(ExpectedVoxelSize, float);
77 
79  itkSetMacro(TaggedCSFLabel, InputPixelType);
80  itkGetMacro(TaggedCSFLabel, InputPixelType);
81 
83  itkGetMacro(NumberOfGreyBefore, unsigned long int);
84 
86  itkGetMacro(NumberOfGreyAfter, unsigned long int);
87 
88 protected:
89 
92 
94  virtual void PrintSelf(std::ostream&, Indent) const;
95 
96  /* The main filter method. Note, single threaded. */
97  virtual void GenerateData();
98 
99 private:
100 
101  SetGreyBoundaryToWhiteOrCSFFilter(const Self&); // purposely not implemented
102  void operator=(const Self&); // purposely not implemented
103 
104  float m_ExpectedVoxelSize;
105 
106  InputPixelType m_TaggedCSFLabel;
107 
108  unsigned long int m_NumberOfGreyBefore;
109 
110  unsigned long int m_NumberOfGreyAfter;
111 
112 };
113 
114 } // end namespace itk
115 
116 #ifndef ITK_MANUAL_INSTANTIATION
117 #include "itkSetGreyBoundaryToWhiteOrCSFFilter.txx"
118 #endif
119 
120 #endif
Superclass::OutputImageConstPointer OutputImageConstPointer
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:61
Superclass::InputPixelType InputPixelType
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:54
Superclass::InputImageType InputImageType
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:53
Superclass::InputImagePointer InputImagePointer
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:56
SmartPointer< Self > Pointer
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:40
SmartPointer< const Self > ConstPointer
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:41
SetGreyBoundaryToWhiteOrCSFFilter Self
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:38
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: glew.h:4052
Superclass::OutputPixelType OutputPixelType
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:58
BaseCTESegmentationFilter< TImageType > Superclass
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:39
void SetThicknessImage(const ThicknessImageType *image)
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:72
Definition: niftkITKAffineResampleImage.cxx:74
void SetLabelImage(const InputImageType *image)
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:66
Superclass::InputIndexType InputIndexType
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:55
Superclass::OutputImageType OutputImageType
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:59
Superclass::InputImageConstPointer InputImageConstPointer
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:57
Image< ThicknessPixelType, NDimensions > ThicknessImageType
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:63
Superclass::InputPixelType InputPixelType
Definition: itkBaseCTESegmentationFilter.h:56
Base class for classes that manipulate the segmented volume before it gets to the Cortical Thickness ...
Definition: itkBaseCTESegmentationFilter.h:41
virtual ~SetGreyBoundaryToWhiteOrCSFFilter()
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:91
Assumes input is GM, WM, CSF labelled image, where the GM is exaclty 1 voxel wide, we then set this GM voxel to WM or CSF depending on thickness, and the immediate neighbourhood.
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:33
Superclass::OutputImagePointer OutputImagePointer
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:60
void SetOneLayerImage(const InputImageType *image)
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:69
Simultaneous itk::Image and itk::Array (and hence vnl_vector) class.
const unsigned int Dimension
Definition: niftkBreastDCEandADC.cxx:89
TScalarType ThicknessPixelType
Definition: itkSetGreyBoundaryToWhiteOrCSFFilter.h:62