ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkBinaryContourImageFilter.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 itkBinaryContourImageFilter_h
19 #define itkBinaryContourImageFilter_h
20 
21 #include "itkInPlaceImageFilter.h"
23 #include <vector>
24 
25 namespace itk
26 {
52 template< typename TInputImage, typename TOutputImage >
53 class ITK_TEMPLATE_EXPORT BinaryContourImageFilter:
54  public InPlaceImageFilter< TInputImage, TOutputImage >
55  , protected ScanlineFilterCommon< TInputImage, TOutputImage >
56 {
57 public:
58  ITK_DISALLOW_COPY_AND_ASSIGN(BinaryContourImageFilter);
59 
67  using Superclass::Register;
68  using Superclass::UnRegister;
69 
74 
78  itkNewMacro(Self);
79 
83  using InputImageType = TInputImage;
84  using InputImagePointer = typename InputImageType::Pointer;
85  using InputImageConstPointer = typename InputImageType::ConstPointer;
88  using OffsetType = typename InputImageType::OffsetType;
89  using InputImagePixelType = typename InputImageType::PixelType;
90  using InputInternalPixelType = typename InputImageType::InternalPixelType;
91 
92  using OutputImageType = TOutputImage;
93  using OutputImagePointer = typename OutputImageType::Pointer;
97  using OutputOffsetType = typename OutputImageType::OffsetType;
98  using OutputImagePixelType = typename OutputImageType::PixelType;
99  using OutputInternalPixelType = typename OutputImageType::InternalPixelType;
100 
101  static constexpr unsigned int ImageDimension = OutputImageType::ImageDimension;
108  itkSetMacro(FullyConnected, bool);
109  itkGetConstReferenceMacro(FullyConnected, bool);
110  itkBooleanMacro(FullyConnected);
112 
117  itkSetMacro(BackgroundValue, OutputImagePixelType);
118  itkGetConstMacro(BackgroundValue, OutputImagePixelType);
120 
125  itkSetMacro(ForegroundValue, InputImagePixelType);
126  itkGetConstMacro(ForegroundValue, InputImagePixelType);
128 
129 protected:
130 
132  ~BinaryContourImageFilter() override = default;
133 
134  void PrintSelf(std::ostream & os, Indent indent) const override;
135 
136  void GenerateData() override;
137 
138  void BeforeThreadedGenerateData() override;
139 
140  void AfterThreadedGenerateData() override;
141 
142  void DynamicThreadedGenerateData(const RegionType& outputRegionForThread) override;
143 
144  void ThreadedIntegrateData(const RegionType& outputRegionForThread);
145 
149  void GenerateInputRequestedRegion() override;
150 
155  void EnlargeOutputRequestedRegion( DataObject * itkNotUsed(output) ) override;
156 
158 
170 
171 private:
172 
175 
178 };
179 } // end namespace itk
180 
181 #ifndef ITK_MANUAL_INSTANTIATION
182 #include "itkBinaryContourImageFilter.hxx"
183 #endif
184 
185 #endif
typename InputImageType::InternalPixelType InputInternalPixelType
typename InputImageType::SizeType SizeType
typename ScanlineFunctions::ConsecutiveVectorType ConsecutiveVectorType
typename OutputImageType::Pointer OutputImagePointer
typename ScanlineFunctions::LineEncodingType LineEncodingType
typename OutputImageType::SizeType OutputSizeType
typename ScanlineFunctions::OutSizeType OutSizeType
typename ScanlineFunctions::RunLength RunLength
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.
Helper class for a group of filters which operate on scan-lines.
typename OutputImageType::PixelType OutputImagePixelType
typename OutputImageType::RegionType RegionType
typename InputImageType::PixelType InputImagePixelType
typename InputImageType::Pointer InputImagePointer
typename OffsetVectorType::const_iterator OffsetVectorConstIterator
TOutputImage OutputImageType
typename ScanlineFunctions::OffsetVectorType OffsetVectorType
typename ScanlineFunctions::LineEncodingConstIterator LineEncodingConstIterator
typename OutputImageType::IndexType OutputIndexType
typename OutputImageType::OffsetType OutputOffsetType
typename InputImageType::IndexType IndexType
typename ScanlineFunctions::LineEncodingIterator LineEncodingIterator
typename TOutputImage::RegionType::SizeType OutSizeType
std::vector< OutputPixelType > ConsecutiveVectorType
typename ScanlineFunctions::UnionFindType UnionFindType
typename ScanlineFunctions::LineMapType LineMapType
std::vector< OffsetValueType > OffsetVectorType
Base class for filters that take an image as input and produce an image as output.
std::vector< LineEncodingType > LineMapType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename ScanlineFunctions::InternalLabelType InternalLabelType
Labels the pixels on the border of the objects in a binary image.
typename InputImageType::OffsetType OffsetType
Base class for filters that take an image as input and overwrite that image as the output...
typename LineEncodingType::const_iterator LineEncodingConstIterator
typename InputImageType::ConstPointer InputImageConstPointer
Base class for all data objects in ITK.
typename ScanlineFunctions::OffsetVectorConstIterator OffsetVectorConstIterator
std::vector< InternalLabelType > UnionFindType
typename OutputImageType::InternalPixelType OutputInternalPixelType