ITK  4.2.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< class TInputImage, class 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 
121  itkConceptMacro( InputHasNumericTraitsCheck,
123  itkConceptMacro( OutputHasNumericTraitsCheck,
125 
127 #endif
128 protected:
131  void PrintSelf(std::ostream & os, Indent indent) const;
133 
145  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
146  ThreadIdType threadId);
147 
148 private:
149  SimpleContourExtractorImageFilter(const Self &); //purposely not implemented
150  void operator=(const Self &); //purposely not implemented
151 
156 };
157 } // end namespace itk
158 
159 #ifndef ITK_MANUAL_INSTANTIATION
160 #include "itkSimpleContourExtractorImageFilter.hxx"
161 #endif
162 
163 #endif
164