18 #ifndef __itkRegionBasedLevelSetFunction_h
19 #define __itkRegionBasedLevelSetFunction_h
23 #include "vnl/vnl_matrix_fixed.h"
64 template<
typename TInput,
66 typename TSharedData >
174 #if !defined( CABLE_CONFIGURATION )
185 return new GlobalDataStruct;
283 {
delete (GlobalDataStruct *)GlobalData; }
409 GlobalDataStruct *globalData);
433 #ifndef ITK_MANUAL_INSTANTIATION
434 #include "itkRegionBasedLevelSetFunction.hxx"
SharedDataType::Pointer SharedDataPointer
PixelType ScalarValueType
ScalarValueType GetOverlapPenaltyWeight() const
RegionBasedLevelSetFunction Self
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 m_MaxAdvectionChange
Light weight base class for most itk classes.
Superclass::NeighborhoodType NeighborhoodType
FeatureImageType::OffsetType FeatureOffsetType
SmartPointer< const Self > ConstPointer
FeatureImageType::ConstPointer FeatureImageConstPointer
InputImageType::ConstPointer InputImageConstPointer
ScalarValueType GetCurvatureWeight() const
SharedDataPointer m_SharedData
static const unsigned int ImageDimension
virtual void ReleaseGlobalDataPointer(void *GlobalData) const
signed long OffsetValueType
ScalarValueType m_dx[itkGetStaticConstMacro(ImageDimension)]
InputImageType::PixelType InputPixelType
Superclass::PixelType PixelType
void UpdateSharedData(bool forceUpdate)
HeavisideStepFunctionBase< InputPixelType, InputPixelType > HeavisideFunctionType
ScalarValueType m_OverlapPenaltyWeight
ScalarValueType ComputeGlobalTerm(const ScalarValueType &imagePixel, const InputIndexType &inputIndex)
Compute the global term as a combination of the internal, external, overlapping and volume regulariza...
signed long IndexValueType
OffsetValueType m_xStride[itkGetStaticConstMacro(ImageDimension)]
ScalarValueType m_VolumeMatchingWeight
void SetVolume(const ScalarValueType &volume)
InputImageType::SizeType InputSizeType
Vector< PixelRealType, itkGetStaticConstMacro(ImageDimension) > NeighborhoodScalesType
OffsetValueType GetStride(DimensionValueType axis) const
void SetAreaWeight(const ScalarValueType &nu)
virtual ~RegionBasedLevelSetFunction()
void SetReinitializationSmoothingWeight(const ScalarValueType c)
ConstNeighborhoodIterator< TInput >::RadiusType RadiusType
virtual void SetCurvatureWeight(const ScalarValueType c)
void operator=(const Self &)
virtual const FeatureImageType * GetFeatureImage() const
ScalarValueType m_MaxCurvatureChange
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
FeatureImageConstPointer m_FeatureImage
unsigned long SizeValueType
void SetInitialImage(InputImageType *f)
SmartPointer< Self > Pointer
void SetAdvectionWeight(const ScalarValueType &iA)
ScalarValueType m_Lambda2
InputImageType::IndexType InputIndexType
ScalarValueType GetLambda1() const
HeavisideFunctionType::ConstPointer HeavisideFunctionConstPointer
ScalarValueType GetLambda2() const
Simulate a standard C array with copy semnatics.
static const unsigned int ImageDimension
void * GetGlobalDataPointer() const
ConstNeighborhoodIterator< TInput, DefaultBoundaryConditionType > NeighborhoodType
NeighborIndexType Size() const
FeatureImageType::IndexType FeatureIndexType
virtual void ComputeParameters()=0
Compute Parameters for the inner and outer parts.
TSharedData SharedDataType
unsigned int m_FunctionId
InputImageType::IndexValueType InputIndexValueType
Superclass::NeighborhoodScalesType NeighborhoodScalesType
A templated class holding a n-Dimensional vector.
ScalarValueType m_Lambda1
ScalarValueType m_MaxGlobalChange
virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &=FloatOffsetType(0.0))
Superclass::FloatOffsetType FloatOffsetType
Superclass::ImageType ImageType
void ComputeHessian(const NeighborhoodType &it, GlobalDataStruct *globalData)
Compute Hessian Matrix.
TimeStepType ComputeGlobalTimeStep(void *GlobalData) const
FeatureImageType::PixelType FeaturePixelType
InputImageType::Pointer InputImagePointer
ImageType::PixelType PixelType
std::slice x_slice[itkGetStaticConstMacro(ImageDimension)]
vnl_matrix_fixed< ScalarValueType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) > m_dxy
virtual void CalculateAdvectionImage()
ScalarValueType ComputeLaplacian(GlobalDataStruct *gd)
Compute the laplacian term.
void SetLambda1(const ScalarValueType &lambda1)
ScalarValueType GetAdvectionWeight() const
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 SetRadius(const RadiusType &r)
ScalarValueType m_AdvectionWeight
HeavisideFunctionConstPointer m_DomainFunction
void SetSharedData(SharedDataPointer sharedDataIn)
InputImageType::RegionType InputRegionType
ScalarValueType m_AreaWeight
InputImageType::SizeValueType InputSizeValueType
Vector< float, itkGetStaticConstMacro(ImageDimension) > FloatOffsetType
double m_InvSpacing[itkGetStaticConstMacro(ImageDimension)]
RegionBasedLevelSetFunction()
ScalarValueType ComputeVolumeRegularizationTerm()
Compute the overlap term.
virtual void Initialize(const RadiusType &r)
ScalarValueType m_CurvatureWeight
FixedArray< ScalarValueType, itkGetStaticConstMacro(ImageDimension) > VectorType
virtual void UpdateSharedDataParameters()=0
Update and save the inner and outer parameters in the shared data structure.
void SetVolumeMatchingWeight(const ScalarValueType &tau)
virtual void SetFeatureImage(const FeatureImageType *f)
FiniteDifferenceFunction< TInput > Superclass
ScalarValueType GetAreaWeight() const
TFeature FeatureImageType
void SetLambda2(const ScalarValueType &lambda2)
void SetFunctionId(const unsigned int &iFid)
Define additional traits for native types such as int or float.
virtual VectorType AdvectionField(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
ScalarValueType m_dx_forward[itkGetStaticConstMacro(ImageDimension)]
void SetDomainFunction(const HeavisideFunctionType *f)
void SetRadius(const SizeType &)
FeatureImageType::SpacingType FeatureSpacingType
ScalarValueType m_ReinitializationSmoothingWeight
ScalarValueType m_GradMag
void SetOverlapPenaltyWeight(const ScalarValueType &gamma)
InputImageConstPointer m_InitialImage
ScalarValueType m_GradMagSqr
virtual ScalarValueType ComputeExternalTerm(const FeaturePixelType &iValue, const FeatureIndexType &iIdx)=0
Compute the external term.
virtual ScalarValueType ComputeCurvature(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd)
ScalarValueType GetReinitializationSmoothingWeight() const
virtual ScalarValueType ComputeInternalTerm(const FeaturePixelType &iValue, const FeatureIndexType &iIdx)=0
Compute the internal term.
static VectorType InitializeZeroVectorConstant()
ScalarValueType GetVolumeMatchingWeight() const
LevelSet function that computes a speed image based on regional integrals.
ScalarValueType GetVolume() const
virtual ScalarValueType ComputeOverlapParameters(const FeatureIndexType &featIndex, ScalarValueType &pr)=0
Compute the overlap term.
ScalarValueType m_dx_backward[itkGetStaticConstMacro(ImageDimension)]
InputImageType::PointType InputPointType
static VectorType m_ZeroVectorConstant
Base class of the Heaviside function.
Superclass::RadiusType RadiusType