ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkDirectedHausdorffDistanceImageFilter.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 __itkDirectedHausdorffDistanceImageFilter_h
19 #define __itkDirectedHausdorffDistanceImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkNumericTraits.h"
23 #include "itkArray.h"
24 
25 namespace itk
26 {
62 template< class TInputImage1, class TInputImage2 >
64  public ImageToImageFilter< TInputImage1, TInputImage1 >
65 {
66 public:
72 
74  itkNewMacro(Self);
75 
78 
80  typedef TInputImage1 InputImage1Type;
81  typedef TInputImage2 InputImage2Type;
82  typedef typename TInputImage1::Pointer InputImage1Pointer;
83  typedef typename TInputImage2::Pointer InputImage2Pointer;
84  typedef typename TInputImage1::ConstPointer InputImage1ConstPointer;
85  typedef typename TInputImage2::ConstPointer InputImage2ConstPointer;
86 
87  typedef typename TInputImage1::RegionType RegionType;
88  typedef typename TInputImage1::SizeType SizeType;
89  typedef typename TInputImage1::IndexType IndexType;
90 
91  typedef typename TInputImage1::PixelType InputImage1PixelType;
92  typedef typename TInputImage2::PixelType InputImage2PixelType;
93 
95  itkStaticConstMacro(ImageDimension, unsigned int,
96  TInputImage1::ImageDimension);
97 
100 
102  void SetInput1(const InputImage1Type *image);
103 
105  void SetInput2(const InputImage2Type *image);
106 
108  const InputImage1Type * GetInput1(void);
109 
111  const InputImage2Type * GetInput2(void);
112 
114  itkSetMacro(UseImageSpacing, bool);
115  itkGetConstMacro( UseImageSpacing, bool );
117 
119  itkGetConstMacro(DirectedHausdorffDistance, RealType);
120  itkGetConstMacro(AverageHausdorffDistance, RealType);
122 
123 #ifdef ITK_USE_CONCEPT_CHECKING
124 
125  itkConceptMacro( InputHasNumericTraitsCheck,
127 
129 #endif
130 
131 protected:
134  void PrintSelf(std::ostream & os, Indent indent) const;
135 
138  void AllocateOutputs();
139 
141  void BeforeThreadedGenerateData();
142 
145  void AfterThreadedGenerateData();
146 
148  void ThreadedGenerateData(const RegionType &
149  outputRegionForThread,
150  ThreadIdType threadId);
151 
152  // Override since the filter needs all the data for the algorithm
153  void GenerateInputRequestedRegion();
154 
155  // Override since the filter produces all of its output
156  void EnlargeOutputRequestedRegion(DataObject *data);
157 
158 private:
159  DirectedHausdorffDistanceImageFilter(const Self &); //purposely not
160  // implemented
161  void operator=(const Self &); //purposely not
162 
163  // implemented
164 
167 
169 
176 }; // end of class
177 } // end namespace itk
178 
179 #ifndef ITK_MANUAL_INSTANTIATION
180 #include "itkDirectedHausdorffDistanceImageFilter.hxx"
181 #endif
182 
183 #endif
184