ITK  6.0.0
Insight Toolkit
itkAnchorOpenCloseImageFilter.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 itkAnchorOpenCloseImageFilter_h
19#define itkAnchorOpenCloseImageFilter_h
20
22#include "itkProgressReporter.h"
25#include "itkBresenhamLine.h"
26
27namespace itk
28{
50template <typename TImage, typename TKernel, typename TCompare1, typename TCompare2>
51class ITK_TEMPLATE_EXPORT AnchorOpenCloseImageFilter : public KernelImageFilter<TImage, TImage, TKernel>
52{
53public:
54 ITK_DISALLOW_COPY_AND_MOVE(AnchorOpenCloseImageFilter);
55
61
65 using KernelType = TKernel;
66 using KernelLType = typename KernelType::LType;
67
68 using InputImageType = TImage;
72 using InputImagePixelType = typename InputImageType::PixelType;
73
75 static constexpr unsigned int InputImageDimension = TImage::ImageDimension;
76 static constexpr unsigned int OutputImageDimension = TImage::ImageDimension;
77
79 itkNewMacro(Self);
80
82 itkOverrideGetNameOfClassMacro(AnchorOpenCloseImageFilter);
83
84protected:
86 ~AnchorOpenCloseImageFilter() override = default;
87 void
88 PrintSelf(std::ostream & os, Indent indent) const override;
89
91 void
92 DynamicThreadedGenerateData(const InputImageRegionType & outputRegionForThread) override;
93
94
95 InputImagePixelType m_Boundary1{};
96 InputImagePixelType m_Boundary2{};
97
98private:
101
102 // the class that operates on lines -- does the opening in one
103 // operation. The classes following are named on the assumption that
104 // we are doing an opening
105
106 // using AnchorLineOpenType = AnchorOpenCloseLine<InputImagePixelType, THistogramCompare,
107 // TFunction1, TFunction2>;
109
111
112 // the class that does the dilation
114
115 void
117 InputImagePointer output,
118 InputImagePixelType border,
119 KernelLType line,
120 AnchorLineOpenType & AnchorLineOpen,
121 const BresOffsetArray LineOffsets,
122 std::vector<InputImagePixelType> & outbuffer,
123 const InputImageRegionType AllImage,
124 const InputImageRegionType face);
125}; // end of class
126} // end namespace itk
127
128#ifndef ITK_MANUAL_INSTANTIATION
129# include "itkAnchorOpenCloseImageFilter.hxx"
130#endif
131
132#endif
class to implement erosions and dilations using anchor methods. This is the base class that must be i...
class to implement openings and closings using anchor methods.
void PrintSelf(std::ostream &os, Indent indent) const override
typename BresType::OffsetArray BresOffsetArray
~AnchorOpenCloseImageFilter() override=default
void DynamicThreadedGenerateData(const InputImageRegionType &outputRegionForThread) override
typename InputImageType::Pointer InputImagePointer
void DoFaceOpen(InputImageConstPointer input, InputImagePointer output, InputImagePixelType border, KernelLType line, AnchorLineOpenType &AnchorLineOpen, const BresOffsetArray LineOffsets, std::vector< InputImagePixelType > &outbuffer, const InputImageRegionType AllImage, const InputImageRegionType face)
typename InputImageType::ConstPointer InputImageConstPointer
typename InputImageType::PixelType InputImagePixelType
typename InputImageType::RegionType InputImageRegionType
class to implement openings and closings using anchor methods. This is the base class that must be in...
Compute indices along a line in n dimensions.
std::vector< OffsetType > OffsetArray
Control indentation during Print() invocation.
Definition: itkIndent.h:50
A base class for all the filters working on an arbitrary shaped neighborhood.
Light weight base class for most itk classes.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....