ITK  4.9.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 >
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 
85  typedef typename InputImageType::SizeType InputSizeType;
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:
131  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
132 
144  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
145  ThreadIdType threadId) ITK_OVERRIDE;
146 
147 private:
148  SimpleContourExtractorImageFilter(const Self &) ITK_DELETE_FUNCTION;
149  void operator=(const Self &) ITK_DELETE_FUNCTION;
150 
155 };
156 } // end namespace itk
157 
158 #ifndef ITK_MANUAL_INSTANTIATION
159 #include "itkSimpleContourExtractorImageFilter.hxx"
160 #endif
161 
162 #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
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
A base class for all the filters working on a box neighborhood.
NumericTraits< InputPixelType >::RealType InputRealType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
void PrintSelf(std::ostream &os, Indent indent) const override
Define additional traits for native types such as int or float.
#define itkConceptMacro(name, concept)