ITK  5.2.0
Insight Toolkit
itkLabelImageToShapeLabelMapFilter.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 #ifndef itkLabelImageToShapeLabelMapFilter_h
19 #define itkLabelImageToShapeLabelMapFilter_h
20 
21 #include "itkShapeLabelObject.h"
23 #include "itkShapeLabelMapFilter.h"
24 
25 namespace itk
26 {
49 template <typename TInputImage,
50  typename TOutputImage =
51  LabelMap<ShapeLabelObject<typename TInputImage::PixelType, TInputImage::ImageDimension>>>
52 class ITK_TEMPLATE_EXPORT LabelImageToShapeLabelMapFilter : public ImageToImageFilter<TInputImage, TOutputImage>
53 {
54 public:
55  ITK_DISALLOW_COPY_AND_ASSIGN(LabelImageToShapeLabelMapFilter);
56 
62 
64  using InputImageType = TInputImage;
65  using InputImagePointer = typename InputImageType::Pointer;
66  using InputImageConstPointer = typename InputImageType::ConstPointer;
68  using InputImagePixelType = typename InputImageType::PixelType;
69 
70  using OutputImageType = TOutputImage;
71  using OutputImagePointer = typename OutputImageType::Pointer;
72  using OutputImageConstPointer = typename OutputImageType::ConstPointer;
74  using OutputImagePixelType = typename OutputImageType::PixelType;
75  using LabelObjectType = typename OutputImageType::LabelObjectType;
76 
78  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
79  static constexpr unsigned int OutputImageDimension = TInputImage::ImageDimension;
80  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
81 
85 
87  itkNewMacro(Self);
88 
91 
92 #ifdef ITK_USE_CONCEPT_CHECKING
93  // Begin concept checking
97  // End concept checking
98 #endif
99 
104  itkSetMacro(BackgroundValue, OutputImagePixelType);
105  itkGetConstMacro(BackgroundValue, OutputImagePixelType);
107 
112  itkSetMacro(ComputeFeretDiameter, bool);
113  itkGetConstReferenceMacro(ComputeFeretDiameter, bool);
114  itkBooleanMacro(ComputeFeretDiameter);
116 
121  itkSetMacro(ComputePerimeter, bool);
122  itkGetConstReferenceMacro(ComputePerimeter, bool);
123  itkBooleanMacro(ComputePerimeter);
125 
131  itkSetMacro(ComputeOrientedBoundingBox, bool);
132  itkGetConstReferenceMacro(ComputeOrientedBoundingBox, bool);
133  itkBooleanMacro(ComputeOrientedBoundingBox);
135 
136 
137 protected:
139  ~LabelImageToShapeLabelMapFilter() override = default;
140  void
141  PrintSelf(std::ostream & os, Indent indent) const override;
142 
145  void
146  GenerateInputRequestedRegion() override;
147 
149  void
150  EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
151 
154  void
155  GenerateData() override;
156 
157 private:
162 }; // end of class
163 } // end namespace itk
164 
165 #ifndef ITK_MANUAL_INSTANTIATION
166 # include "itkLabelImageToShapeLabelMapFilter.hxx"
167 #endif
168 
169 #endif
itkLabelImageToLabelMapFilter.h
itk::LabelImageToShapeLabelMapFilter::m_ComputeOrientedBoundingBox
bool m_ComputeOrientedBoundingBox
Definition: itkLabelImageToShapeLabelMapFilter.h:161
itk::Concept::OStreamWritable
Definition: itkConceptChecking.h:634
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itk::LabelImageToShapeLabelMapFilter::m_BackgroundValue
OutputImagePixelType m_BackgroundValue
Definition: itkLabelImageToShapeLabelMapFilter.h:158
itk::LabelImageToLabelMapFilter
convert a labeled image to a label collection image
Definition: itkLabelImageToLabelMapFilter.h:50
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ShapeLabelMapFilter
The valuator class for the ShapeLabelObject.
Definition: itkShapeLabelMapFilter.h:54
itk::LabelImageToShapeLabelMapFilter::OutputImageConstPointer
typename OutputImageType::ConstPointer OutputImageConstPointer
Definition: itkLabelImageToShapeLabelMapFilter.h:72
itkShapeLabelMapFilter.h
itk::ImageToImageFilter::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition: itkImageToImageFilter.h:133
itkShapeLabelObject.h
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::ImageToImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToImageFilter.h:130
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::LabelImageToShapeLabelMapFilter::LabelObjectType
typename OutputImageType::LabelObjectType LabelObjectType
Definition: itkLabelImageToShapeLabelMapFilter.h:75
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:64
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::LabelImageToShapeLabelMapFilter
Converts a label image to a label map and valuates the shape attributes.
Definition: itkLabelImageToShapeLabelMapFilter.h:52
itk::ImageSource::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkImageSource.h:93
itk::Concept::Convertible
Definition: itkConceptChecking.h:214
itk::LabelImageToShapeLabelMapFilter::m_ComputeFeretDiameter
bool m_ComputeFeretDiameter
Definition: itkLabelImageToShapeLabelMapFilter.h:159
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:86
itk::LabelImageToShapeLabelMapFilter::m_ComputePerimeter
bool m_ComputePerimeter
Definition: itkLabelImageToShapeLabelMapFilter.h:160
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itk::Concept::EqualityComparable
Definition: itkConceptChecking.h:304
itk::ImageToImageFilter::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkImageToImageFilter.h:131
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293