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 __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&);
00116 void operator=(const Self&);
00117
00118 SizeType m_UpperBoundaryCropSize;
00119 SizeType m_LowerBoundaryCropSize;
00120 };
00121
00122 }
00123
00124 #ifndef ITK_MANUAL_INSTANTIATION
00125 #include "itkCropLabelMapFilter.txx"
00126 #endif
00127
00128 #endif
00129