ITK  5.2.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  * 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 itkSimpleContourExtractorImageFilter_h
19 #define itkSimpleContourExtractorImageFilter_h
20 
21 #include "itkBoxImageFilter.h"
22 #include "itkImage.h"
23 #include "itkNumericTraits.h"
24 
25 namespace itk
26 {
52 template <typename TInputImage, typename TOutputImage>
53 class ITK_TEMPLATE_EXPORT SimpleContourExtractorImageFilter : public BoxImageFilter<TInputImage, TOutputImage>
54 {
55 public:
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 
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 
127 protected:
129  ~SimpleContourExtractorImageFilter() override = default;
130  void
131  PrintSelf(std::ostream & os, Indent indent) const override;
132 
145  void
146  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
147 
148 
149 private:
154 };
155 } // end namespace itk
156 
157 #ifndef ITK_MANUAL_INSTANTIATION
158 # include "itkSimpleContourExtractorImageFilter.hxx"
159 #endif
160 
161 #endif
itk::Concept::HasNumericTraits
Definition: itkConceptChecking.h:714
itk::BoxImageFilter::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkBoxImageFilter.h:67
itk::SimpleContourExtractorImageFilter::m_OutputBackgroundValue
OutputPixelType m_OutputBackgroundValue
Definition: itkSimpleContourExtractorImageFilter.h:153
itk::SimpleContourExtractorImageFilter::m_InputForegroundValue
InputPixelType m_InputForegroundValue
Definition: itkSimpleContourExtractorImageFilter.h:150
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itkImage.h
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::BoxImageFilter
A base class for all the filters working on a box neighborhood.
Definition: itkBoxImageFilter.h:40
itk::SimpleContourExtractorImageFilter::InputSizeType
typename InputImageType::SizeType InputSizeType
Definition: itkSimpleContourExtractorImageFilter.h:86
itk::SimpleContourExtractorImageFilter
Computes an image of contours which will be the contour of the first image.
Definition: itkSimpleContourExtractorImageFilter.h:53
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::SimpleContourExtractorImageFilter::m_InputBackgroundValue
InputPixelType m_InputBackgroundValue
Definition: itkSimpleContourExtractorImageFilter.h:151
itk::BoxImageFilter::InputPixelType
typename TInputImage::PixelType InputPixelType
Definition: itkBoxImageFilter.h:64
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::SimpleContourExtractorImageFilter::m_OutputForegroundValue
OutputPixelType m_OutputForegroundValue
Definition: itkSimpleContourExtractorImageFilter.h:152
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:58
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
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::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itkBoxImageFilter.h
itkNumericTraits.h
itk::SimpleContourExtractorImageFilter::InputRealType
typename NumericTraits< InputPixelType >::RealType InputRealType
Definition: itkSimpleContourExtractorImageFilter.h:81
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90