ITK  4.2.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< class TInputImage, class 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 
122  RegionType GetRegionToProcess() const;
123 
124  void SetNarrowBand(NarrowBandType *ptr);
125 
126  NarrowBandPointer GetNarrowBand() const;
127 
128 #ifdef ITK_USE_CONCEPT_CHECKING
129 
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 
150 #endif
151 protected:
154  void PrintSelf(std::ostream & os, Indent indent) const;
156 
159  void GenerateDataND();
160 
163  void GenerateData();
164 
165 private:
166  FastChamferDistanceImageFilter(const Self &); //purposely not implemented
167  void operator=(const Self &); //purposely not implemented
168 
170 
173 
175 
178 }; // end of FastChamferDistanceImageFilter class
179 } //end namespace itk
180 
181 #ifndef ITK_MANUAL_INSTANTIATION
182 #include "itkFastChamferDistanceImageFilter.hxx"
183 #endif
184 
185 #endif
186