ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkSimpleContourExtractorImageFilter.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 itkSimpleContourExtractorImageFilter_h
19 #define itkSimpleContourExtractorImageFilter_h
20 
21 #include "itkBoxImageFilter.h"
22 #include "itkImage.h"
23 #include "itkNumericTraits.h"
24 
25 namespace itk
26 {
49 template< typename TInputImage, typename TOutputImage >
50 class ITK_TEMPLATE_EXPORT SimpleContourExtractorImageFilter:
51  public BoxImageFilter< TInputImage, TOutputImage >
52 {
53 public:
54  ITK_DISALLOW_COPY_AND_ASSIGN(SimpleContourExtractorImageFilter);
55 
57  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
58  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
59 
61  using InputImageType = TInputImage;
62  using OutputImageType = TOutputImage;
63 
69 
71  itkNewMacro(Self);
72 
75 
77  using InputPixelType = typename InputImageType::PixelType;
78  using OutputPixelType = typename OutputImageType::PixelType;
80 
83 
85 
88  itkSetMacro(InputForegroundValue, InputPixelType);
89 
92  itkGetConstReferenceMacro(InputForegroundValue, InputPixelType);
93 
96  itkSetMacro(InputBackgroundValue, InputPixelType);
97 
100  itkGetConstReferenceMacro(InputBackgroundValue, InputPixelType);
101 
104  itkSetMacro(OutputForegroundValue, OutputPixelType);
105 
108  itkGetConstReferenceMacro(OutputForegroundValue, OutputPixelType);
109 
112  itkSetMacro(OutputBackgroundValue, OutputPixelType);
113 
116  itkGetConstReferenceMacro(OutputBackgroundValue, OutputPixelType);
117 
118 #ifdef ITK_USE_CONCEPT_CHECKING
119  // Begin concept checking
120  itkConceptMacro( InputHasNumericTraitsCheck,
122  itkConceptMacro( OutputHasNumericTraitsCheck,
124  // End concept checking
125 #endif
126 
127 protected:
129  ~SimpleContourExtractorImageFilter() override = default;
130  void PrintSelf(std::ostream & os, Indent indent) const override;
131 
144  void DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
145 
146 
147 private:
152 };
153 } // end namespace itk
154 
155 #ifndef ITK_MANUAL_INSTANTIATION
156 #include "itkSimpleContourExtractorImageFilter.hxx"
157 #endif
158 
159 #endif
Computes an image of contours which will be the contour of the first image.
Define numeric traits for std::vector.
typename TOutputImage::PixelType OutputPixelType
typename NumericTraits< InputPixelType >::RealType InputRealType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename TInputImage::PixelType InputPixelType
A base class for all the filters working on a box neighborhood.
typename InputImageType::RegionType InputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)