ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkSobelEdgeDetectionImageFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkSobelEdgeDetectionImageFilter_h
00019 #define __itkSobelEdgeDetectionImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 #include "itkImage.h"
00023 
00024 namespace itk
00025 {
00049 template< class TInputImage, class TOutputImage >
00050 class ITK_EXPORT SobelEdgeDetectionImageFilter:
00051   public ImageToImageFilter< TInputImage, TOutputImage >
00052 {
00053 public:
00057   typedef SobelEdgeDetectionImageFilter                   Self;
00058   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00059 
00064   typedef typename TOutputImage::PixelType         OutputPixelType;
00065   typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
00066   typedef typename TInputImage::PixelType          InputPixelType;
00067   typedef typename TInputImage::InternalPixelType  InputInternalPixelType;
00068   itkStaticConstMacro(ImageDimension, unsigned int,
00069                       TOutputImage::ImageDimension);
00070   itkStaticConstMacro(InputImageDimension, unsigned int,
00071                       TInputImage::ImageDimension);
00073 
00077   typedef TInputImage                      InputImageType;
00078   typedef TOutputImage                     OutputImageType;
00079   typedef typename InputImageType::Pointer InputImagePointer;
00080 
00084   typedef SmartPointer< Self >       Pointer;
00085   typedef SmartPointer< const Self > ConstPointer;
00086 
00090   itkTypeMacro(SobelEdgeDetectionImageFilter, ImageToImageFilter);
00091 
00095   itkNewMacro(Self);
00096 
00106   virtual void GenerateInputRequestedRegion()
00107   throw( InvalidRequestedRegionError );
00108 
00109 #ifdef ITK_USE_CONCEPT_CHECKING
00110 
00111   itkConceptMacro( SameDimensionCheck,
00112                    ( Concept::SameDimension< InputImageDimension, ImageDimension > ) );
00113   itkConceptMacro( OutputHasNumericTraitsCheck,
00114                    ( Concept::HasNumericTraits< OutputPixelType > ) );
00116 
00117 #ifdef ITK_USE_STRICT_CONCEPT_CHECKING
00118   itkConceptMacro( OutputPixelIsFloatingPointCheck,
00119                    ( Concept::IsFloatingPoint< OutputPixelType > ) );
00120 #endif
00121 
00123 #endif
00124 protected:
00125   SobelEdgeDetectionImageFilter() {}
00126   virtual ~SobelEdgeDetectionImageFilter() {}
00128 
00136   void GenerateData();
00137 
00138   void PrintSelf(std::ostream & os, Indent indent) const
00139   {
00140     Superclass::PrintSelf(os, indent);
00141   }
00142 private:
00143   SobelEdgeDetectionImageFilter(const Self &); //purposely not implemented
00144   void operator=(const Self&); //purposely not implemented
00145 
00146 };
00147 } // end namespace itk
00148 
00149 #ifndef ITK_MANUAL_INSTANTIATION
00150 #include "itkSobelEdgeDetectionImageFilter.hxx"
00151 #endif
00152 
00153 #endif
00154