itkAutoCropLabelMapFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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&);
00106 void operator=(const Self&);
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 }
00119
00120 #ifndef ITK_MANUAL_INSTANTIATION
00121 #include "itkAutoCropLabelMapFilter.txx"
00122 #endif
00123
00124 #endif
00125