ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkLaplacianImageFilter.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 __itkLaplacianImageFilter_h
00019 #define __itkLaplacianImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 
00023 namespace itk
00024 {
00061 template< class TInputImage, class TOutputImage >
00062 class ITK_EXPORT LaplacianImageFilter:
00063   public ImageToImageFilter< TInputImage, TOutputImage >
00064 {
00065 public:
00066 
00068   typedef LaplacianImageFilter                            Self;
00069   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00070 
00073   typedef typename TOutputImage::PixelType         OutputPixelType;
00074   typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
00075   typedef typename TInputImage::PixelType          InputPixelType;
00076   typedef typename TInputImage::InternalPixelType  InputInternalPixelType;
00077   itkStaticConstMacro(InputImageDimension, unsigned int,
00078                       TInputImage::ImageDimension);
00079   itkStaticConstMacro(ImageDimension, unsigned int,
00080                       TOutputImage::ImageDimension);
00082 
00084   typedef TInputImage                      InputImageType;
00085   typedef TOutputImage                     OutputImageType;
00086   typedef typename InputImageType::Pointer InputImagePointer;
00087 
00089   typedef SmartPointer< Self >       Pointer;
00090   typedef SmartPointer< const Self > ConstPointer;
00091 
00093   itkTypeMacro(LaplacianImageFilter, ImageToImageFilter);
00094 
00096   itkNewMacro(Self);
00097 
00105   virtual void GenerateInputRequestedRegion()
00106   throw( InvalidRequestedRegionError );
00107 
00111   itkBooleanMacro( UseImageSpacing );
00112 
00115   itkSetMacro(UseImageSpacing, bool);
00116   itkGetConstMacro(UseImageSpacing, bool);
00118 
00119 #ifdef ITK_USE_CONCEPT_CHECKING
00120 
00121   itkConceptMacro( SameDimensionCheck,
00122                    ( Concept::SameDimension< InputImageDimension, ImageDimension > ) );
00123   itkConceptMacro( InputPixelTypeIsFloatingPointCheck,
00124                    ( Concept::IsFloatingPoint< InputPixelType > ) );
00125   itkConceptMacro( OutputPixelTypeIsFloatingPointCheck,
00126                    ( Concept::IsFloatingPoint< OutputPixelType > ) );
00127 
00129 #endif
00130 protected:
00131   LaplacianImageFilter()
00132   {
00133     m_UseImageSpacing = true;
00134   }
00135 
00136   virtual ~LaplacianImageFilter()  {}
00137 
00143   void GenerateData();
00144 
00145   void PrintSelf(std::ostream &, Indent) const;
00146 private:
00147   LaplacianImageFilter(const Self &); //purposely not implemented
00148   void operator=(const Self &);       //purposely not implemented
00149 
00150   bool m_UseImageSpacing;
00151 };
00152 } // end namespace itk
00153 
00154 #ifndef ITK_MANUAL_INSTANTIATION
00155 #include "itkLaplacianImageFilter.hxx"
00156 #endif
00157 
00158 #endif
00159