ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkFastChamferDistanceImageFilter.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 itkFastChamferDistanceImageFilter_h
19 #define itkFastChamferDistanceImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
23 #include "itkNarrowBand.h"
24 
25 namespace itk
26 {
54 template< typename TInputImage, typename TOutputImage >
56  public ImageToImageFilter< TInputImage, TOutputImage >
57 {
58 public:
64 
66  itkNewMacro(Self);
67 
70 
72  typedef TInputImage InputImageType;
73 
75  typedef TOutputImage OutputImageType;
76 
78  typedef typename InputImageType::RegionType RegionType;
79 
81  typedef typename InputImageType::PixelType PixelType;
82 
84  typedef typename RegionType::IndexType IndexType;
85 
87  typedef typename InputImageType::OffsetType OffsetType;
88 
90  typedef typename RegionType::SizeType SizeType;
91 
93  itkStaticConstMacro(ImageDimension, unsigned int,
94  InputImageType::ImageDimension);
95  itkStaticConstMacro(OutputImageDimension, unsigned int,
96  OutputImageType::ImageDimension);
98 
100  typedef typename InputImageType::ConstPointer InputImagePointer;
101 
106 
108 
110  itkSetMacro(Weights, WeightsType);
111  itkGetConstReferenceMacro(Weights, WeightsType);
113 
115  itkSetMacro(MaximumDistance, float);
116  itkGetConstMacro(MaximumDistance, float);
118 
120  void SetRegionToProcess(const RegionType & r);
121 
123 
124  void SetNarrowBand(NarrowBandType *ptr);
125 
127 
128 #ifdef ITK_USE_CONCEPT_CHECKING
129  // Begin concept checking
130  itkConceptMacro( SameDimensionCheck,
132  itkConceptMacro( SameTypeCheck,
134  itkConceptMacro( FloatConvertibleToPixelTypeCheck,
136  itkConceptMacro( PixelTypeConvertibleToFloatCheck,
138  itkConceptMacro( PixelTypeGreaterThanFloatCheck,
140  itkConceptMacro( PixelTypeLessThanFloatCheck,
142  itkConceptMacro( PixelTypeFloatAdditiveOperatorsCheck,
144  itkConceptMacro( FloatGreaterThanPixelTypeCheck,
146  itkConceptMacro( FloatLessThanPixelTypeCheck,
148  // End concept checking
149 #endif
150 
151 protected:
154  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
155 
158  void GenerateDataND();
159 
162  void GenerateData() ITK_OVERRIDE;
163 
164 private:
165  FastChamferDistanceImageFilter(const Self &) ITK_DELETE_FUNCTION;
166  void operator=(const Self &) ITK_DELETE_FUNCTION;
167 
169 
172 
174 
177 }; // end of FastChamferDistanceImageFilter class
178 } //end namespace itk
179 
180 #ifndef ITK_MANUAL_INSTANTIATION
181 #include "itkFastChamferDistanceImageFilter.hxx"
182 #endif
183 
184 #endif
RegionType GetRegionToProcess() const
NarrowBandPointer GetNarrowBand() const
Base class for all process objects that output image data.
This class compute the signed (positive and negative) chamfer distance in a narrow band...
Narrow Band class.
Definition: itkNarrowBand.h:51
FixedArray< float, ImageDimension > WeightsType
Base class for filters that take an image as input and produce an image as output.
void SetRegionToProcess(const RegionType &r)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
void PrintSelf(std::ostream &os, Indent indent) const override
void SetNarrowBand(NarrowBandType *ptr)
#define itkConceptMacro(name, concept)
ImageToImageFilter< TInputImage, TOutputImage > Superclass