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

itkCropImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkCropImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-25 12:27:20 $
00007   Version:   $Revision: 1.10 $
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 __itkCropImageFilter_h
00018 #define __itkCropImageFilter_h
00019 
00020 #include "itkExtractImageFilter.h"
00021 
00022 namespace itk
00023 {
00024 
00037 template <class TInputImage, class TOutputImage>
00038 class ITK_EXPORT CropImageFilter:
00039     public ExtractImageFilter<TInputImage,TOutputImage>
00040 {
00041 public:
00043   typedef CropImageFilter                               Self;
00044   typedef ExtractImageFilter<TInputImage,TOutputImage>  Superclass;
00045   typedef SmartPointer<Self>                            Pointer;
00046   typedef SmartPointer<const Self>                      ConstPointer;
00047 
00049   itkNewMacro(Self);  
00050 
00052   itkTypeMacro(CropImageFilter, ExtractImageFilter);
00053 
00055   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00056   typedef typename Superclass::InputImageRegionType  InputImageRegionType;
00057 
00059   typedef typename Superclass::OutputImagePixelType OutputImagePixelType;
00060   typedef typename Superclass::InputImagePixelType  InputImagePixelType;
00061 
00063   typedef typename Superclass::OutputImageIndexType OutputImageIndexType;
00064   typedef typename Superclass::InputImageIndexType  InputImageIndexType;
00065   typedef typename Superclass::OutputImageSizeType  OutputImageSizeType;
00066   typedef typename Superclass::InputImageSizeType   InputImageSizeType;
00067   typedef InputImageSizeType                        SizeType;
00068 
00070   itkStaticConstMacro(InputImageDimension, unsigned int,
00071                       Superclass::InputImageDimension);
00072   itkStaticConstMacro(OutputImageDimension, unsigned int,
00073                       Superclass::OutputImageDimension);
00075 
00077   itkSetMacro(UpperBoundaryCropSize, SizeType);
00078   itkGetConstMacro(UpperBoundaryCropSize, SizeType); 
00079   itkSetMacro(LowerBoundaryCropSize, SizeType);
00080   itkGetConstMacro(LowerBoundaryCropSize, SizeType);
00082 
00083   void SetBoundaryCropSize(const SizeType & s)
00084     {
00085     this->SetUpperBoundaryCropSize( s );
00086     this->SetLowerBoundaryCropSize( s );
00087     }
00088 
00089 #ifdef ITK_USE_CONCEPT_CHECKING
00090 
00091   itkConceptMacro(InputConvertibleToOutputCheck,
00092     (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00093   itkConceptMacro(SameDimensionCheck,
00094     (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
00095 
00097 #endif
00098 
00099 protected:
00100   CropImageFilter()
00101     {
00102     m_UpperBoundaryCropSize.Fill(0);
00103     m_LowerBoundaryCropSize.Fill(0);
00104     }
00105   ~CropImageFilter() {}
00106   void PrintSelf(std::ostream& os, Indent indent) const;
00107 
00108 
00109   void GenerateOutputInformation();
00110   
00111 private:
00112   CropImageFilter(const Self&); //purposely not implemented
00113   void operator=(const Self&); //purposely not implemented
00114 
00115   SizeType m_UpperBoundaryCropSize;
00116   SizeType m_LowerBoundaryCropSize;
00117 };
00118 
00119   
00120 } // end namespace itk
00121   
00122 #ifndef ITK_MANUAL_INSTANTIATION
00123 #include "itkCropImageFilter.txx"
00124 #endif
00125   
00126 #endif
00127 

Generated at Thu May 28 09:45:14 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000