ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkLaplacianSharpeningImageFilter.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 __itkLaplacianSharpeningImageFilter_h
00019 #define __itkLaplacianSharpeningImageFilter_h
00020 
00021 #include "itkNumericTraits.h"
00022 #include "itkImageToImageFilter.h"
00023 
00024 namespace itk
00025 {
00052 template< class TInputImage, class TOutputImage >
00053 class ITK_EXPORT LaplacianSharpeningImageFilter:
00054   public ImageToImageFilter< TInputImage, TOutputImage >
00055 {
00056 public:
00057 
00059   typedef LaplacianSharpeningImageFilter                  Self;
00060   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00061 
00064   typedef typename TOutputImage::PixelType                    OutputPixelType;
00065   typedef typename TOutputImage::InternalPixelType            OutputInternalPixelType;
00066   typedef typename NumericTraits< OutputPixelType >::RealType RealType;
00067   typedef typename TInputImage::PixelType                     InputPixelType;
00068   typedef typename TInputImage::InternalPixelType             InputInternalPixelType;
00069   itkStaticConstMacro(ImageDimension, unsigned int,
00070                       TOutputImage::ImageDimension);
00071 
00073   typedef TInputImage                      InputImageType;
00074   typedef TOutputImage                     OutputImageType;
00075   typedef typename InputImageType::Pointer InputImagePointer;
00076 
00078   typedef SmartPointer< Self >       Pointer;
00079   typedef SmartPointer< const Self > ConstPointer;
00080 
00082   itkTypeMacro(LaplacianSharpeningImageFilter, ImageToImageFilter);
00083 
00085   itkNewMacro(Self);
00086 
00095   virtual void GenerateInputRequestedRegion()
00096   throw( InvalidRequestedRegionError );
00097 
00101   itkBooleanMacro( UseImageSpacing );
00102 
00105   itkSetMacro(UseImageSpacing, bool);
00106   itkGetConstMacro(UseImageSpacing, bool);
00108 
00109 protected:
00110   LaplacianSharpeningImageFilter()
00111   {
00112     m_UseImageSpacing = true;
00113   }
00114 
00115   virtual ~LaplacianSharpeningImageFilter()  {}
00116 
00122   void GenerateData();
00123 
00124   void PrintSelf(std::ostream &, Indent) const;
00125 private:
00126   LaplacianSharpeningImageFilter(const Self &); //purposely not implemented
00127   void operator=(const Self &);                 //purposely not implemented
00128 
00129   bool m_UseImageSpacing;
00130 };
00131 } // end namespace itk
00132 
00133 #ifndef ITK_MANUAL_INSTANTIATION
00134 #include "itkLaplacianSharpeningImageFilter.hxx"
00135 #endif
00136 
00137 #endif
00138