NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.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 itkExtendedBrainMaskWithSmoothDropOffCompositeFilter_h
16 #define itkExtendedBrainMaskWithSmoothDropOffCompositeFilter_h
17 
18 
19 #include <itkImageToImageFilter.h>
21 #include <itkBinaryThresholdImageFilter.h>
22 #include <itkBinaryCrossStructuringElement.h>
23 #include <itkBinaryDilateImageFilter.h>
24 #include <itkDiscreteGaussianImageFilter.h>
25 
26 namespace itk
27 {
28 
62 template< class TImageType>
63 class ITK_EXPORT ExtendedBrainMaskWithSmoothDropOffCompositeFilter : public ImageToImageFilter<TImageType, TImageType>
64 {
65 
66 public:
67 
68  // Standard ITK style typedefs.
70  typedef ImageToImageFilter<TImageType, TImageType> Superclass;
71  typedef SmartPointer<Self> Pointer;
72  typedef SmartPointer<const Self> ConstPointer;
73 
75  itkNewMacro(Self);
76 
78  itkTypeMacro(ExtendedBrainMaskWithSmoothDropOffCompositeFilter, ImageToImageFilter);
79 
80  // typedefs for internal filters.
81  typedef TImageType ImageType;
82  typedef typename ImageType::Pointer ImagePointer;
83  typedef BinaryThresholdImageFilter<TImageType, TImageType> BinaryThresholdFilterType;
84  typedef typename BinaryThresholdFilterType::Pointer BinaryThresholdFilterPointer;
85  typedef BinaryCrossStructuringElement<typename TImageType::PixelType,
86  TImageType::ImageDimension> StructuringElementType;
87  typedef BinaryDilateImageFilter<TImageType, TImageType, StructuringElementType> BinaryDilateFilterType;
88  typedef typename BinaryDilateFilterType::Pointer BinaryDilateFilterPointer;
89  typedef DiscreteGaussianImageFilter<TImageType, TImageType> GaussianFilterType;
90  typedef typename GaussianFilterType::Pointer GaussianFilterPointer;
92  TImageType,
95 
97  void PrintSelf( std::ostream& os, itk::Indent indent ) const;
98 
100  itkGetMacro( InitialThreshold, float);
101  itkSetMacro( InitialThreshold, float);
102  itkGetMacro( FirstNumberOfDilations, unsigned int);
103  itkSetMacro( FirstNumberOfDilations, unsigned int);
104  itkGetMacro( SecondNumberOfDilations, unsigned int);
105  itkSetMacro( SecondNumberOfDilations, unsigned int);
106  itkGetMacro( GaussianFWHM, float);
107  itkSetMacro( GaussianFWHM, float);
108 
109 protected:
110 
113  void GenerateData();
114 
115 private:
116 
117  ExtendedBrainMaskWithSmoothDropOffCompositeFilter(Self&); // intentionally not implemented
118  void operator=(const Self&); // intentionally not implemented
119 
120  float m_InitialThreshold;
121  unsigned int m_FirstNumberOfDilations;
122  unsigned int m_SecondNumberOfDilations;
123  float m_GaussianFWHM;
124 
126  BinaryThresholdFilterPointer m_ThresholdFilter;
127  BinaryDilateFilterPointer m_FirstDilateFilter;
128  BinaryDilateFilterPointer m_SecondDilateFilter;
129  GaussianFilterPointer m_GaussianFilter;
130  InjectSourceImageGreaterThanZeroIntoTargetImageFilterPointer m_InjectorFilter;
131 }; // end class
132 
133 } // end namespace
134 
135 #ifndef ITK_MANUAL_INSTANTIATION
136 #include "itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.txx"
137 #endif
138 
139 #endif
BinaryCrossStructuringElement< typename TImageType::PixelType, TImageType::ImageDimension > StructuringElementType
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:86
ExtendedBrainMaskWithSmoothDropOffCompositeFilter Self
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:69
TImageType ImageType
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:78
Definition: niftkITKAffineResampleImage.cxx:74
SmartPointer< Self > Pointer
Definition: itkInjectSourceImageGreaterThanZeroIntoTargetImageFilter.h:78
SmartPointer< Self > Pointer
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:71
BinaryThresholdImageFilter< TImageType, TImageType > BinaryThresholdFilterType
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:83
BinaryThresholdFilterType::Pointer BinaryThresholdFilterPointer
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:84
float PixelType
Definition: niftkBreastDCEandADC.cxx:88
BinaryDilateFilterType::Pointer BinaryDilateFilterPointer
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:88
If first input is != 0, then the first input is copied to output, otherwise, the second input pixel i...
Definition: itkInjectSourceImageGreaterThanZeroIntoTargetImageFilter.h:59
GaussianFilterType::Pointer GaussianFilterPointer
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:90
Takes a mask, dilates outwards, blurs with a gaussian, then substitutes in the dilated mask...
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:63
DiscreteGaussianImageFilter< TImageType, TImageType > GaussianFilterType
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:89
ImageToImageFilter< TImageType, TImageType > Superclass
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:70
BinaryDilateImageFilter< TImageType, TImageType, StructuringElementType > BinaryDilateFilterType
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:87
SmartPointer< const Self > ConstPointer
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:72
ImageType::Pointer ImagePointer
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:82
InjectSourceImageGreaterThanZeroIntoTargetImageFilter< TImageType, TImageType, TImageType > InjectSourceImageGreaterThanZeroIntoTargetImageFilterType
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:93
InjectSourceImageGreaterThanZeroIntoTargetImageFilterType::Pointer InjectSourceImageGreaterThanZeroIntoTargetImageFilterPointer
Definition: itkExtendedBrainMaskWithSmoothDropOffCompositeFilter.h:94