ITK  5.2.0
Insight Toolkit
itkAutoCropLabelMapFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 /*=========================================================================
19  *
20  * Portions of this file are subject to the VTK Toolkit Version 3 copyright.
21  *
22  * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
23  *
24  * For complete copyright, license and disclaimer of warranty information
25  * please refer to the NOTICE file at the top of the ITK source tree.
26  *
27  *=========================================================================*/
28 #ifndef itkAutoCropLabelMapFilter_h
29 #define itkAutoCropLabelMapFilter_h
30 
32 
33 namespace itk
34 {
52 template <typename TInputImage>
53 class ITK_TEMPLATE_EXPORT AutoCropLabelMapFilter : public ChangeRegionLabelMapFilter<TInputImage>
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_MOVE(AutoCropLabelMapFilter);
57 
63 
65  itkNewMacro(Self);
66 
68  itkTypeMacro(AutoCropLabelMapFilter, ChangeRegionImageFilter);
69 
71  using OutputImageType = typename Superclass::OutputImageType;
72  using OutputImagePointer = typename Superclass::OutputImagePointer;
73  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
74  using OutputImagePixelType = typename Superclass::OutputImagePixelType;
75 
77  using InputImageType = TInputImage;
78  using InputImagePointer = typename InputImageType::Pointer;
79  using InputImageConstPointer = typename InputImageType::ConstPointer;
81  using InputImagePixelType = typename InputImageType::PixelType;
82  using LabelObjectType = typename InputImageType::LabelObjectType;
83 
84  using PixelType = typename InputImageType::PixelType;
88 
89  using TOutputImage = TInputImage;
90 
92  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
93  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
94  static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
95 
99  itkSetMacro(CropBorder, SizeType);
100  itkGetConstReferenceMacro(CropBorder, SizeType);
102 
103 protected:
105  ~AutoCropLabelMapFilter() override = default;
106 
107  void
108  PrintSelf(std::ostream & os, Indent indent) const override;
109 
110  void
111  GenerateOutputInformation() override;
112 
113 private:
115 };
116 } // end namespace itk
117 
118 #ifndef ITK_MANUAL_INSTANTIATION
119 # include "itkAutoCropLabelMapFilter.hxx"
120 #endif
121 
122 #endif
itk::AutoCropLabelMapFilter::IndexType
typename InputImageType::IndexType IndexType
Definition: itkAutoCropLabelMapFilter.h:85
itk::AutoCropLabelMapFilter::OutputImagePixelType
typename Superclass::OutputImagePixelType OutputImagePixelType
Definition: itkAutoCropLabelMapFilter.h:74
itk::AutoCropLabelMapFilter::m_CropBorder
SizeType m_CropBorder
Definition: itkAutoCropLabelMapFilter.h:114
itk::AutoCropLabelMapFilter::TOutputImage
TInputImage TOutputImage
Definition: itkAutoCropLabelMapFilter.h:89
itk::AutoCropLabelMapFilter::OutputImageRegionType
typename Superclass::OutputImageRegionType OutputImageRegionType
Definition: itkAutoCropLabelMapFilter.h:73
itk::AutoCropLabelMapFilter::InputImageType
TInputImage InputImageType
Definition: itkAutoCropLabelMapFilter.h:77
itk::ChangeRegionLabelMapFilter
Change the region of a label map.
Definition: itkChangeRegionLabelMapFilter.h:56
itk::AutoCropLabelMapFilter::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkAutoCropLabelMapFilter.h:79
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::AutoCropLabelMapFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkAutoCropLabelMapFilter.h:78
itk::AutoCropLabelMapFilter::LabelObjectType
typename InputImageType::LabelObjectType LabelObjectType
Definition: itkAutoCropLabelMapFilter.h:82
itk::AutoCropLabelMapFilter
Crop a LabelMap image to fit exactly the objects in the LabelMap.
Definition: itkAutoCropLabelMapFilter.h:53
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::AutoCropLabelMapFilter::OutputImageType
typename Superclass::OutputImageType OutputImageType
Definition: itkAutoCropLabelMapFilter.h:71
itk::AutoCropLabelMapFilter::RegionType
typename InputImageType::RegionType RegionType
Definition: itkAutoCropLabelMapFilter.h:87
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::AutoCropLabelMapFilter::OutputImagePointer
typename Superclass::OutputImagePointer OutputImagePointer
Definition: itkAutoCropLabelMapFilter.h:72
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::AutoCropLabelMapFilter::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition: itkAutoCropLabelMapFilter.h:81
itk::AutoCropLabelMapFilter::SizeType
typename InputImageType::SizeType SizeType
Definition: itkAutoCropLabelMapFilter.h:86
itkChangeRegionLabelMapFilter.h
itk::AutoCropLabelMapFilter::PixelType
typename InputImageType::PixelType PixelType
Definition: itkAutoCropLabelMapFilter.h:84
itk::AutoCropLabelMapFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkAutoCropLabelMapFilter.h:80