ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkSegmentationLevelSetFunction.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 itkSegmentationLevelSetFunction_h
19#define itkSegmentationLevelSetFunction_h
20
21#include "itkLevelSetFunction.h"
24#include "itkCastImageFilter.h"
25
26namespace itk
27{
45
46template <typename TImageType, typename TFeatureImageType = TImageType>
47class ITK_TEMPLATE_EXPORT SegmentationLevelSetFunction : public LevelSetFunction<TImageType>
48{
49public:
50 ITK_DISALLOW_COPY_AND_MOVE(SegmentationLevelSetFunction);
51
59 itkOverrideGetNameOfClassMacro(SegmentationLevelSetFunction);
60
62 using typename Superclass::ImageType;
63 using typename Superclass::RadiusType;
64 using typename Superclass::PixelRealType;
65 using FeatureImageType = TFeatureImageType;
66 using typename Superclass::FloatOffsetType;
67 using typename Superclass::ScalarValueType;
68 using typename Superclass::NeighborhoodType;
69 using FeatureScalarType = typename FeatureImageType::PixelType;
70 using IndexType = typename ImageType::IndexType;
71 using typename Superclass::VectorType;
72 using typename Superclass::GlobalDataStruct;
73
75 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
76
82
85
90 virtual const FeatureImageType *
92 {
93 return m_FeatureImage.GetPointer();
94 }
95 virtual void
97 {
99 }
101
103 virtual ImageType *
105 {
106 return m_SpeedImage.GetPointer();
107 }
108 void
111
113 virtual VectorImageType *
115 {
116 return m_AdvectionImage.GetPointer();
117 }
118 void
121
125 void
126 Initialize(const RadiusType & r) override;
127
132 virtual void
135
140 virtual void
143
146 virtual void
148
151 virtual void
153
164 virtual void
166
167protected:
169 typename FeatureImageType::ConstPointer m_FeatureImage{};
170
172 typename ImageType::Pointer m_SpeedImage{};
173
176
178 ScalarValueType
180
183 AdvectionField(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct * gd) const override;
184
185 ~SegmentationLevelSetFunction() override = default;
193
195
197};
198} // namespace itk
199
200#ifndef ITK_MANUAL_INSTANTIATION
201# include "itkSegmentationLevelSetFunction.hxx"
202#endif
203
204#endif
Templated n-dimensional image class.
Definition itkImage.h:89
ConstNeighborhoodIterator< TImageType, DefaultBoundaryConditionType > NeighborhoodType
FixedArray< ScalarValueType, Self::ImageDimension > VectorType
Vector< float, Self::ImageDimension > FloatOffsetType
static constexpr unsigned int ImageDimension
typename ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
Linearly interpolate an image at specified positions.
ContinuousIndex< double, Self::ImageDimension > ContinuousIndexType
ConstNeighborhoodIterator< TImageType, DefaultBoundaryConditionType > NeighborhoodType
~SegmentationLevelSetFunction() override=default
VectorLinearInterpolateImageFunction< VectorImageType > VectorInterpolatorType
FixedArray< ScalarValueType, Self::ImageDimension > VectorType
void SetAdvectionImage(VectorImageType *s)
void Initialize(const RadiusType &r) override
ScalarValueType PropagationSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd) const override
virtual VectorImageType * GetAdvectionImage() const
VectorType AdvectionField(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd) const override
virtual void ReverseExpansionDirection()
typename ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
void SetSpeedImage(ImageType *s)
Implements transparent reference counting.
Linearly interpolate a vector image at specified positions.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....