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

itkAutoCropLabelMapFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkAutoCropLabelMapFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-07-20 23:05:58 $
00007   Version:   $Revision: 1.2 $
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 __itkAutoCropLabelMapFilter_h
00021 #define __itkAutoCropLabelMapFilter_h
00022 
00023 #include "itkChangeRegionLabelMapFilter.h"
00024 
00025 namespace itk
00026 {
00027   
00044 template <class TInputImage>
00045 class ITK_EXPORT AutoCropLabelMapFilter :
00046     public ChangeRegionLabelMapFilter<TInputImage>
00047 {
00048 public:
00050   typedef AutoCropLabelMapFilter                   Self;
00051   typedef ChangeRegionLabelMapFilter<TInputImage>  Superclass;
00052   typedef SmartPointer<Self>                       Pointer;
00053   typedef SmartPointer<const Self>                 ConstPointer;
00054 
00056   itkNewMacro(Self);  
00057 
00059   itkTypeMacro(AutoCropLabelMapFilter, ChangeRegionImageFilter);
00060 
00062   typedef typename Superclass::OutputImageType       OutputImageType;
00063   typedef typename Superclass::OutputImagePointer    OutputImagePointer;
00064   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00065   typedef typename Superclass::OutputImagePixelType  OutputImagePixelType;
00066 
00068   typedef TInputImage                              InputImageType;
00069   typedef typename InputImageType::Pointer         InputImagePointer;
00070   typedef typename InputImageType::ConstPointer    InputImageConstPointer;
00071   typedef typename InputImageType::RegionType      InputImageRegionType; 
00072   typedef typename InputImageType::PixelType       InputImagePixelType;
00073   typedef typename InputImageType::LabelObjectType LabelObjectType;
00074 
00075   typedef typename InputImageType::PixelType       PixelType;
00076   typedef typename InputImageType::IndexType       IndexType;
00077   typedef typename InputImageType::SizeType        SizeType;
00078   typedef typename InputImageType::RegionType      RegionType;
00079   
00080   typedef TInputImage TOutputImage;
00081   
00083   itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
00084   itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
00085   itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension);
00087 
00088 
00092   itkSetMacro(CropBorder, SizeType);
00093   itkGetConstReferenceMacro(CropBorder, SizeType);
00095 
00096 protected:
00097   AutoCropLabelMapFilter();
00098   ~AutoCropLabelMapFilter() {};
00099 
00100   void PrintSelf(std::ostream& os, Indent indent) const;
00101 
00102   virtual void GenerateOutputInformation();
00103 
00104 private:
00105   AutoCropLabelMapFilter(const Self&); //purposely not implemented
00106   void operator=(const Self&); //purposely not implemented
00107 
00108   void FindBoundingBox();
00109   void SetAndPadCropRegion();
00110 
00111   SizeType      m_CropBorder;
00112   TimeStamp     m_CropTimeStamp;
00113 
00114   IndexType     m_MinIndex;
00115   IndexType     m_MaxIndex;
00116 };
00117 
00118 } // end namespace itk
00119 
00120 #ifndef ITK_MANUAL_INSTANTIATION
00121 #include "itkAutoCropLabelMapFilter.txx"
00122 #endif
00123 
00124 #endif
00125 

Generated at Tue Sep 15 02:11:08 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000