ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkMorphologicalSignedDistanceTransformImageFilter.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 itkMorphologicalSignedDistanceTransformImageFilter_h
19 #define itkMorphologicalSignedDistanceTransformImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkProgressReporter.h"
23 
28 
29 namespace itk
30 {
70 template< typename TInputImage, typename TOutputImage = TInputImage >
72  public ImageToImageFilter< TInputImage,
73  TOutputImage >
74 {
75 public:
81 
83  itkNewMacro(Self);
84 
87 
89  typedef TInputImage InputImageType;
90  typedef TOutputImage OutputImageType;
91  typedef typename TInputImage::PixelType InputPixelType;
94  typedef typename TOutputImage::PixelType OutputPixelType;
95 
97  typedef typename TInputImage::Pointer InputImagePointer;
98  typedef typename TInputImage::ConstPointer InputImageConstPointer;
99 
101  itkStaticConstMacro(OutputImageDimension, unsigned int,
102  TOutputImage::ImageDimension);
103  itkStaticConstMacro(InputImageDimension, unsigned int,
104  TInputImage::ImageDimension);
105  itkStaticConstMacro(ImageDimension, unsigned int,
106  TInputImage::ImageDimension);
108 
111 
112  virtual void Modified() const;
113 
117  itkSetMacro(OutsideValue, InputPixelType);
118  itkGetConstReferenceMacro(OutsideValue, InputPixelType);
120 
122  itkBooleanMacro(UseImageSpacing);
123 
126  itkSetMacro(InsideIsPositive, bool);
127 
130  itkGetConstReferenceMacro(InsideIsPositive, bool);
131 
135  itkBooleanMacro(InsideIsPositive);
136 
138  void SetUseImageSpacing(bool uis)
139  {
140  m_Erode->SetUseImageSpacing(uis);
141  m_Dilate->SetUseImageSpacing(uis);
142  this->Modified();
143  }
145 
147  NOCHOICE = 0, // decices based on scale - experimental
148  CONTACTPOINT = 1, // sometimes faster at low scale
149  INTERSECTION = 2 // default
150  };
151 
159  itkSetMacro(ParabolicAlgorithm, int);
160  itkGetConstReferenceMacro(ParabolicAlgorithm, int);
161 
162  const bool & GetUseImageSpacing()
163  {
164  return m_Erode->GetUseImageSpacing();
165  }
166 
167 #ifdef ITK_USE_CONCEPT_CHECKING
168 
169  itkConceptMacro( SameDimension,
170  ( Concept::SameDimension< itkGetStaticConstMacro(InputImageDimension),
171  itkGetStaticConstMacro(OutputImageDimension) > ) );
172 
173  itkConceptMacro( Comparable,
175 
177 #endif
178 protected:
181  void PrintSelf(std::ostream & os, Indent indent) const;
183 
185  void GenerateData(void);
186 
188 
189  // do everything in the output image type, which should have high precision
194 private:
195  MorphologicalSignedDistanceTransformImageFilter(const Self &); //purposely not
196  // implemented
197  void operator=(const Self &); //purposely not
198  // implemented
199 
206 };
207 } // namespace itk
208 #ifndef ITK_MANUAL_INSTANTIATION
209 #include "itkMorphologicalSignedDistanceTransformImageFilter.hxx"
210 #endif
211 
212 #endif
itk::MorphSDTHelperImageFilter< OutputImageType, OutputImageType > HelperType
Class for morphological erosion operations with parabolic structuring elements.
Signed distance transform of a mask using parabolic morphological methods.
Base class for all process objects that output image data.
Binarize an input image by thresholding.
Implements a pixel-wise operator to form a signed distance transform.
Class for morphological dilation operations with parabolic structuring elements.
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::ParabolicErodeImageFilter< OutputImageType, OutputImageType > ErodeType
itk::FixedArray< ScalarRealType, TInputImage::ImageDimension > RadiusType
#define itkConceptMacro(name, concept)
itk::ParabolicDilateImageFilter< OutputImageType, OutputImageType > DilateType
itk::BinaryThresholdImageFilter< InputImageType, OutputImageType > ThreshType