ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkWatershedRelabeler.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 itkWatershedRelabeler_h
19#define itkWatershedRelabeler_h
20
23
24namespace itk::watershed
25{
62template <typename TScalar, unsigned int TImageDimension>
63class ITK_TEMPLATE_EXPORT Relabeler : public ProcessObject
64{
65public:
67 using Self = Relabeler;
71
74 itkNewMacro(Self);
75 itkOverrideGetNameOfClassMacro(Relabeler);
78 static constexpr unsigned int ImageDimension = TImageDimension;
79
81 using ScalarType = TScalar;
86
92
94 void
96 {
97 this->ProcessObject::SetNthInput(0, img);
98 }
99
100 ImageType *
105
107 void
109 {
110 this->ProcessObject::SetNthOutput(0, img);
111 }
112
113 ImageType *
118
120 void
125
126 SegmentTreeType *
131
133 void
134 GenerateData() override;
135
139 itkSetClampMacro(FloodLevel, double, 0.0, 1.0);
140 itkGetConstMacro(FloodLevel, double);
143 void
145
146 void
147 GraftNthOutput(unsigned int idx, ImageType * graft);
148
149protected:
151 ~Relabeler() override = default;
152 Relabeler(const Self &) {}
153 void
155 {}
156 void
157 PrintSelf(std::ostream & os, Indent indent) const override;
158
159 double m_FloodLevel{ 0.0 };
160 void
162
163 void
165};
166} // namespace itk::watershed
167
168#ifndef ITK_MANUAL_INSTANTIATION
169# include "itkWatershedRelabeler.hxx"
170#endif
171
172#endif
SmartPointer< Self > Pointer
Templated n-dimensional image class.
Definition itkImage.h:89
Control indentation during Print() invocation.
Definition itkIndent.h:50
DataObject * GetOutput(const DataObjectIdentifierType &key)
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
virtual void SetNthInput(DataObjectPointerArraySizeType idx, DataObject *input)
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
virtual void SetNthOutput(DataObjectPointerArraySizeType idx, DataObject *output)
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
Make a DataObject of the correct type to used as the specified output.
Implements transparent reference counting.
void GraftNthOutput(unsigned int idx, ImageType *graft)
void SetOutputImage(ImageType *img)
~Relabeler() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
SegmentTreeType * GetInputSegmentTree()
SmartPointer< const Self > ConstPointer
void GenerateOutputRequestedRegion(DataObject *output) override
static constexpr unsigned int ImageDimension
void GenerateData() override
void GenerateInputRequestedRegion() override
void SetInputSegmentTree(SegmentTreeType *et)
DataObject::Pointer DataObjectPointer
void GraftOutput(ImageType *graft)
Segmenter< Image< ScalarType, TImageDimension > > SegmenterType
Image< IdentifierType, TImageDimension > ImageType
SegmentTree< ScalarType > SegmentTreeType
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override
Make a DataObject of the correct type to used as the specified output.
void SetInputImage(ImageType *img)
TTarget itkDynamicCastInDebugMode(TSource x)