ITK  5.2.0
Insight Toolkit
itkContourMeanDistanceImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 itkContourMeanDistanceImageFilter_h
19 #define itkContourMeanDistanceImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkNumericTraits.h"
23 
24 namespace itk
25 {
70 template <typename TInputImage1, typename TInputImage2>
71 class ITK_TEMPLATE_EXPORT ContourMeanDistanceImageFilter : public ImageToImageFilter<TInputImage1, TInputImage1>
72 {
73 public:
74  ITK_DISALLOW_COPY_AND_MOVE(ContourMeanDistanceImageFilter);
76 
82 
84  itkNewMacro(Self);
85 
88 
90  using InputImage1Type = TInputImage1;
91  using InputImage2Type = TInputImage2;
92  using InputImage1Pointer = typename TInputImage1::Pointer;
93  using InputImage2Pointer = typename TInputImage2::Pointer;
94  using InputImage1ConstPointer = typename TInputImage1::ConstPointer;
95  using InputImage2ConstPointer = typename TInputImage2::ConstPointer;
96 
98  using SizeType = typename TInputImage1::SizeType;
100 
101  using InputImage1PixelType = typename TInputImage1::PixelType;
102  using InputImage2PixelType = typename TInputImage2::PixelType;
103 
105  static constexpr unsigned int ImageDimension = TInputImage1::ImageDimension;
106 
109 
111  void
112  SetInput1(const InputImage1Type * image);
113 
115  void
116  SetInput2(const InputImage2Type * image);
117 
119  const InputImage1Type *
120  GetInput1();
121 
123  const InputImage2Type *
124  GetInput2();
125 
127  itkGetConstMacro(MeanDistance, RealType);
128 
130  itkSetMacro(UseImageSpacing, bool);
131  itkGetConstMacro(UseImageSpacing, bool);
133 
134 #ifdef ITK_USE_CONCEPT_CHECKING
135  // Begin concept checking
137  // End concept checking
138 #endif
139 
140 protected:
142  ~ContourMeanDistanceImageFilter() override = default;
143  void
144  PrintSelf(std::ostream & os, Indent indent) const override;
145 
147  void
148  GenerateData() override;
149 
150  // Override since the filter needs all the data for the algorithm
151  void
152  GenerateInputRequestedRegion() override;
153 
154  // Override since the filter produces all of its output
155  void
156  EnlargeOutputRequestedRegion(DataObject * data) override;
157 
158 private:
161 }; // end of class
162 } // end namespace itk
163 
164 #ifndef ITK_MANUAL_INSTANTIATION
165 # include "itkContourMeanDistanceImageFilter.hxx"
166 #endif
167 
168 #endif
itk::ContourMeanDistanceImageFilter::m_UseImageSpacing
bool m_UseImageSpacing
Definition: itkContourMeanDistanceImageFilter.h:160
itk::ContourMeanDistanceImageFilter::SizeType
typename TInputImage1::SizeType SizeType
Definition: itkContourMeanDistanceImageFilter.h:98
itk::Concept::HasNumericTraits
Definition: itkConceptChecking.h:714
itk::ContourMeanDistanceImageFilter::InputImage2PixelType
typename TInputImage2::PixelType InputImage2PixelType
Definition: itkContourMeanDistanceImageFilter.h:102
itk::ContourMeanDistanceImageFilter::InputImage2ConstPointer
typename TInputImage2::ConstPointer InputImage2ConstPointer
Definition: itkContourMeanDistanceImageFilter.h:95
itk::ContourMeanDistanceImageFilter::InputImage1ConstPointer
typename TInputImage1::ConstPointer InputImage1ConstPointer
Definition: itkContourMeanDistanceImageFilter.h:94
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::ContourMeanDistanceImageFilter::m_MeanDistance
RealType m_MeanDistance
Definition: itkContourMeanDistanceImageFilter.h:159
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ContourMeanDistanceImageFilter::InputImage2Pointer
typename TInputImage2::Pointer InputImage2Pointer
Definition: itkContourMeanDistanceImageFilter.h:93
itk::ContourMeanDistanceImageFilter::InputImage1Type
TInputImage1 InputImage1Type
Definition: itkContourMeanDistanceImageFilter.h:90
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::ContourMeanDistanceImageFilter::InputImage1PixelType
typename TInputImage1::PixelType InputImage1PixelType
Definition: itkContourMeanDistanceImageFilter.h:101
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ContourMeanDistanceImageFilter::IndexType
typename TInputImage1::IndexType IndexType
Definition: itkContourMeanDistanceImageFilter.h:99
itkImageToImageFilter.h
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:58
itk::ContourMeanDistanceImageFilter::RegionType
typename TInputImage1::RegionType RegionType
Definition: itkContourMeanDistanceImageFilter.h:97
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ContourMeanDistanceImageFilter
Computes the Mean distance between the boundaries of non-zero regions of two images.
Definition: itkContourMeanDistanceImageFilter.h:71
itk::ContourMeanDistanceImageFilter::InputImage2Type
TInputImage2 InputImage2Type
Definition: itkContourMeanDistanceImageFilter.h:91
itkNumericTraits.h
itk::ContourMeanDistanceImageFilter::InputImage1Pointer
typename TInputImage1::Pointer InputImage1Pointer
Definition: itkContourMeanDistanceImageFilter.h:92
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293
itk::ContourMeanDistanceImageFilter::RealType
typename NumericTraits< InputImage1PixelType >::RealType RealType
Definition: itkContourMeanDistanceImageFilter.h:108