ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkMorphologicalDistanceTransformImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkMorphologicalDistanceTransformImageFilter_h
19 #define itkMorphologicalDistanceTransformImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkProgressReporter.h"
23 
26 #include "itkSqrtImageFilter.h"
27 
28 namespace itk
29 {
58 template< typename TInputImage, typename TOutputImage = TInputImage >
60  public ImageToImageFilter< TInputImage,
61  TOutputImage >
62 {
63 public:
69 
71  itkNewMacro(Self);
72 
75 
77  typedef TInputImage InputImageType;
78  typedef TOutputImage OutputImageType;
79  typedef typename TInputImage::PixelType InputPixelType;
82  typedef typename TOutputImage::PixelType OutputPixelType;
83 
85  typedef typename TInputImage::Pointer InputImagePointer;
86  typedef typename TInputImage::ConstPointer InputImageConstPointer;
87 
89  itkStaticConstMacro(OutputImageDimension, unsigned int,
90  TOutputImage::ImageDimension);
91  itkStaticConstMacro(InputImageDimension, unsigned int,
92  TInputImage::ImageDimension);
93  itkStaticConstMacro(ImageDimension, unsigned int,
94  TInputImage::ImageDimension);
96 
99  virtual void Modified() const;
100 
104  itkSetMacro(OutsideValue, InputPixelType);
105  itkGetConstReferenceMacro(OutsideValue, InputPixelType);
107 
109  void SetUseImageSpacing(bool uis)
110  {
111  m_Erode->SetUseImageSpacing(uis);
112  }
113 
114  const bool & GetUseImageSpacing()
115  {
116  return m_Erode->GetUseImageSpacing();
117  }
118 
119  itkSetMacro(SqrDist, bool);
120  itkGetConstReferenceMacro(SqrDist, bool);
121  itkBooleanMacro(SqrDist);
122 
123 #ifdef ITK_USE_CONCEPT_CHECKING
124 
125  itkConceptMacro( SameDimension,
126  ( Concept::SameDimension< itkGetStaticConstMacro(InputImageDimension),
127  itkGetStaticConstMacro(OutputImageDimension) > ) );
128 
129  itkConceptMacro( Comparable,
131 
133 #endif
134 protected:
137  void PrintSelf(std::ostream & os, Indent indent) const;
139 
141  void GenerateData(void);
142 
143  // do everything in the output image type, which should have high precision
147 private:
148  MorphologicalDistanceTransformImageFilter(const Self &); //purposely not
149  // implemented
150  void operator=(const Self &); //purposely not
151  // implemented
152 
157  bool m_SqrDist;
158 };
159 } // namespace itk
160 #ifndef ITK_MANUAL_INSTANTIATION
161 #include "itkMorphologicalDistanceTransformImageFilter.hxx"
162 #endif
163 
164 #endif
Distance transform of a mask using parabolic morphological methods.
Computes the square root of each pixel.
Class for morphological erosion operations with parabolic structuring elements.
Base class for all process objects that output image data.
itk::FixedArray< ScalarRealType, TInputImage::ImageDimension > RadiusType
Binarize an input image by thresholding.
itk::BinaryThresholdImageFilter< InputImageType, OutputImageType > ThreshType
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Define additional traits for native types such as int or float.
itk::SqrtImageFilter< OutputImageType, OutputImageType > SqrtType
NumericTraits< InputPixelType >::ScalarRealType ScalarRealType
#define itkConceptMacro(name, concept)
itk::ParabolicErodeImageFilter< OutputImageType, OutputImageType > ErodeType