NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkMIDASConditionalErosionFilter.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 itkMIDASConditionalErosionFilter_h
16 #define itkMIDASConditionalErosionFilter_h
17 
19 
20 namespace itk
21 {
22 
36  template <class TInputImage1, class TInputImage2, class TOutputImage>
37  class ITK_EXPORT MIDASConditionalErosionFilter : public MIDASBaseConditionalMorphologyFilter<TInputImage1, TInputImage2, TOutputImage>
38  {
39  public:
43  typedef SmartPointer<Self> Pointer;
44  typedef SmartPointer<const Self> ConstPointer;
45 
47  itkNewMacro(Self);
48 
51 
53  typedef typename TInputImage1::PixelType PixelType1;
54 
57 
59  typedef TInputImage1 InputMaskImageType;
60  typedef typename InputMaskImageType::Pointer InputMaskImagePointer;
64 
65  typedef TInputImage2 InputMainImageType;
66  typedef typename InputMainImageType::Pointer InputMainImagePointer;
69 
70  typedef TOutputImage OutputImageType;
71  typedef typename OutputImageType::Pointer OutputImagePointer;
75  typedef typename itk::ConstNeighborhoodIterator<OutputImageType>::RadiusType OutputImageRadiusType;
76 
78  itkSetMacro(UpperThreshold, PixelType2);
79  itkGetConstMacro(UpperThreshold, PixelType2);
80 
81  protected:
84  void PrintSelf(std::ostream& os, Indent indent) const;
85 
87  void DoFilter(InputMainImageType* inGrey, OutputImageType* inMask, OutputImageType *out);
88 
89  private:
90  MIDASConditionalErosionFilter(const Self&); //purposely not implemented
91  void operator=(const Self&); //purposely not implemented
92 
94  bool IsOnBoundaryOfObject(const OutputImageIndexType &voxelIndex, const OutputImageType* inMask);
95 
97  PixelType2 m_UpperThreshold;
98  };
99 
100 }
101 
102 #ifndef ITK_MANUAL_INSTANTIATION
103 #include "itkMIDASConditionalErosionFilter.txx"
104 #endif
105 
106 #endif
ImageType::SizeType SizeType
Definition: niftkMakeLapUSProbeBasicModel.cxx:31
TInputImage2::PixelType PixelType2
Definition: itkMIDASConditionalErosionFilter.h:56
Definition: niftkITKAffineResampleImage.cxx:74
OutputImageType::IndexType OutputImageIndexType
Definition: itkMIDASConditionalErosionFilter.h:74
OutputImageType::RegionType OutputImageRegionType
Definition: itkMIDASConditionalErosionFilter.h:72
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
TInputImage1::PixelType PixelType1
Definition: itkMIDASConditionalErosionFilter.h:50
MIDASBaseConditionalMorphologyFilter< TInputImage1, TInputImage2, TOutputImage > SuperClass
Definition: itkMIDASConditionalErosionFilter.h:42
InputMaskImageType::Pointer InputMaskImagePointer
Definition: itkMIDASConditionalErosionFilter.h:60
Base class for MIDASConditionalErosionFilter and MIDASConditionalDilationFilter.
Definition: itkMIDASBaseConditionalMorphologyFilter.h:32
TOutputImage OutputImageType
Definition: itkMIDASConditionalErosionFilter.h:70
float PixelType
Definition: niftkBreastDCEandADC.cxx:88
ImageType::RegionType RegionType
Definition: niftkMakeLapUSProbeBasicModel.cxx:30
InputMaskImageType::SizeType InputMaskImageSizeType
Definition: itkMIDASConditionalErosionFilter.h:61
TInputImage1 InputMaskImageType
Definition: itkMIDASConditionalErosionFilter.h:59
InputMainImageType::Pointer InputMainImagePointer
Definition: itkMIDASConditionalErosionFilter.h:66
itk::ConstNeighborhoodIterator< OutputImageType >::RadiusType OutputImageRadiusType
Definition: itkMIDASConditionalErosionFilter.h:75
InputMainImageType::SizeType InputMainImageSizeType
Definition: itkMIDASConditionalErosionFilter.h:67
InputMainImageType::RegionType InputMainImageRegionType
Definition: itkMIDASConditionalErosionFilter.h:68
Performs the conditional erosion, described in step 3 of "Interactive Algorithms for the segmentation...
Definition: itkMIDASConditionalErosionFilter.h:37
SmartPointer< const Self > ConstPointer
Definition: itkMIDASConditionalErosionFilter.h:44
virtual ~MIDASConditionalErosionFilter()
Definition: itkMIDASConditionalErosionFilter.h:83
InputMaskImageType::RegionType InputMaskImageRegionType
Definition: itkMIDASConditionalErosionFilter.h:62
OutputImageType::Pointer OutputImagePointer
Definition: itkMIDASConditionalErosionFilter.h:71
OutputImageType::SizeType OutputImageSizeType
Definition: itkMIDASConditionalErosionFilter.h:73
SmartPointer< Self > Pointer
Definition: itkMIDASConditionalErosionFilter.h:43
InputMaskImageType::IndexType InputMaskImageIndexType
Definition: itkMIDASConditionalErosionFilter.h:63
TInputImage2 InputMainImageType
Definition: itkMIDASConditionalErosionFilter.h:65
MIDASConditionalErosionFilter Self
Definition: itkMIDASConditionalErosionFilter.h:41