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:
68
70 using Self = Relabeler;
74
76 itkNewMacro(Self);
77 itkOverrideGetNameOfClassMacro(Relabeler);
79
81 static constexpr unsigned int ImageDimension = TImageDimension;
82
84 using ScalarType = TScalar;
89
95
97 void
99 {
100 this->ProcessObject::SetNthInput(0, img);
101 }
102
103 ImageType *
108
110 void
112 {
113 this->ProcessObject::SetNthOutput(0, img);
114 }
115
116 ImageType *
121
123 void
128
129 SegmentTreeType *
134
136 void
137 GenerateData() override;
138
141 itkSetClampMacro(FloodLevel, double, 0.0, 1.0);
142 itkGetConstMacro(FloodLevel, double);
144
146 void
148
149 void
150 GraftNthOutput(unsigned int idx, ImageType * graft);
151
152protected:
154 ~Relabeler() override = default;
155 Relabeler(const Self &) {}
156 void
158 {}
159 void
160 PrintSelf(std::ostream & os, Indent indent) const override;
161
162 double m_FloodLevel{ 0.0 };
163 void
165
166 void
168};
169} // end namespace watershed
170} // end namespace itk
171
172#ifndef ITK_MANUAL_INSTANTIATION
173# include "itkWatershedRelabeler.hxx"
174#endif
175
176#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)