ITK  6.0.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 * https://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"
24
25namespace itk
26{
47template <typename TInputImage,
48 typename TOutputImage =
50class ITK_TEMPLATE_EXPORT LabelImageToShapeLabelMapFilter : public ImageToImageFilter<TInputImage, TOutputImage>
51{
52public:
53 ITK_DISALLOW_COPY_AND_MOVE(LabelImageToShapeLabelMapFilter);
54
60
62 using InputImageType = TInputImage;
66 using InputImagePixelType = typename InputImageType::PixelType;
68 using OutputImageType = TOutputImage;
72 using OutputImagePixelType = typename OutputImageType::PixelType;
73 using LabelObjectType = typename OutputImageType::LabelObjectType;
74
76 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
77 static constexpr unsigned int OutputImageDimension = TInputImage::ImageDimension;
78 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
83
85 itkNewMacro(Self);
86
88 itkOverrideGetNameOfClassMacro(LabelImageToShapeLabelMapFilter);
89
90#ifdef ITK_USE_CONCEPT_CHECKING
91 // Begin concept checking
95 // End concept checking
96#endif
97
102 itkSetMacro(BackgroundValue, OutputImagePixelType);
103 itkGetConstMacro(BackgroundValue, OutputImagePixelType);
110 itkSetMacro(ComputeFeretDiameter, bool);
111 itkGetConstReferenceMacro(ComputeFeretDiameter, bool);
112 itkBooleanMacro(ComputeFeretDiameter);
119 itkSetMacro(ComputePerimeter, bool);
120 itkGetConstReferenceMacro(ComputePerimeter, bool);
121 itkBooleanMacro(ComputePerimeter);
129 itkSetMacro(ComputeOrientedBoundingBox, bool);
130 itkGetConstReferenceMacro(ComputeOrientedBoundingBox, bool);
131 itkBooleanMacro(ComputeOrientedBoundingBox);
135protected:
137 ~LabelImageToShapeLabelMapFilter() override = default;
138 void
139 PrintSelf(std::ostream & os, Indent indent) const override;
140
143 void
144 GenerateInputRequestedRegion() override;
145
147 void
148 EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
149
152 void
153 GenerateData() override;
154
155private:
156 OutputImagePixelType m_BackgroundValue{};
157 bool m_ComputeFeretDiameter{};
158 bool m_ComputePerimeter{};
159 bool m_ComputeOrientedBoundingBox{};
160}; // end of class
161} // end namespace itk
162
163#ifndef ITK_MANUAL_INSTANTIATION
164# include "itkLabelImageToShapeLabelMapFilter.hxx"
165#endif
166
167#endif
Base class for all data objects in ITK.
Base class for filters that take an image as input and produce an image as output.
Templated n-dimensional image class.
Definition: itkImage.h:89
Control indentation during Print() invocation.
Definition: itkIndent.h:50
convert a labeled image to a label collection image
Converts a label image to a label map and valuates the shape attributes.
typename InputImageType::PixelType InputImagePixelType
typename OutputImageType::Pointer OutputImagePointer
typename InputImageType::RegionType InputImageRegionType
typename OutputImageType::PixelType OutputImagePixelType
typename OutputImageType::ConstPointer OutputImageConstPointer
typename OutputImageType::RegionType OutputImageRegionType
typename OutputImageType::LabelObjectType LabelObjectType
typename InputImageType::ConstPointer InputImageConstPointer
Templated n-dimensional image to store labeled objects.
Definition: itkLabelMap.h:71
The valuator class for the ShapeLabelObject.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....