Orfeo Toolbox  4.0
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"
25 
26 namespace itk
27 {
71 template< typename TInputImage1, typename TInputImage2 >
73  public ImageToImageFilter< TInputImage1, TInputImage1 >
74 {
75 public:
81 
83  itkNewMacro(Self);
84 
87 
89  typedef TInputImage1 InputImage1Type;
90  typedef TInputImage2 InputImage2Type;
91  typedef typename TInputImage1::Pointer InputImage1Pointer;
92  typedef typename TInputImage2::Pointer InputImage2Pointer;
93  typedef typename TInputImage1::ConstPointer InputImage1ConstPointer;
94  typedef typename TInputImage2::ConstPointer InputImage2ConstPointer;
95 
96  typedef typename TInputImage1::RegionType RegionType;
97  typedef typename TInputImage1::SizeType SizeType;
98  typedef typename TInputImage1::IndexType IndexType;
99 
100  typedef typename TInputImage1::PixelType InputImage1PixelType;
101  typedef typename TInputImage2::PixelType InputImage2PixelType;
102 
104  itkStaticConstMacro(ImageDimension, unsigned int,
105  TInputImage1::ImageDimension);
106 
109 
111  void SetInput1(const InputImage1Type *image);
112 
114  void SetInput2(const InputImage2Type *image);
115 
117  const InputImage1Type * GetInput1(void);
118 
120  const InputImage2Type * GetInput2(void);
121 
123  itkSetMacro(UseImageSpacing, bool);
124  itkGetConstMacro( UseImageSpacing, bool );
125 
127  itkGetConstMacro(DirectedHausdorffDistance, RealType);
128  itkGetConstMacro(AverageHausdorffDistance, RealType);
129 
130 #ifdef ITK_USE_CONCEPT_CHECKING
131  // Begin concept checking
132  itkConceptMacro( InputHasNumericTraitsCheck,
134  // End concept checking
135 #endif
136 
137 protected:
140  void PrintSelf(std::ostream & os, Indent indent) const;
141 
144  void AllocateOutputs();
145 
148 
152 
154  void ThreadedGenerateData(const RegionType &
155  outputRegionForThread,
156  ThreadIdType threadId);
157 
158  // Override since the filter needs all the data for the algorithm
160 
161  // Override since the filter produces all of its output
163 
164 private:
165  DirectedHausdorffDistanceImageFilter(const Self &); //purposely not implemented
166  void operator=(const Self &); //purposely not implemented
167 
170 
171 
173 
176 
178  std::vector< CompensatedSummationType > m_Sum;
179 
183 }; // end of class
184 } // end namespace itk
185 
186 #ifndef ITK_MANUAL_INSTANTIATION
188 #endif
189 
190 #endif

Generated at Sat Mar 8 2014 14:33:15 for Orfeo Toolbox with doxygen 1.8.3.1