ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkHausdorffDistanceImageFilter.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 itkHausdorffDistanceImageFilter_h
19 #define itkHausdorffDistanceImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkNumericTraits.h"
23 
24 namespace itk
25 {
61 template< typename TInputImage1, typename TInputImage2 >
62 class ITK_TEMPLATE_EXPORT HausdorffDistanceImageFilter:
63  public ImageToImageFilter< TInputImage1, TInputImage1 >
64 {
65 public:
66  ITK_DISALLOW_COPY_AND_ASSIGN(HausdorffDistanceImageFilter);
67 
73 
75  itkNewMacro(Self);
76 
79 
81  using InputImage1Type = TInputImage1;
82  using InputImage2Type = TInputImage2;
83  using InputImage1Pointer = typename TInputImage1::Pointer;
84  using InputImage2Pointer = typename TInputImage2::Pointer;
85  using InputImage1ConstPointer = typename TInputImage1::ConstPointer;
86  using InputImage2ConstPointer = typename TInputImage2::ConstPointer;
87 
89  using SizeType = typename TInputImage1::SizeType;
91 
92  using InputImage1PixelType = typename TInputImage1::PixelType;
93  using InputImage2PixelType = typename TInputImage2::PixelType;
94 
96  static constexpr unsigned int ImageDimension = TInputImage1::ImageDimension;
97 
100 
102  void SetInput1(const InputImage1Type *image);
103 
105  void SetInput2(const InputImage2Type *image);
106 
108  const InputImage1Type * GetInput1();
109 
111  const InputImage2Type * GetInput2();
112 
114  itkSetMacro(UseImageSpacing, bool);
115  itkGetConstMacro( UseImageSpacing, bool );
117 
119  itkGetConstMacro(HausdorffDistance, RealType);
120  itkGetConstMacro(AverageHausdorffDistance, RealType);
122 
123 #ifdef ITK_USE_CONCEPT_CHECKING
124  // Begin concept checking
125  itkConceptMacro( Input1HasNumericTraitsCheck,
127  // End concept checking
128 #endif
129 
130 protected:
132  ~HausdorffDistanceImageFilter() override = default;
133  void PrintSelf(std::ostream & os, Indent indent) const override;
134 
136  void GenerateData() override;
137 
138  // Override since the filter needs all the data for the algorithm
139  void GenerateInputRequestedRegion() override;
140 
141  // Override since the filter produces all of its output
142  void EnlargeOutputRequestedRegion(DataObject *data) override;
143 
144 private:
148 }; // end of class
149 } // end namespace itk
150 
151 #ifndef ITK_MANUAL_INSTANTIATION
152 #include "itkHausdorffDistanceImageFilter.hxx"
153 #endif
154 
155 #endif
typename NumericTraits< InputImage1PixelType >::RealType RealType
Light weight base class for most itk classes.
Define numeric traits for std::vector.
typename TInputImage1::PixelType InputImage1PixelType
typename TInputImage2::Pointer InputImage2Pointer
typename TInputImage1::ConstPointer InputImage1ConstPointer
typename TInputImage2::ConstPointer InputImage2ConstPointer
typename TInputImage1::RegionType RegionType
typename TInputImage2::PixelType InputImage2PixelType
typename TInputImage1::Pointer InputImage1Pointer
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
typename TInputImage1::IndexType IndexType
Computes the Hausdorff distance between the set of non-zero pixels of two images. ...
#define itkConceptMacro(name, concept)
Base class for all data objects in ITK.