ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkSobelEdgeDetectionImageFilter.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 itkSobelEdgeDetectionImageFilter_h
19 #define itkSobelEdgeDetectionImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkImage.h"
23 
24 namespace itk
25 {
49 template< typename TInputImage, typename TOutputImage >
51  public ImageToImageFilter< TInputImage, TOutputImage >
52 {
53 public:
59 
64  typedef typename TOutputImage::PixelType OutputPixelType;
65  typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
66  typedef typename TInputImage::PixelType InputPixelType;
67  typedef typename TInputImage::InternalPixelType InputInternalPixelType;
68  itkStaticConstMacro(ImageDimension, unsigned int,
69  TOutputImage::ImageDimension);
70  itkStaticConstMacro(InputImageDimension, unsigned int,
71  TInputImage::ImageDimension);
73 
77  typedef TInputImage InputImageType;
78  typedef TOutputImage OutputImageType;
79  typedef typename InputImageType::Pointer InputImagePointer;
80 
86 
91 
95  itkNewMacro(Self);
96 
106  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
107 
108 #ifdef ITK_USE_CONCEPT_CHECKING
109  // Begin concept checking
110  itkConceptMacro( SameDimensionCheck,
112  itkConceptMacro( OutputHasNumericTraitsCheck,
114 
115 #ifdef ITK_USE_STRICT_CONCEPT_CHECKING
116  itkConceptMacro( OutputPixelIsFloatingPointCheck,
118 #endif
119 
120  // End concept checking
121 #endif
122 
123 protected:
126 
134  void GenerateData() ITK_OVERRIDE;
135 
136  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE
137  {
138  Superclass::PrintSelf(os, indent);
139  }
140 
141 private:
142  SobelEdgeDetectionImageFilter(const Self &); //purposely not implemented
143  void operator=(const Self&); //purposely not implemented
144 
145 };
146 } // end namespace itk
147 
148 #ifndef ITK_MANUAL_INSTANTIATION
149 #include "itkSobelEdgeDetectionImageFilter.hxx"
150 #endif
151 
152 #endif
virtual void PrintSelf(std::ostream &os, Indent indent) const override
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Base class for all process objects that output image data.
virtual void GenerateInputRequestedRegion() override
TOutputImage::InternalPixelType OutputInternalPixelType
Base class for filters that take an image as input and produce an image as output.
TInputImage::InternalPixelType InputInternalPixelType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
A 2D or 3D edge detection using the Sobel operator.
void PrintSelf(std::ostream &os, Indent indent) const override