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
25{
26namespace watershed
27{
64template <typename TScalar, unsigned int TImageDimension>
65class ITK_TEMPLATE_EXPORT Relabeler : public ProcessObject
66{
67public:
69 using Self = Relabeler;
73
76 itkNewMacro(Self);
77 itkOverrideGetNameOfClassMacro(Relabeler);
80 static constexpr unsigned int ImageDimension = TImageDimension;
81
83 using ScalarType = TScalar;
88
94
96 void
98 {
99 this->ProcessObject::SetNthInput(0, img);
100 }
101
102 ImageType *
107
109 void
111 {
112 this->ProcessObject::SetNthOutput(0, img);
113 }
114
115 ImageType *
120
122 void
127
128 SegmentTreeType *
133
135 void
136 GenerateData() override;
137
141 itkSetClampMacro(FloodLevel, double, 0.0, 1.0);
142 itkGetConstMacro(FloodLevel, double);
145 void
147
148 void
149 GraftNthOutput(unsigned int idx, ImageType * graft);
150
151protected:
153 ~Relabeler() override = default;
154 Relabeler(const Self &) {}
155 void
157 {}
158 void
159 PrintSelf(std::ostream & os, Indent indent) const override;
160
161 double m_FloodLevel{ 0.0 };
162 void
164
165 void
167};
168} // end namespace watershed
169} // end namespace itk
170
171#ifndef ITK_MANUAL_INSTANTIATION
172# include "itkWatershedRelabeler.hxx"
173#endif
174
175#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)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
TTarget itkDynamicCastInDebugMode(TSource x)