ITK  4.13.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:
55  itkStaticConstMacro(InputImageDimension, unsigned int,
56  TInputImage::ImageDimension);
57  itkStaticConstMacro(OutputImageDimension, unsigned int,
58  TOutputImage::ImageDimension);
60 
62  typedef TInputImage InputImageType;
63  typedef TOutputImage OutputImageType;
64 
70 
72  itkNewMacro(Self);
73 
76 
78  typedef typename InputImageType::PixelType InputPixelType;
79  typedef typename OutputImageType::PixelType OutputPixelType;
81 
82  typedef typename InputImageType::RegionType InputImageRegionType;
83  typedef typename OutputImageType::RegionType OutputImageRegionType;
84 
86 
89  itkSetMacro(InputForegroundValue, InputPixelType);
90 
93  itkGetConstReferenceMacro(InputForegroundValue, InputPixelType);
94 
97  itkSetMacro(InputBackgroundValue, InputPixelType);
98 
101  itkGetConstReferenceMacro(InputBackgroundValue, InputPixelType);
102 
105  itkSetMacro(OutputForegroundValue, OutputPixelType);
106 
109  itkGetConstReferenceMacro(OutputForegroundValue, OutputPixelType);
110 
113  itkSetMacro(OutputBackgroundValue, OutputPixelType);
114 
117  itkGetConstReferenceMacro(OutputBackgroundValue, OutputPixelType);
118 
119 #ifdef ITK_USE_CONCEPT_CHECKING
120  // Begin concept checking
121  itkConceptMacro( InputHasNumericTraitsCheck,
123  itkConceptMacro( OutputHasNumericTraitsCheck,
125  // End concept checking
126 #endif
127 
128 protected:
130  virtual ~SimpleContourExtractorImageFilter() ITK_OVERRIDE {}
131  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
132 
146  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
147  ThreadIdType threadId) ITK_OVERRIDE;
148 
149 private:
150  ITK_DISALLOW_COPY_AND_ASSIGN(SimpleContourExtractorImageFilter);
151 
156 };
157 } // end namespace itk
158 
159 #ifndef ITK_MANUAL_INSTANTIATION
160 #include "itkSimpleContourExtractorImageFilter.hxx"
161 #endif
162 
163 #endif
Computes an image of contours which will be the contour of the first image.
TInputImage::PixelType InputPixelType
TOutputImage::PixelType OutputPixelType
Base class for all process objects that output image data.
BoxImageFilter< InputImageType, OutputImageType > Superclass
A base class for all the filters working on a box neighborhood.
NumericTraits< InputPixelType >::RealType InputRealType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Define additional traits for native types such as int or float.
#define itkConceptMacro(name, concept)