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: 2010-07-07 12:31:09 $
00007   Version:   $Revision: 1.5 $
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   itkGetConstReferenceMacro(MinIndex, IndexType);
00097   itkGetConstReferenceMacro(MaxIndex, IndexType);
00098 
00099 protected:
00100   AutoCropLabelMapFilter();
00101   ~AutoCropLabelMapFilter() {};
00102 
00103   void PrintSelf(std::ostream& os, Indent indent) const;
00104 
00105   virtual void GenerateOutputInformation();
00106 
00107 private:
00108   AutoCropLabelMapFilter(const Self&); //purposely not implemented
00109   void operator=(const Self&); //purposely not implemented
00110 
00111   void FindBoundingBox();
00112   void SetAndPadCropRegion();
00113 
00114   SizeType      m_CropBorder;
00115   TimeStamp     m_CropTimeStamp;
00116 
00117   IndexType     m_MinIndex;
00118   IndexType     m_MaxIndex;
00119   
00120   InputImageRegionType m_CropRegion;
00121 };
00122 
00123 } // end namespace itk
00124 
00125 #ifndef ITK_MANUAL_INSTANTIATION
00126 #include "itkAutoCropLabelMapFilter.txx"
00127 #endif
00128 
00129 #endif
00130 

Generated at Mon Jul 12 2010 17:45:26 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000