|
ITK
6.0.0
Insight Toolkit
|
Go to the documentation of this file.
18 #ifndef itkRegionBasedLevelSetFunction_h
19 #define itkRegionBasedLevelSetFunction_h
23 #include "vnl/vnl_matrix_fixed.h"
61 template <
typename TInput,
75 static constexpr
unsigned int ImageDimension = Superclass::ImageDimension;
84 using typename Superclass::ImageType;
85 using typename Superclass::PixelType;
87 using typename Superclass::RadiusType;
88 using typename Superclass::NeighborhoodType;
89 using typename Superclass::NeighborhoodScalesType;
90 using typename Superclass::FloatOffsetType;
101 m_MaxCurvatureChange = null_value;
102 m_MaxAdvectionChange = null_value;
103 m_MaxGlobalChange = null_value;
108 vnl_matrix_fixed<ScalarValueType, Self::ImageDimension, Self::ImageDimension>
m_dxy;
150 this->m_DomainFunction = f;
163 m_Center = it.
Size() / 2;
166 for (
unsigned int i = 0; i < ImageDimension; ++i)
172 #if !defined(ITK_WRAPPING_PARSER)
176 this->m_SharedData = sharedDataIn;
181 UpdateSharedData(
bool forceUpdate);
186 return new GlobalDataStruct;
190 ComputeGlobalTimeStep(
void * GlobalData)
const override;
194 ComputeUpdate(
const NeighborhoodType & neighborhood,
196 const FloatOffsetType & = FloatOffsetType(0.0))
override;
204 virtual const FeatureImageType *
207 return m_FeatureImage.GetPointer();
215 for (
unsigned int i = 0; i < ImageDimension; ++i)
217 this->m_InvSpacing[i] = 1 / spacing[i];
225 return this->m_ZeroVectorConstant;
232 this->m_AreaWeight = nu;
237 return this->m_AreaWeight;
245 this->m_Lambda1 = lambda1;
250 return this->m_Lambda1;
258 this->m_Lambda2 = lambda2;
263 return this->m_Lambda2;
271 this->m_OverlapPenaltyWeight = gamma;
276 return this->m_OverlapPenaltyWeight;
284 m_CurvatureWeight = c;
289 return m_CurvatureWeight;
296 this->m_AdvectionWeight = iA;
301 return this->m_AdvectionWeight;
308 m_ReinitializationSmoothingWeight = c;
313 return m_ReinitializationSmoothingWeight;
321 this->m_VolumeMatchingWeight = tau;
326 return this->m_VolumeMatchingWeight;
334 this->m_Volume = volume;
339 return this->m_Volume;
347 this->m_FunctionId = iFid;
353 delete (GlobalDataStruct *)GlobalData;
356 virtual ScalarValueType
357 ComputeCurvature(
const NeighborhoodType &,
const FloatOffsetType &, GlobalDataStruct * gd);
361 virtual ScalarValueType
369 virtual ScalarValueType
423 unsigned int m_FunctionId{};
425 std::slice x_slice[Self::ImageDimension];
428 double m_InvSpacing[Self::ImageDimension]{};
466 ComputeVolumeRegularizationTerm();
481 ComputeLaplacian(GlobalDataStruct * gd);
489 ComputeParameters() = 0;
494 UpdateSharedDataParameters() = 0;
501 InitializeZeroVectorConstant();
508 #ifndef ITK_MANUAL_INSTANTIATION
509 # include "itkRegionBasedLevelSetFunction.hxx"
typename InputImageType::IndexType InputIndexType
SmartPointer< Self > Pointer
virtual void CalculateAdvectionImage()
typename ConstNeighborhoodIterator< TInputImage >::RadiusType RadiusType
SmartPointer< const Self > ConstPointer
typename FeatureImageType::SpacingType FeatureSpacingType
virtual ScalarValueType LaplacianSmoothingSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
Laplacian smoothing speed can be used to spatially modify the effects of laplacian smoothing of the l...
ScalarValueType GetReinitializationSmoothingWeight() const
vnl_matrix_fixed< ScalarValueType, Self::ImageDimension, Self::ImageDimension > m_dxy
virtual ScalarValueType CurvatureSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
Curvature speed can be used to spatially modify the effects of curvature . The default implementation...
NeighborIndexType Size() const
OffsetValueType GetStride(DimensionValueType axis) const
void SetSharedData(SharedDataPointer sharedDataIn)
typename InputImageType::SizeValueType InputSizeValueType
virtual void Initialize(const RadiusType &r)
void SetFunctionId(const unsigned int iFid)
void SetVolumeMatchingWeight(const ScalarValueType &tau)
ImageBaseType::SpacingType VectorType
ImageBaseType::PointType PointType
typename InputImageType::PointType InputPointType
void * GetGlobalDataPointer() const override
ScalarValueType m_GradMag
virtual void SetFeatureImage(const FeatureImageType *f)
A templated class holding a n-Dimensional vector.
virtual const FeatureImageType * GetFeatureImage() const
ScalarValueType GetLambda2() const
void SetLambda1(const ScalarValueType &lambda1)
ImageBaseType::SizeType SizeType
typename InputImageType::SizeType InputSizeType
ScalarValueType m_MaxCurvatureChange
void SetLambda2(const ScalarValueType &lambda2)
void ReleaseGlobalDataPointer(void *GlobalData) const override
ScalarValueType GetCurvatureWeight() const
void SetDomainFunction(const HeavisideFunctionType *f)
LevelSet function that computes a speed image based on regional integrals.
TSharedData SharedDataType
ScalarValueType GetLambda1() const
ScalarValueType m_MaxGlobalChange
static VectorType m_ZeroVectorConstant
ImageBaseType::IndexType IndexType
void SetRadius(const SizeType &)
Light weight base class for most itk classes.
typename FeatureImageType::OffsetType FeatureOffsetType
Base class of the Heaviside function.
void SetOverlapPenaltyWeight(const ScalarValueType &gamma)
ImageBaseType::RegionType RegionType
typename FeatureImageType::PixelType FeaturePixelType
ScalarValueType m_MaxAdvectionChange
ScalarValueType GetOverlapPenaltyWeight() const
ScalarValueType GetAreaWeight() const
typename InputImageType::PixelType InputPixelType
void SetAreaWeight(const ScalarValueType &nu)
ScalarValueType m_GradMagSqr
Simulate a standard C array with copy semantics.
void SetInitialImage(InputImageType *f)
virtual void SetCurvatureWeight(const ScalarValueType c)
typename HeavisideFunctionType::ConstPointer HeavisideFunctionConstPointer
typename FeatureImageType::ConstPointer FeatureImageConstPointer
ScalarValueType GetVolume() const
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
typename InputImageType::ConstPointer InputImageConstPointer
typename FeatureImageType::IndexType FeatureIndexType
typename InputImageType::IndexValueType InputIndexValueType
void SetAdvectionWeight(const ScalarValueType &iA)
void SetVolume(const ScalarValueType &volume)
TFeatureImage FeatureImageType
TInputImage InputImageType
void SetReinitializationSmoothingWeight(const ScalarValueType c)
virtual VectorType AdvectionField(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
ScalarValueType GetAdvectionWeight() const
ScalarValueType GetVolumeMatchingWeight() const
PixelType ScalarValueType
typename SharedDataType::Pointer SharedDataPointer
unsigned long SizeValueType
typename InputImageType::Pointer InputImagePointer
typename InputImageType::RegionType InputRegionType