ITK  5.3.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  * https://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);
82 
84  itkNewMacro(Self);
85 
88 
90  using InputImage1Type = TInputImage1;
91  using InputImage2Type = TInputImage2;
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);
132  itkBooleanMacro(UseImageSpacing);
135 #ifdef ITK_USE_CONCEPT_CHECKING
136  // Begin concept checking
138  // End concept checking
139 #endif
140 
141 protected:
143  ~ContourMeanDistanceImageFilter() override = default;
144  void
145  PrintSelf(std::ostream & os, Indent indent) const override;
146 
148  void
149  GenerateData() override;
150 
151  // Override since the filter needs all the data for the algorithm
152  void
153  GenerateInputRequestedRegion() override;
154 
155  // Override since the filter produces all of its output
156  void
157  EnlargeOutputRequestedRegion(DataObject * data) override;
158 
159 private:
162 }; // end of class
163 } // end namespace itk
164 
165 #ifndef ITK_MANUAL_INSTANTIATION
166 # include "itkContourMeanDistanceImageFilter.hxx"
167 #endif
168 
169 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:92
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:93
itk::ContourMeanDistanceImageFilter::m_UseImageSpacing
bool m_UseImageSpacing
Definition: itkContourMeanDistanceImageFilter.h:161
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:160
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:55
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