ITK  6.0.0
Insight Toolkit
itkReinitializeLevelSetImageFilter.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 itkReinitializeLevelSetImageFilter_h
19#define itkReinitializeLevelSetImageFilter_h
20
23
24namespace itk
25{
54template <typename TLevelSet>
55class ITK_TEMPLATE_EXPORT ReinitializeLevelSetImageFilter : public ImageToImageFilter<TLevelSet, TLevelSet>
56{
57public:
58 ITK_DISALLOW_COPY_AND_MOVE(ReinitializeLevelSetImageFilter);
59
65
67 itkNewMacro(Self);
68
70 itkOverrideGetNameOfClassMacro(ReinitializeLevelSetImageFilter);
71
81
83 static constexpr unsigned int SetDimension = LevelSetType::SetDimension;
84
87 itkSetMacro(LevelSetValue, double);
88 itkGetConstMacro(LevelSetValue, double);
93 itkSetMacro(NarrowBanding, bool);
94 itkGetConstMacro(NarrowBanding, bool);
95 itkBooleanMacro(NarrowBanding);
99 itkSetClampMacro(InputNarrowBandwidth, double, 0.0, NumericTraits<double>::max());
100 itkGetConstMacro(InputNarrowBandwidth, double);
104 itkSetClampMacro(OutputNarrowBandwidth, double, 0.0, NumericTraits<double>::max());
105 itkGetConstMacro(OutputNarrowBandwidth, double);
110 void
111 SetNarrowBandwidth(double value)
112 {
113 this->SetInputNarrowBandwidth(value);
114 this->SetOutputNarrowBandwidth(value);
115 }
119 void
121
124 {
125 return m_InputNarrowBand;
126 }
127
129 NodeContainerPointer
131 {
132 return m_OutputNarrowBand;
133 }
134
135#ifdef ITK_USE_CONCEPT_CHECKING
136 // Begin concept checking
137 itkConceptMacro(LevelSetDoubleAdditiveOperatorsCheck, (Concept::AdditiveOperators<PixelType, double>));
138 itkConceptMacro(LevelSetOStreamWritableCheck, (Concept::OStreamWritable<PixelType>));
139 // End concept checking
140#endif
141
142protected:
145 void
146 PrintSelf(std::ostream & os, Indent indent) const override;
147
152
153 void
154 GenerateData() override;
155
156 virtual void
158
159 virtual void
161
162 virtual void
164
165 void
167
168 void
170
171 void
173 {
174 m_OutputNarrowBand = ptr;
175 }
176
177private:
178 double m_LevelSetValue{};
179
180 typename LocatorType::Pointer m_Locator{};
181
183
184 bool m_NarrowBanding{};
185 double m_InputNarrowBandwidth{};
186 double m_OutputNarrowBandwidth{};
187 NodeContainerPointer m_InputNarrowBand{};
188 NodeContainerPointer m_OutputNarrowBand{};
189};
190} // namespace itk
191
192#ifndef ITK_MANUAL_INSTANTIATION
193# include "itkReinitializeLevelSetImageFilter.hxx"
194#endif
195
196#endif
Base class for all data objects in ITK.
Solve an Eikonal equation using Fast Marching.
Base class for filters that take an image as input and produce an image as output.
Templated n-dimensional image class.
Definition: itkImage.h:89
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Locate pixels of a particular level set.
Represent a node in a level set.
Level set type information.
Definition: itkLevelSet.h:41
typename TLevelSet::PixelType PixelType
Definition: itkLevelSet.h:55
typename TLevelSet::ConstPointer LevelSetConstPointer
Definition: itkLevelSet.h:52
typename NodeContainer::Pointer NodeContainerPointer
Definition: itkLevelSet.h:64
typename TLevelSet::Pointer LevelSetPointer
Definition: itkLevelSet.h:51
Light weight base class for most itk classes.
Define additional traits for native types such as int or float.
Reinitialize the level set to the signed distance function.
void SetInputNarrowBand(NodeContainer *ptr)
~ReinitializeLevelSetImageFilter() override=default
typename LevelSetType::NodeContainer NodeContainer
typename LevelSetType::NodeContainerPointer NodeContainerPointer
void GenerateInputRequestedRegion() override
typename LevelSetType::LevelSetImageType LevelSetImageType
typename LevelSetType::LevelSetConstPointer LevelSetConstPointer
void PrintSelf(std::ostream &os, Indent indent) const override
void EnlargeOutputRequestedRegion(DataObject *) override
typename LevelSetType::LevelSetPointer LevelSetPointer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....