ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkBinomialBlurImageFilter.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 __itkBinomialBlurImageFilter_h
00019 #define __itkBinomialBlurImageFilter_h
00020 
00021 #include "itkImageFunction.h"
00022 #include "itkImageRegionIterator.h"
00023 #include "itkImageToImageFilter.h"
00024 #include "itkSize.h"
00025 
00026 namespace itk
00027 {
00042 template< class TInputImage, class TOutputImage >
00043 class ITK_EXPORT BinomialBlurImageFilter:
00044   public ImageToImageFilter< TInputImage, TOutputImage >
00045 {
00046 public:
00048   typedef BinomialBlurImageFilter                         Self;
00049   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00050   typedef SmartPointer< Self >                            Pointer;
00051   typedef SmartPointer< const Self >                      ConstPointer;
00052 
00054   itkNewMacro(Self);
00055 
00057   itkTypeMacro(BinomialBlurImageFilter, ImageToImageFilter);
00058 
00060   itkStaticConstMacro(NDimensions, unsigned int, TInputImage::ImageDimension);
00061   itkStaticConstMacro(NOutputDimensions, unsigned int, TOutputImage::ImageDimension);
00063 
00065   typedef TInputImage                           InputImageType;
00066   typedef TOutputImage                          OutputImageType;
00067   typedef typename OutputImageType::Pointer     OutputImagePointer;
00068   typedef typename InputImageType::Pointer      InputImagePointer;
00069   typedef typename InputImageType::ConstPointer InputImageConstPointer;
00070 
00072   typedef Size< itkGetStaticConstMacro(NDimensions) > SizeType;
00073 
00075   typedef typename TOutputImage::IndexType IndexType;
00076 
00078   typedef typename TOutputImage::PixelType PixelType;
00079 
00081   typedef typename TOutputImage::RegionType OutputImageRegionType;
00082 
00084   itkSetMacro(Repetitions, unsigned int);
00085   itkGetConstMacro(Repetitions, unsigned int);
00087 
00092   void GenerateInputRequestedRegion();
00093 
00094 #ifdef ITK_USE_CONCEPT_CHECKING
00095 
00096   itkConceptMacro( SameDimensionCheck,
00097                    ( Concept::SameDimension< itkGetStaticConstMacro(NDimensions),
00098                                              itkGetStaticConstMacro(NOutputDimensions) > ) );
00099   itkConceptMacro( InputConvertibleToDoubleCheck,
00100                    ( Concept::Convertible< typename TInputImage::PixelType, double > ) );
00101   itkConceptMacro( DoubleConvertibleToOutputCheck,
00102                    ( Concept::Convertible< double, PixelType > ) );
00103 
00105 #endif
00106 protected:
00107   BinomialBlurImageFilter();
00108   virtual ~BinomialBlurImageFilter() {}
00109   void PrintSelf(std::ostream & os, Indent indent) const;
00111 
00113   void GenerateData();
00114 
00115 private:
00116   BinomialBlurImageFilter(const Self &); //purposely not implemented
00117   void operator=(const Self &);          //purposely not implemented
00118 
00120   unsigned int m_Repetitions;
00121 };
00122 } // end namespace itk
00123 
00124 #ifndef ITK_MANUAL_INSTANTIATION
00125 #include "itkBinomialBlurImageFilter.hxx"
00126 #endif
00127 
00128 #endif
00129