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

itkCropLabelMapFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkCropLabelMapFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-07-22 23:59:29 $
00007   Version:   $Revision: 1.1 $
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   Portions of this code are covered under the VTK copyright.
00013   See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
00014 
00015      This software is distributed WITHOUT ANY WARRANTY; without even 
00016      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00017      PURPOSE.  See the above copyright notices for more information.
00018 
00019 =========================================================================*/
00020 #ifndef __itkCropLabelMapFilter_h
00021 #define __itkCropLabelMapFilter_h
00022 
00023 #include "itkChangeRegionLabelMapFilter.h"
00024 
00025 namespace itk
00026 {
00027   
00046 template <class TInputImage>
00047 class ITK_EXPORT CropLabelMapFilter : public ChangeRegionLabelMapFilter<TInputImage>
00048 {
00049 public:
00051   typedef CropLabelMapFilter                       Self;
00052   typedef ChangeRegionLabelMapFilter<TInputImage>  Superclass;
00053   typedef SmartPointer<Self>                       Pointer;
00054   typedef SmartPointer<const Self>                 ConstPointer; 
00055 
00057   itkTypeMacro(CropLabelMapFilter, ChangeRegionImageFilter);
00058 
00060   itkNewMacro(Self);  
00061 
00063   typedef typename Superclass::OutputImageType       OutputImageType;
00064   typedef typename Superclass::OutputImagePointer    OutputImagePointer;
00065   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00066   typedef typename Superclass::OutputImagePixelType  OutputImagePixelType;
00067 
00069   typedef TInputImage                              InputImageType;
00070   typedef typename InputImageType::Pointer         InputImagePointer;
00071   typedef typename InputImageType::ConstPointer    InputImageConstPointer;
00072   typedef typename InputImageType::RegionType      InputImageRegionType; 
00073   typedef typename InputImageType::PixelType       InputImagePixelType;
00074   typedef typename InputImageType::LabelObjectType LabelObjectType;
00075 
00076   typedef typename InputImageType::PixelType       PixelType;
00077   typedef typename InputImageType::IndexType       IndexType;
00078   typedef typename InputImageType::SizeType        SizeType;
00079   typedef typename InputImageType::RegionType      RegionType;
00080   
00081   typedef TInputImage TOutputImage;
00082   
00084   itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
00085   itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
00086   itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension);
00088 
00090   itkSetMacro(UpperBoundaryCropSize, SizeType);
00091   itkGetMacro(UpperBoundaryCropSize, SizeType); 
00092   itkSetMacro(LowerBoundaryCropSize, SizeType);
00093   itkGetMacro(LowerBoundaryCropSize, SizeType);
00095 
00096   void SetCropSize( const SizeType & size )
00097     {
00098     this->SetUpperBoundaryCropSize( size );
00099     this->SetLowerBoundaryCropSize( size );
00100     }
00101 
00102 protected:
00103   CropLabelMapFilter()
00104     {
00105     m_UpperBoundaryCropSize.Fill(0);
00106     m_LowerBoundaryCropSize.Fill(0);
00107     }
00108   ~CropLabelMapFilter() {};
00109 
00110   virtual void GenerateOutputInformation();
00111 
00112   void PrintSelf(std::ostream& os, Indent indent) const;
00113 
00114 private:
00115   CropLabelMapFilter(const Self&); //purposely not implemented
00116   void operator=(const Self&); //purposely not implemented
00117 
00118   SizeType m_UpperBoundaryCropSize;
00119   SizeType m_LowerBoundaryCropSize;
00120 };
00121 
00122 } // end namespace itk
00123 
00124 #ifndef ITK_MANUAL_INSTANTIATION
00125 #include "itkCropLabelMapFilter.txx"
00126 #endif
00127 
00128 #endif
00129 

Generated at Fri Apr 16 18:11:29 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000