ITK  5.3.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 
21 #include "itkInPlaceImageFilter.h"
23 #include <vector>
24 
25 namespace itk
26 {
53 template <typename TInputImage, typename TOutputImage>
54 class ITK_TEMPLATE_EXPORT LabelContourImageFilter
55  : public InPlaceImageFilter<TInputImage, TOutputImage>
56  , protected ScanlineFilterCommon<TInputImage, TOutputImage>
57 {
58 public:
59  ITK_DISALLOW_COPY_AND_MOVE(LabelContourImageFilter);
60 
68  using Superclass::Register;
69  using Superclass::UnRegister;
70 
74  itkNewMacro(Self);
75 
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);
122 protected:
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
133  BeforeThreadedGenerateData() override;
134 
135  void
136  AfterThreadedGenerateData() override;
137 
138  void
139  DynamicThreadedGenerateData(const OutputRegionType & outputRegionForThread) override;
140 
141  void
142  ThreadedIntegrateData(const OutputRegionType & outputRegionForThread);
143 
144 
148  void
149  GenerateInputRequestedRegion() override;
150 
155  void
156  EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
157 
159 
171 
172 private:
174 
176 };
177 } // end namespace itk
178 
179 #ifndef ITK_MANUAL_INSTANTIATION
180 # include "itkLabelContourImageFilter.hxx"
181 #endif
182 
183 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:92
itk::ScanlineFilterCommon::LineEncodingIterator
typename LineEncodingType::iterator LineEncodingIterator
Definition: itkScanlineFilterCommon.h:128
itk::LabelContourImageFilter::LineMapType
typename ScanlineFunctions::LineMapType LineMapType
Definition: itkLabelContourImageFilter.h:168
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itk::LabelContourImageFilter::OutSizeType
typename ScanlineFunctions::OutSizeType OutSizeType
Definition: itkLabelContourImageFilter.h:161
itk::ScanlineFilterCommon::LineMapType
std::vector< LineEncodingType > LineMapType
Definition: itkScanlineFilterCommon.h:134
itk::LabelContourImageFilter::m_BackgroundValue
OutputImagePixelType m_BackgroundValue
Definition: itkLabelContourImageFilter.h:173
itk::LabelContourImageFilter
Labels the pixels on the border of the objects in a labeled image.
Definition: itkLabelContourImageFilter.h:54
itk::ScanlineFilterCommon::LineEncodingType
std::vector< RunLength > LineEncodingType
Definition: itkScanlineFilterCommon.h:127
itk::InPlaceImageFilter
Base class for filters that take an image as input and overwrite that image as the output.
Definition: itkInPlaceImageFilter.h:77
itk::LabelContourImageFilter::m_LineMap
LineMapType m_LineMap
Definition: itkLabelContourImageFilter.h:175
itk::LabelContourImageFilter::InternalLabelType
typename ScanlineFunctions::InternalLabelType InternalLabelType
Definition: itkLabelContourImageFilter.h:160
itk::ScanlineFilterCommon::RunLength
Definition: itkScanlineFilterCommon.h:114
itk::LabelContourImageFilter::OutputSizeType
typename OutputImageType::SizeType OutputSizeType
Definition: itkLabelContourImageFilter.h:99
itk::ScanlineFilterCommon::OffsetVectorType
std::vector< OffsetValueType > OffsetVectorType
Definition: itkScanlineFilterCommon.h:131
itk::LabelContourImageFilter::UnionFindType
typename ScanlineFunctions::UnionFindType UnionFindType
Definition: itkLabelContourImageFilter.h:169
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::LabelContourImageFilter::OutputOffsetType
typename OutputImageType::OffsetType OutputOffsetType
Definition: itkLabelContourImageFilter.h:100
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itkScanlineFilterCommon.h
itk::ScanlineFilterCommon::UnionFindType
std::vector< InternalLabelType > UnionFindType
Definition: itkScanlineFilterCommon.h:136
itk::ImageToImageFilter::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition: itkImageToImageFilter.h:133
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::LabelContourImageFilter::OffsetVectorType
typename ScanlineFunctions::OffsetVectorType OffsetVectorType
Definition: itkLabelContourImageFilter.h:166
itk::ScanlineFilterCommon::InternalLabelType
SizeValueType InternalLabelType
Definition: itkScanlineFilterCommon.h:111
itk::ScanlineFilterCommon::OutSizeType
typename TOutputImage::RegionType::SizeType OutSizeType
Definition: itkScanlineFilterCommon.h:112
itk::LabelContourImageFilter::LineEncodingConstIterator
typename ScanlineFunctions::LineEncodingConstIterator LineEncodingConstIterator
Definition: itkLabelContourImageFilter.h:165
itk::ImageToImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToImageFilter.h:130
itk::LabelContourImageFilter::ConsecutiveVectorType
typename ScanlineFunctions::ConsecutiveVectorType ConsecutiveVectorType
Definition: itkLabelContourImageFilter.h:170
itk::ScanlineFilterCommon::OffsetVectorConstIterator
typename OffsetVectorType::const_iterator OffsetVectorConstIterator
Definition: itkScanlineFilterCommon.h:132
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::LabelContourImageFilter::OutputRegionType
typename OutputImageType::RegionType OutputRegionType
Definition: itkLabelContourImageFilter.h:97
itk::LabelContourImageFilter::InputIndexType
typename InputImageType::IndexType InputIndexType
Definition: itkLabelContourImageFilter.h:88
itk::LabelContourImageFilter::RunLength
typename ScanlineFunctions::RunLength RunLength
Definition: itkLabelContourImageFilter.h:162
itk::LabelContourImageFilter::InputOffsetType
typename InputImageType::OffsetType InputOffsetType
Definition: itkLabelContourImageFilter.h:90
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::OffsetValueType
long OffsetValueType
Definition: itkIntTypes.h:94
itk::LabelContourImageFilter::OutputIndexType
typename OutputImageType::IndexType OutputIndexType
Definition: itkLabelContourImageFilter.h:98
itk::ScanlineFilterCommon::ConsecutiveVectorType
std::vector< OutputPixelType > ConsecutiveVectorType
Definition: itkScanlineFilterCommon.h:137
itk::LabelContourImageFilter::OffsetValueType
typename InputImageType::OffsetValueType OffsetValueType
Definition: itkLabelContourImageFilter.h:92
itk::LabelContourImageFilter::LineEncodingIterator
typename ScanlineFunctions::LineEncodingIterator LineEncodingIterator
Definition: itkLabelContourImageFilter.h:164
itk::LabelContourImageFilter::OffsetVectorConstIterator
typename ScanlineFunctions::OffsetVectorConstIterator OffsetVectorConstIterator
Definition: itkLabelContourImageFilter.h:167
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ScanlineFilterCommon
Helper class for a group of filters which operate on scan-lines.
Definition: itkScanlineFilterCommon.h:41
itkInPlaceImageFilter.h
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::ImageSource::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkImageSource.h:93
itk::LabelContourImageFilter::InputSizeType
typename InputImageType::SizeType InputSizeType
Definition: itkLabelContourImageFilter.h:89
itk::ScanlineFilterCommon::LineEncodingConstIterator
typename LineEncodingType::const_iterator LineEncodingConstIterator
Definition: itkScanlineFilterCommon.h:129
itk::LabelContourImageFilter::LineEncodingType
typename ScanlineFunctions::LineEncodingType LineEncodingType
Definition: itkLabelContourImageFilter.h:163
itk::LabelContourImageFilter::InputPixelType
typename InputImageType::PixelType InputPixelType
Definition: itkLabelContourImageFilter.h:93
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293