Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkConstantPadImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkConstantPadImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-25 12:27:20 $
00007   Version:   $Revision: 1.19 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkConstantPadImageFilter_h
00018 #define __itkConstantPadImageFilter_h
00019 
00020 #include "itkPadImageFilter.h"
00021 
00022 namespace itk
00023 {
00024 
00038 template <class TInputImage, class TOutputImage>
00039 class ITK_EXPORT ConstantPadImageFilter:
00040     public PadImageFilter<TInputImage,TOutputImage>
00041 {
00042 public:
00044   typedef ConstantPadImageFilter                    Self;
00045   typedef PadImageFilter<TInputImage,TOutputImage>  Superclass;
00046   typedef SmartPointer<Self>                        Pointer;
00047   typedef SmartPointer<const Self>                  ConstPointer;
00048 
00050   itkNewMacro(Self); 
00051 
00053   itkTypeMacro(ConstantPadImageFilter, PadImageFilter);
00054 
00056   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00057   typedef typename Superclass::InputImageRegionType  InputImageRegionType;
00058 
00060   typedef typename Superclass::OutputImagePixelType OutputImagePixelType;
00061   typedef typename Superclass::InputImagePixelType  InputImagePixelType;
00062 
00064   typedef typename Superclass::OutputImageIndexType OutputImageIndexType;
00065   typedef typename Superclass::InputImageIndexType  InputImageIndexType;
00066   typedef typename Superclass::OutputImageSizeType  OutputImageSizeType;
00067   typedef typename Superclass::InputImageSizeType   InputImageSizeType;
00068 
00070   itkStaticConstMacro(ImageDimension, unsigned int,
00071                       TInputImage::ImageDimension);
00072   itkStaticConstMacro(OutputImageDimension, unsigned int,
00073                       TOutputImage::ImageDimension);
00075 
00077   itkSetMacro(Constant, OutputImagePixelType);
00078   itkGetConstMacro(Constant, OutputImagePixelType);
00080 
00081 #ifdef ITK_USE_CONCEPT_CHECKING
00082 
00083   itkConceptMacro(OutputEqualityComparableCheck,
00084     (Concept::EqualityComparable<OutputImagePixelType>));
00085   itkConceptMacro(InputConvertibleToOutputCheck,
00086     (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00087   itkConceptMacro(SameDimensionCheck,
00088     (Concept::SameDimension<ImageDimension, OutputImageDimension>));
00089   itkConceptMacro(OutputOStreamWritableCheck,
00090     (Concept::OStreamWritable<OutputImagePixelType>));
00091 
00093 #endif
00094 
00095 protected:
00096   ConstantPadImageFilter();
00097   ~ConstantPadImageFilter() {};
00098   void PrintSelf(std::ostream& os, Indent indent) const;
00099   
00109   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00110                             int threadId );
00111 
00117   int GenerateNextRegion(long *regIndices, long *regLimit, 
00118                          OutputImageIndexType *indices, 
00119                          OutputImageSizeType *sizes, 
00120                          OutputImageRegionType& outputRegion);
00121 
00122 private:
00123   ConstantPadImageFilter(const Self&); //purposely not implemented
00124   void operator=(const Self&); //purposely not implemented
00125 
00126   OutputImagePixelType m_Constant;
00127 };
00128 
00129   
00130 } // end namespace itk
00131   
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkConstantPadImageFilter.txx"
00134 #endif
00135   
00136 #endif
00137 

Generated at Mon Jul 12 2010 18:07:27 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000