ITK  6.0.0
Insight Toolkit
itkSimpleContourExtractorImageFilter.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 itkSimpleContourExtractorImageFilter_h
19#define itkSimpleContourExtractorImageFilter_h
20
21#include "itkBoxImageFilter.h"
22#include "itkImage.h"
23#include "itkNumericTraits.h"
24
25namespace itk
26{
52template <typename TInputImage, typename TOutputImage>
53class ITK_TEMPLATE_EXPORT SimpleContourExtractorImageFilter : public BoxImageFilter<TInputImage, TOutputImage>
54{
55public:
56 ITK_DISALLOW_COPY_AND_MOVE(SimpleContourExtractorImageFilter);
57
59 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
60 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
61
63 using InputImageType = TInputImage;
64 using OutputImageType = TOutputImage;
65
71
73 itkNewMacro(Self);
74
76 itkOverrideGetNameOfClassMacro(SimpleContourExtractorImageFilter);
77
79 using InputPixelType = typename InputImageType::PixelType;
80 using OutputPixelType = typename OutputImageType::PixelType;
82
85
87
90 itkSetMacro(InputForegroundValue, InputPixelType);
91
94 itkGetConstReferenceMacro(InputForegroundValue, InputPixelType);
95
98 itkSetMacro(InputBackgroundValue, InputPixelType);
99
102 itkGetConstReferenceMacro(InputBackgroundValue, InputPixelType);
103
106 itkSetMacro(OutputForegroundValue, OutputPixelType);
107
110 itkGetConstReferenceMacro(OutputForegroundValue, OutputPixelType);
111
114 itkSetMacro(OutputBackgroundValue, OutputPixelType);
115
118 itkGetConstReferenceMacro(OutputBackgroundValue, OutputPixelType);
119
120#ifdef ITK_USE_CONCEPT_CHECKING
121 // Begin concept checking
122 itkConceptMacro(InputHasNumericTraitsCheck, (Concept::HasNumericTraits<InputPixelType>));
123 itkConceptMacro(OutputHasNumericTraitsCheck, (Concept::HasNumericTraits<OutputPixelType>));
124 // End concept checking
125#endif
126
127protected:
130 void
131 PrintSelf(std::ostream & os, Indent indent) const override;
132
145 void
146 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
147
148
149private:
150 InputPixelType m_InputForegroundValue{};
151 InputPixelType m_InputBackgroundValue{};
152 OutputPixelType m_OutputForegroundValue{};
153 OutputPixelType m_OutputBackgroundValue{};
154};
155} // end namespace itk
156
157#ifndef ITK_MANUAL_INSTANTIATION
158# include "itkSimpleContourExtractorImageFilter.hxx"
159#endif
160
161#endif
A base class for all the filters working on a box neighborhood.
typename TInputImage::PixelType InputPixelType
typename TOutputImage::PixelType OutputPixelType
Base class for all process objects that output image data.
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename InputImageType::RegionType InputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Define additional traits for native types such as int or float.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Computes an image of contours which will be the contour of the first image.
~SimpleContourExtractorImageFilter() override=default
typename NumericTraits< InputPixelType >::RealType InputRealType
void PrintSelf(std::ostream &os, Indent indent) const override
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....