ITK  6.0.0
Insight Toolkit
itkLevelSetFunctionWithRefitTerm.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 itkLevelSetFunctionWithRefitTerm_h
19#define itkLevelSetFunctionWithRefitTerm_h
20
21#include "itkLevelSetFunction.h"
22#include "itkSparseImage.h"
23#include "itkNumericTraits.h"
24
25namespace itk
26{
51template <typename TImageType, typename TSparseImageType>
52class ITK_TEMPLATE_EXPORT LevelSetFunctionWithRefitTerm : public LevelSetFunction<TImageType>
53{
54public:
55 ITK_DISALLOW_COPY_AND_MOVE(LevelSetFunctionWithRefitTerm);
56
62
64 itkOverrideGetNameOfClassMacro(LevelSetFunctionWithRefitTerm);
65
67 itkNewMacro(Self);
68
70 using typename Superclass::ImageType;
71 using typename Superclass::FloatOffsetType;
72 using typename Superclass::ScalarValueType;
73 using typename Superclass::GlobalDataStruct;
74 using typename Superclass::NeighborhoodType;
75 using typename Superclass::NeighborhoodScalesType;
76 using typename Superclass::TimeStepType;
77
79
82
84 using SparseImageType = TSparseImageType;
85
87 using NodeType = typename SparseImageType::NodeType;
88
90 using NormalVectorType = typename NodeType::NodeDataType;
91
93 void
95 {
96 m_RefitWeight = w;
97 }
98
101 void
103 {
104 m_OtherPropagationWeight = w;
105 }
106
109 void
111 {
112 m_SparseTargetImage = im;
113 }
114
116 SparseImageType *
118 {
119 return m_SparseTargetImage;
120 }
121
126 TimeStepType
127 ComputeGlobalTimeStep(void * GlobalData) const override;
128
129protected:
131 ScalarValueType m_RefitWeight{};
132
135 ScalarValueType m_OtherPropagationWeight{};
136
138 void
139 PrintSelf(std::ostream & os, Indent indent) const override;
140
145
150 PropagationSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct * = 0) const override;
151
155 virtual ScalarValueType
157 {
158 return ScalarValueType{};
159 }
160
161private:
163 typename SparseImageType::Pointer m_SparseTargetImage{};
164
166 ScalarValueType m_MinVectorNorm{};
167
171};
172} // end namespace itk
173
174#ifndef ITK_MANUAL_INSTANTIATION
175# include "itkLevelSetFunctionWithRefitTerm.hxx"
176#endif
177
178#endif
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Control indentation during Print() invocation.
Definition: itkIndent.h:50
This class extends the LevelSetFunction class by adding a grow term based on a target curvature store...
virtual ScalarValueType OtherPropagationSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
void PrintSelf(std::ostream &os, Indent indent) const override
ScalarValueType ComputeCurvature(const NeighborhoodType &) const
void SetOtherPropagationWeight(const ScalarValueType w)
typename NodeType::NodeDataType NormalVectorType
ScalarValueType PropagationSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const override
typename NeighborhoodType::SizeValueType NeighborhoodSizeValueType
typename SparseImageType::NodeType NodeType
TimeStepType ComputeGlobalTimeStep(void *GlobalData) const override
static const NeighborhoodSizeValueType m_NumVertex
The LevelSetFunction class is a generic function object which can be used to create a level set metho...
Light weight base class for most itk classes.
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:63
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition: itkIntTypes.h:86