ITK  6.0.0
Insight Toolkit
itkLabelContourImageFilter.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 itkLabelContourImageFilter_h
19#define itkLabelContourImageFilter_h
20
23#include <vector>
24
25namespace itk
26{
53template <typename TInputImage, typename TOutputImage>
54class ITK_TEMPLATE_EXPORT LabelContourImageFilter
55 : public InPlaceImageFilter<TInputImage, TOutputImage>
56 , protected ScanlineFilterCommon<TInputImage, TOutputImage>
57{
58public:
59 ITK_DISALLOW_COPY_AND_MOVE(LabelContourImageFilter);
60
68 using Superclass::Register;
69 using Superclass::UnRegister;
70
74 itkNewMacro(Self);
75
79 itkOverrideGetNameOfClassMacro(LabelContourImageFilter);
80
81 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
82
86 using InputImageType = TInputImage;
90 using InputOffsetType = typename InputImageType::OffsetType;
91 using InputImagePixelType = typename InputImageType::PixelType;
93 using InputPixelType = typename InputImageType::PixelType;
94
95 using OutputImageType = TOutputImage;
100 using OutputOffsetType = typename OutputImageType::OffsetType;
101 using OutputImagePixelType = typename OutputImageType::PixelType;
102
109 itkSetMacro(FullyConnected, bool);
110 itkGetConstReferenceMacro(FullyConnected, bool);
111 itkBooleanMacro(FullyConnected);
118 itkSetMacro(BackgroundValue, OutputImagePixelType);
119 itkGetConstMacro(BackgroundValue, OutputImagePixelType);
122protected:
124 ~LabelContourImageFilter() override = default;
125
126 void
127 PrintSelf(std::ostream & os, Indent indent) const override;
128
129 void
130 GenerateData() override;
131
132 void
134
135 void
137
138 void
139 DynamicThreadedGenerateData(const OutputRegionType & outputRegionForThread) override;
140
141 void
142 ThreadedIntegrateData(const OutputRegionType & outputRegionForThread);
143
144
148 void
150
155 void
156 EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
157
159
171
172private:
173 OutputImagePixelType m_BackgroundValue{};
174
175 LineMapType m_LineMap{};
176};
177} // end namespace itk
178
179#ifndef ITK_MANUAL_INSTANTIATION
180# include "itkLabelContourImageFilter.hxx"
181#endif
182
183#endif
Base class for all data objects in ITK.
Base class for all process objects that output image data.
typename OutputImageType::PixelType OutputImagePixelType
TOutputImage OutputImageType
typename OutputImageType::Pointer OutputImagePointer
typename InputImageType::Pointer InputImagePointer
typename InputImageType::PixelType InputImagePixelType
Base class for filters that take an image as input and overwrite that image as the output.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Labels the pixels on the border of the objects in a labeled image.
typename ScanlineFunctions::OffsetVectorConstIterator OffsetVectorConstIterator
typename ScanlineFunctions::UnionFindType UnionFindType
void BeforeThreadedGenerateData() override
void EnlargeOutputRequestedRegion(DataObject *) override
void ThreadedIntegrateData(const OutputRegionType &outputRegionForThread)
typename ScanlineFunctions::LineEncodingIterator LineEncodingIterator
typename ScanlineFunctions::LineEncodingConstIterator LineEncodingConstIterator
void PrintSelf(std::ostream &os, Indent indent) const override
typename OutputImageType::RegionType OutputRegionType
typename InputImageType::OffsetValueType OffsetValueType
typename OutputImageType::OffsetType OutputOffsetType
typename OutputImageType::IndexType OutputIndexType
typename OutputImageType::SizeType OutputSizeType
typename InputImageType::OffsetType InputOffsetType
typename InputImageType::SizeType InputSizeType
void AfterThreadedGenerateData() override
typename ScanlineFunctions::RunLength RunLength
typename ScanlineFunctions::OffsetVectorType OffsetVectorType
~LabelContourImageFilter() override=default
void GenerateInputRequestedRegion() override
typename ScanlineFunctions::ConsecutiveVectorType ConsecutiveVectorType
typename InputImageType::PixelType InputPixelType
typename ScanlineFunctions::LineEncodingType LineEncodingType
typename ScanlineFunctions::LineMapType LineMapType
typename InputImageType::IndexType InputIndexType
void DynamicThreadedGenerateData(const OutputRegionType &outputRegionForThread) override
typename ScanlineFunctions::InternalLabelType InternalLabelType
void GenerateData() override
typename ScanlineFunctions::OutSizeType OutSizeType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Helper class for a group of filters which operate on scan-lines.
typename OffsetVectorType::const_iterator OffsetVectorConstIterator
typename TOutputImage::RegionType::SizeType OutSizeType
typename LineEncodingType::const_iterator LineEncodingConstIterator
typename LineEncodingType::iterator LineEncodingIterator
std::vector< LineEncodingType > LineMapType
std::vector< RunLength > LineEncodingType
std::vector< OffsetValueType > OffsetVectorType
std::vector< InternalLabelType > UnionFindType
std::vector< OutputPixelType > ConsecutiveVectorType
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
long OffsetValueType
Definition: itkIntTypes.h:97