ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkLabelContourImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 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_ASSIGN(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;
87  using InputImagePointer = typename InputImageType::Pointer;
90  using InputOffsetType = typename InputImageType::OffsetType;
91  using InputImagePixelType = typename InputImageType::PixelType;
93  using InputPixelType = typename InputImageType::PixelType;
94 
95  using OutputImageType = TOutputImage;
96  using OutputImagePointer = typename OutputImageType::Pointer;
100  using OutputOffsetType = typename OutputImageType::OffsetType;
101  using OutputImagePixelType = typename OutputImageType::PixelType;
102 
109  itkSetMacro(FullyConnected, bool);
110  itkGetConstReferenceMacro(FullyConnected, bool);
111  itkBooleanMacro(FullyConnected);
113 
118  itkSetMacro(BackgroundValue, OutputImagePixelType);
119  itkGetConstMacro(BackgroundValue, OutputImagePixelType);
121 
122 protected:
123 
125  ~LabelContourImageFilter() override = default;
126 
127  void PrintSelf(std::ostream & os, Indent indent) const override;
128 
129  void GenerateData() override;
130 
131  void BeforeThreadedGenerateData() override;
132 
133  void AfterThreadedGenerateData() override;
134 
135  void DynamicThreadedGenerateData(const OutputRegionType& outputRegionForThread) override;
136 
137  void ThreadedIntegrateData(const OutputRegionType& outputRegionForThread);
138 
139 
143  void GenerateInputRequestedRegion() override;
144 
149  void EnlargeOutputRequestedRegion( DataObject * itkNotUsed(output) ) override;
150 
152 
164 
165 private:
167 
169 };
170 } // end namespace itk
171 
172 #ifndef ITK_MANUAL_INSTANTIATION
173 #include "itkLabelContourImageFilter.hxx"
174 #endif
175 
176 #endif
typename OutputImageType::Pointer OutputImagePointer
typename ScanlineFunctions::OutSizeType OutSizeType
typename OutputImageType::OffsetType OutputOffsetType
typename InputImageType::OffsetValueType OffsetValueType
typename InputImageType::IndexType InputIndexType
typename OutputImageType::RegionType OutputRegionType
typename ScanlineFunctions::LineEncodingIterator LineEncodingIterator
typename LineEncodingType::iterator LineEncodingIterator
std::vector< RunLength > LineEncodingType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename ScanlineFunctions::InternalLabelType InternalLabelType
typename ScanlineFunctions::ConsecutiveVectorType ConsecutiveVectorType
Helper class for a group of filters which operate on scan-lines.
typename InputImageType::OffsetType InputOffsetType
typename ScanlineFunctions::OffsetVectorType OffsetVectorType
typename ScanlineFunctions::LineMapType LineMapType
typename OutputImageType::PixelType OutputImagePixelType
typename InputImageType::PixelType InputImagePixelType
typename InputImageType::SizeType InputSizeType
typename InputImageType::Pointer InputImagePointer
typename OffsetVectorType::const_iterator OffsetVectorConstIterator
TOutputImage OutputImageType
typename ScanlineFunctions::UnionFindType UnionFindType
typename ScanlineFunctions::LineEncodingType LineEncodingType
typename TOutputImage::RegionType::SizeType OutSizeType
std::vector< OutputPixelType > ConsecutiveVectorType
typename ScanlineFunctions::LineEncodingConstIterator LineEncodingConstIterator
std::vector< OffsetValueType > OffsetVectorType
Labels the pixels on the border of the objects in a labeled image.
std::vector< LineEncodingType > LineMapType
typename OutputImageType::IndexType OutputIndexType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename OutputImageType::SizeType OutputSizeType
typename InputImageType::PixelType InputPixelType
typename ScanlineFunctions::OffsetVectorConstIterator OffsetVectorConstIterator
Base class for filters that take an image as input and overwrite that image as the output...
typename LineEncodingType::const_iterator LineEncodingConstIterator
typename ScanlineFunctions::RunLength RunLength
signed long OffsetValueType
Definition: itkIntTypes.h:94
Base class for all data objects in ITK.
std::vector< InternalLabelType > UnionFindType