18#ifndef itkRegionBasedLevelSetFunction_h
19#define itkRegionBasedLevelSetFunction_h
23#include "vnl/vnl_matrix_fixed.h"
57template <
typename TInput,
104 vnl_matrix_fixed<ScalarValueType, Self::ImageDimension, Self::ImageDimension>
m_dxy;
168#if !defined(ITK_WRAPPING_PARSER)
182 return new GlobalDataStruct;
200 virtual const FeatureImageType *
349 delete (GlobalDataStruct *)GlobalData;
352 virtual ScalarValueType
365 virtual ScalarValueType
499#ifndef ITK_MANUAL_INSTANTIATION
500# include "itkRegionBasedLevelSetFunction.hxx"
ConstNeighborhoodIterator< TInput, DefaultBoundaryConditionType > NeighborhoodType
static constexpr unsigned int ImageDimension
Vector< float, Self::ImageDimension > FloatOffsetType
typename ImageType::PixelType PixelType
Vector< PixelRealType, Self::ImageDimension > NeighborhoodScalesType
typename ConstNeighborhoodIterator< TInput >::RadiusType RadiusType
void SetRadius(const RadiusType &r)
FiniteDifferenceFunction()
Simulate a standard C array with copy semantics.
Base class of the Heaviside function.
SmartPointer< const Self > ConstPointer
void SetRadius(const SizeType &)
NeighborIndexType Size() const
OffsetValueType GetStride(DimensionValueType axis) const
void SetInitialImage(InputImageType *f)
void SetSharedData(SharedDataPointer sharedDataIn)
virtual void CalculateAdvectionImage()
typename InputImageType::SizeType InputSizeType
typename FeatureImageType::SpacingType FeatureSpacingType
virtual ScalarValueType ComputeInternalTerm(const FeaturePixelType &iValue, const FeatureIndexType &iIdx)=0
Compute the internal term.
HeavisideStepFunctionBase< InputPixelType, InputPixelType > HeavisideFunctionType
typename InputImageType::ConstPointer InputImageConstPointer
typename InputImageType::PixelType InputPixelType
~RegionBasedLevelSetFunction() override=default
virtual void SetFeatureImage(const FeatureImageType *f)
void SetOverlapPenaltyWeight(const ScalarValueType &gamma)
RegionBasedLevelSetFunction()
typename InputImageType::RegionType InputRegionType
TSharedData SharedDataType
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 ComputeVolumeRegularizationTerm()
Compute the overlap term.
RegionBasedLevelSetFunction Self
TimeStepType ComputeGlobalTimeStep(void *GlobalData) const override
typename InputImageType::Pointer InputImagePointer
typename FeatureImageType::PixelType FeaturePixelType
ScalarValueType m_AreaWeight
typename FeatureImageType::IndexType FeatureIndexType
typename InputImageType::SizeValueType InputSizeValueType
void ReleaseGlobalDataPointer(void *GlobalData) const override
typename SharedDataType::Pointer SharedDataPointer
ScalarValueType m_Lambda2
SharedDataPointer m_SharedData
ScalarValueType GetVolumeMatchingWeight() const
virtual const FeatureImageType * GetFeatureImage() const
ScalarValueType GetLambda1() const
ScalarValueType GetLambda2() const
ScalarValueType ComputeGlobalTerm(const ScalarValueType &imagePixel, const InputIndexType &inputIndex)
Compute the global term as a combination of the internal, external, overlapping and volume regulariza...
typename InputImageType::IndexType InputIndexType
virtual ScalarValueType ComputeExternalTerm(const FeaturePixelType &iValue, const FeatureIndexType &iIdx)=0
Compute the external term.
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...
void SetLambda2(const ScalarValueType &lambda2)
ScalarValueType m_Lambda1
void SetVolumeMatchingWeight(const ScalarValueType &tau)
ScalarValueType m_CurvatureWeight
typename FeatureImageType::ConstPointer FeatureImageConstPointer
unsigned int m_FunctionId
ScalarValueType GetReinitializationSmoothingWeight() const
ScalarValueType m_AdvectionWeight
std::slice x_slice[Self::ImageDimension]
virtual VectorType AdvectionField(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &=FloatOffsetType(0.0)) override
FixedArray< ScalarValueType, Self::ImageDimension > VectorType
void SetLambda1(const ScalarValueType &lambda1)
ScalarValueType GetCurvatureWeight() const
void SetFunctionId(const unsigned int iFid)
SmartPointer< const Self > ConstPointer
virtual ScalarValueType ComputeCurvature(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd)
void UpdateSharedData(bool forceUpdate)
ScalarValueType m_VolumeMatchingWeight
ScalarValueType GetVolume() const
SmartPointer< Self > Pointer
void * GetGlobalDataPointer() const override
ScalarValueType GetAdvectionWeight() const
ScalarValueType GetAreaWeight() const
double m_InvSpacing[Self::ImageDimension]
ScalarValueType m_OverlapPenaltyWeight
void SetReinitializationSmoothingWeight(const ScalarValueType c)
void SetAdvectionWeight(const ScalarValueType &iA)
typename HeavisideFunctionType::ConstPointer HeavisideFunctionConstPointer
virtual void Initialize(const RadiusType &r)
static constexpr unsigned int ImageDimension
typename InputImageType::IndexValueType InputIndexValueType
ScalarValueType GetOverlapPenaltyWeight() const
virtual void ComputeParameters()=0
Compute Parameters for the inner and outer parts.
PixelType ScalarValueType
void SetVolume(const ScalarValueType &volume)
FiniteDifferenceFunction< TInput > Superclass
void SetAreaWeight(const ScalarValueType &nu)
InputImageConstPointer m_InitialImage
static VectorType InitializeZeroVectorConstant()
ScalarValueType m_ReinitializationSmoothingWeight
virtual void SetCurvatureWeight(const ScalarValueType c)
FeatureImageConstPointer m_FeatureImage
typename InputImageType::PointType InputPointType
static VectorType m_ZeroVectorConstant
virtual void UpdateSharedDataParameters()=0
Update and save the inner and outer parameters in the shared data structure.
void SetDomainFunction(const HeavisideFunctionType *f)
typename FeatureImageType::OffsetType FeatureOffsetType
TFeature FeatureImageType
virtual ScalarValueType ComputeOverlapParameters(const FeatureIndexType &featIndex, ScalarValueType &pr)=0
Compute the overlap term.
OffsetValueType m_xStride[Self::ImageDimension]
void ComputeHessian(const NeighborhoodType &it, GlobalDataStruct *globalData)
Compute Hessian Matrix.
ScalarValueType ComputeLaplacian(GlobalDataStruct *gd)
Compute the laplacian term.
HeavisideFunctionConstPointer m_DomainFunction
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ScalarValueType m_dx_backward[Self::ImageDimension]
vnl_matrix_fixed< ScalarValueType, Self::ImageDimension, Self::ImageDimension > m_dxy
ScalarValueType m_dx[Self::ImageDimension]
ScalarValueType m_MaxCurvatureChange
ScalarValueType m_MaxGlobalChange
~GlobalDataStruct()=default
ScalarValueType m_MaxAdvectionChange
ScalarValueType m_GradMag
ScalarValueType m_dx_forward[Self::ImageDimension]
ScalarValueType m_GradMagSqr