ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkZeroCrossingImageFilter.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 itkZeroCrossingImageFilter_h
19 #define itkZeroCrossingImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 namespace itk
23 {
62 template< typename TInputImage, typename TOutputImage >
64  public ImageToImageFilter< TInputImage, TOutputImage >
65 {
66 public:
70 
72  typedef TInputImage InputImageType;
73  typedef TOutputImage OutputImageType;
74 
78 
80  typedef typename TInputImage::PixelType InputImagePixelType;
81  typedef typename TOutputImage::PixelType OutputImagePixelType;
82 
84  itkNewMacro(Self);
85 
87  typedef typename TOutputImage::RegionType OutputImageRegionType;
88 
91 
93  itkStaticConstMacro(ImageDimension, unsigned int,
94  TInputImage::ImageDimension);
95  itkStaticConstMacro(OutputImageDimension, unsigned int,
96  TOutputImage::ImageDimension);
98 
107  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
108 
110  itkSetMacro(ForegroundValue, OutputImagePixelType);
111  itkGetConstMacro(ForegroundValue, OutputImagePixelType);
113 
115  itkSetMacro(BackgroundValue, OutputImagePixelType);
116  itkGetConstMacro(BackgroundValue, OutputImagePixelType);
118 
119 #ifdef ITK_USE_CONCEPT_CHECKING
120  // Begin concept checking
121  itkConceptMacro( OutputEqualityComparableCheck,
123  itkConceptMacro( SameDimensionCheck,
125  itkConceptMacro( InputComparableCheck,
127  itkConceptMacro( OutputOStreamWritableCheck,
129  // End concept checking
130 #endif
131 
132 protected:
134  {
137  }
138 
140  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
141 
142  OutputImagePixelType m_BackgroundValue;
143  OutputImagePixelType m_ForegroundValue;
144 
156  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
157  ThreadIdType threadId) ITK_OVERRIDE;
158 
159 private:
160  ZeroCrossingImageFilter(const Self &); //purposely not implemented
161  void operator=(const Self &); //purposely not implemented
162 
163 };
164 } //end of namespace itk
165 
166 #ifndef ITK_MANUAL_INSTANTIATION
167 #include "itkZeroCrossingImageFilter.hxx"
168 #endif
169 
170 #endif
void operator=(const Self &)
static const unsigned int OutputImageDimension
virtual void GenerateInputRequestedRegion() override
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Base class for all process objects that output image data.
static const unsigned int ImageDimension
TOutputImage::PixelType OutputImagePixelType
void PrintSelf(std::ostream &os, Indent indent) const override
OutputImageType::PixelType OutputImagePixelType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
Base class for filters that take an image as input and produce an image as output.
This filter finds the closest pixel to the zero-crossings (sign changes) in a signed itk::Image...
OutputImageType::RegionType OutputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
TInputImage::PixelType InputImagePixelType
TOutputImage::RegionType OutputImageRegionType
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
#define itkConceptMacro(name, concept)
SmartPointer< const Self > ConstPointer