ITK  6.0.0
Insight Toolkit
itkLevelSetEvolutionBase.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
19
20#ifndef itkLevelSetEvolutionBase_h
21#define itkLevelSetEvolutionBase_h
22
23#include <list>
24
25#include "itkImage.h"
30#include "itkNumericTraits.h"
32
33namespace itk
34{
42template <typename TEquationContainer, typename TLevelSet>
43class ITK_TEMPLATE_EXPORT LevelSetEvolutionBase : public Object
44{
45public:
46 ITK_DISALLOW_COPY_AND_MOVE(LevelSetEvolutionBase);
47
52
54 itkOverrideGetNameOfClassMacro(LevelSetEvolutionBase);
55
56 using EquationContainerType = TEquationContainer;
58 using TermContainerType = typename EquationContainerType::TermContainerType;
60
61 using TermType = typename TermContainerType::TermType;
63
64 using InputImageType = typename TermContainerType::InputImageType;
65 using InputImagePixelType = typename InputImageType::PixelType;
69
70 static constexpr unsigned int ImageDimension = InputImageType::ImageDimension;
71
72 using LevelSetContainerType = typename TermContainerType::LevelSetContainerType;
73
74 using LevelSetIdentifierType = typename LevelSetContainerType::LevelSetIdentifierType;
75
76 using LevelSetType = TLevelSet;
77 using LevelSetInputType = typename LevelSetType::InputType;
78 using LevelSetOutputType = typename LevelSetType::OutputType;
79 using LevelSetOutputRealType = typename LevelSetType::OutputRealType;
80 using LevelSetDataType = typename LevelSetType::LevelSetDataType;
81
82 using IdListType = typename LevelSetContainerType::IdListType;
83 using IdListIterator = typename LevelSetContainerType::IdListIterator;
84 using IdListConstIterator = typename LevelSetContainerType::IdListConstIterator;
85 using IdListImageType = typename LevelSetContainerType::IdListImageType;
86 using CacheImageType = typename LevelSetContainerType::CacheImageType;
87
88 using DomainMapImageFilterType = typename LevelSetContainerType::DomainMapImageFilterType;
89
92
94 itkGetModifiableObjectMacro(LevelSetContainer, LevelSetContainerType);
95
97 itkSetMacro(Alpha, LevelSetOutputRealType);
98 itkGetMacro(Alpha, LevelSetOutputRealType);
102 void
104
106 itkSetObjectMacro(EquationContainer, EquationContainerType);
107 itkGetModifiableObjectMacro(EquationContainer, EquationContainerType);
111 itkSetObjectMacro(StoppingCriterion, StoppingCriterionType);
112 itkGetModifiableObjectMacro(StoppingCriterion, StoppingCriterionType);
116 itkGetConstMacro(NumberOfIterations, IdentifierType);
117
121 void
123
124protected:
126
127 ~LevelSetEvolutionBase() override = default;
128
129 void
131
133 void
135
140 void
142
145 virtual void
147
150 virtual void
152
154 virtual void
156
157 virtual void
159
160 virtual void
162
163 StoppingCriterionPointer m_StoppingCriterion{};
164
165 EquationContainerPointer m_EquationContainer{};
166 typename LevelSetContainerType::Pointer m_LevelSetContainer{};
167
170 LevelSetOutputRealType m_RMSChangeAccumulator{};
171 bool m_UserGloballyDefinedTimeStep{};
172 IdentifierType m_NumberOfIterations{};
173
175 typename LevelSetContainerType::Iterator m_LevelSetContainerIteratorToProcessWhenThreading{};
176 typename LevelSetContainerType::Iterator m_LevelSetUpdateContainerIteratorToProcessWhenThreading{};
177};
178} // namespace itk
179
180#ifndef ITK_MANUAL_INSTANTIATION
181# include "itkLevelSetEvolutionBase.hxx"
182#endif
183
184#endif // itkLevelSetEvolutionBase_h
Container of Level-Sets.
Class for iterating and evolving the dense level-set function.
typename InputImageType::RegionType InputImageRegionType
typename LevelSetContainerType::IdListType IdListType
typename StoppingCriterionType::Pointer StoppingCriterionPointer
virtual void UpdateLevelSets()=0
typename TermContainerType::LevelSetContainerType LevelSetContainerType
typename TermType::Pointer TermPointer
~LevelSetEvolutionBase() override=default
typename LevelSetType::LevelSetDataType LevelSetDataType
typename TermContainerType::InputImageType InputImageType
typename InputImageType::ConstPointer InputImageConstPointer
void SetTimeStep(const LevelSetOutputRealType &iDt)
typename LevelSetContainerType::IdListImageType IdListImageType
virtual void ComputeIteration()
TEquationContainer EquationContainerType
typename LevelSetType::InputType LevelSetInputType
typename LevelSetType::OutputRealType LevelSetOutputRealType
virtual void ComputeTimeStepForNextIteration()
typename LevelSetType::OutputType LevelSetOutputType
typename InputImageType::PixelType InputImagePixelType
typename EquationContainerType::Pointer EquationContainerPointer
typename NumericTraits< InputImagePixelType >::RealType InputPixelRealType
virtual void AllocateUpdateBuffer()
typename LevelSetContainerType::CacheImageType CacheImageType
typename TermContainerType::Pointer TermContainerPointer
typename LevelSetContainerType::IdListConstIterator IdListConstIterator
typename LevelSetContainerType::DomainMapImageFilterType DomainMapImageFilterType
typename LevelSetContainerType::IdListIterator IdListIterator
virtual void UpdateEquations()=0
typename LevelSetContainerType::LevelSetIdentifierType LevelSetIdentifierType
typename EquationContainerType::TermContainerType TermContainerType
typename TermContainerType::TermType TermType
Light weight base class for most itk classes.
Define additional traits for native types such as int or float.
Base class for most ITK classes.
Definition: itkObject.h:62
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SizeValueType IdentifierType
Definition: itkIntTypes.h:90