18 #ifndef __itkPSMTrimLabelMapImageFilter_h 19 #define __itkPSMTrimLabelMapImageFilter_h 21 #include "itkImageToImageFilter.h" 60 template<
class TImage>
62 public ImageToImageFilter<TImage, TImage>
67 typedef ImageToImageFilter< TImage, TImage > Superclass;
68 typedef SmartPointer< Self > Pointer;
69 typedef SmartPointer< const Self > ConstPointer;
73 typedef typename ImageType::PixelType PixelType;
74 typedef typename ImageType::PointType PointType;
75 typedef typename ImageType::RegionType RegionType;
76 typedef typename RegionType::SizeType SizeType;
77 typedef typename RegionType::IndexType IndexType;
86 itkStaticConstMacro(Dimension,
unsigned int, TImage::ImageDimension);
95 itkSetMacro(ForegroundValue,PixelType);
96 itkGetMacro(ForegroundValue,PixelType);
101 itkSetMacro(BackgroundValue,PixelType);
102 itkGetMacro(BackgroundValue,PixelType);
109 return m_BoundingBox;
115 void PrintSelf(std::ostream & os, Indent indent)
const;
120 void IsolateLargestComponent(ImageType *)
const;
123 void FillHoles(ImageType *)
const;
127 void Center(ImageType *)
const;
132 void Crop(ImageType *);
138 virtual void GenerateOutputInformation();
144 virtual void GenerateInputRequestedRegion();
149 void operator=(
const Self &);
151 RegionType m_BoundingBox;
152 PixelType m_ForegroundValue;
153 PixelType m_BackgroundValue;
157 #ifndef ITK_MANUAL_INSTANTIATION 158 #include "itkPSMTrimLabelMapImageFilter.hxx"
const RegionType & GetBoundingBox() const
PSMTrimLabelMapImageFilter Self
Process an input segmentation to produce an automatically cropped version with holes filled and cente...