Orfeo Toolbox  3.16
itkAutoCropLabelMapFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkAutoCropLabelMapFilter.h,v $
5  Language: C++
6  Date: $Date: 2010-07-07 12:31:09 $
7  Version: $Revision: 1.5 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  Portions of this code are covered under the VTK copyright.
13  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
14 
15  This software is distributed WITHOUT ANY WARRANTY; without even
16  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
17  PURPOSE. See the above copyright notices for more information.
18 
19 =========================================================================*/
20 #ifndef __itkAutoCropLabelMapFilter_h
21 #define __itkAutoCropLabelMapFilter_h
22 
24 
25 namespace itk
26 {
27 
44 template <class TInputImage>
46  public ChangeRegionLabelMapFilter<TInputImage>
47 {
48 public:
54 
56  itkNewMacro(Self);
57 
59  itkTypeMacro(AutoCropLabelMapFilter, ChangeRegionImageFilter);
60 
62  typedef typename Superclass::OutputImageType OutputImageType;
63  typedef typename Superclass::OutputImagePointer OutputImagePointer;
64  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
65  typedef typename Superclass::OutputImagePixelType OutputImagePixelType;
66 
68  typedef TInputImage InputImageType;
69  typedef typename InputImageType::Pointer InputImagePointer;
70  typedef typename InputImageType::ConstPointer InputImageConstPointer;
71  typedef typename InputImageType::RegionType InputImageRegionType;
72  typedef typename InputImageType::PixelType InputImagePixelType;
73  typedef typename InputImageType::LabelObjectType LabelObjectType;
74 
75  typedef typename InputImageType::PixelType PixelType;
76  typedef typename InputImageType::IndexType IndexType;
77  typedef typename InputImageType::SizeType SizeType;
78  typedef typename InputImageType::RegionType RegionType;
79 
80  typedef TInputImage TOutputImage;
81 
83  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
84  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
85  itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension);
86 
87 
91  itkSetMacro(CropBorder, SizeType);
92  itkGetConstReferenceMacro(CropBorder, SizeType);
93 
94  itkGetConstReferenceMacro(MinIndex, IndexType);
95  itkGetConstReferenceMacro(MaxIndex, IndexType);
96 
97 protected:
100 
101  void PrintSelf(std::ostream& os, Indent indent) const;
102 
103  virtual void GenerateOutputInformation();
104 
105 private:
106  AutoCropLabelMapFilter(const Self&); //purposely not implemented
107  void operator=(const Self&); //purposely not implemented
108 
109  void FindBoundingBox();
110  void SetAndPadCropRegion();
111 
114 
117 
119 };
120 
121 } // end namespace itk
122 
123 #ifndef ITK_MANUAL_INSTANTIATION
125 #endif
126 
127 #endif

Generated at Sat Feb 2 2013 23:24:49 for Orfeo Toolbox with doxygen 1.8.1.1