|
ITK
5.2.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"
64 template <
typename TInput,
78 static constexpr
unsigned int ImageDimension = Superclass::ImageDimension;
104 m_MaxCurvatureChange = null_value;
105 m_MaxAdvectionChange = null_value;
106 m_MaxGlobalChange = null_value;
111 vnl_matrix_fixed<ScalarValueType, Self::ImageDimension, Self::ImageDimension>
m_dxy;
153 this->m_DomainFunction = f;
166 m_Center = it.
Size() / 2;
169 for (
unsigned int i = 0; i < ImageDimension; i++)
175 #if !defined(ITK_WRAPPING_PARSER)
179 this->m_SharedData = sharedDataIn;
184 UpdateSharedData(
bool forceUpdate);
189 return new GlobalDataStruct;
193 ComputeGlobalTimeStep(
void * GlobalData)
const override;
197 ComputeUpdate(
const NeighborhoodType & neighborhood,
199 const FloatOffsetType & = FloatOffsetType(0.0))
override;
207 virtual const FeatureImageType *
210 return m_FeatureImage.GetPointer();
218 for (
unsigned int i = 0; i < ImageDimension; i++)
220 this->m_InvSpacing[i] = 1 / spacing[i];
228 return this->m_ZeroVectorConstant;
235 this->m_AreaWeight = nu;
240 return this->m_AreaWeight;
248 this->m_Lambda1 = lambda1;
253 return this->m_Lambda1;
261 this->m_Lambda2 = lambda2;
266 return this->m_Lambda2;
274 this->m_OverlapPenaltyWeight = gamma;
279 return this->m_OverlapPenaltyWeight;
287 m_CurvatureWeight = c;
292 return m_CurvatureWeight;
299 this->m_AdvectionWeight = iA;
304 return this->m_AdvectionWeight;
311 m_ReinitializationSmoothingWeight = c;
316 return m_ReinitializationSmoothingWeight;
324 this->m_VolumeMatchingWeight = tau;
329 return this->m_VolumeMatchingWeight;
337 this->m_Volume = volume;
342 return this->m_Volume;
350 this->m_FunctionId = iFid;
356 delete (GlobalDataStruct *)GlobalData;
359 virtual ScalarValueType
360 ComputeCurvature(
const NeighborhoodType &,
const FloatOffsetType &, GlobalDataStruct * gd);
364 virtual ScalarValueType
372 virtual ScalarValueType
428 std::slice x_slice[Self::ImageDimension];
431 double m_InvSpacing[Self::ImageDimension];
469 ComputeVolumeRegularizationTerm();
484 ComputeLaplacian(GlobalDataStruct * gd);
492 ComputeParameters() = 0;
497 UpdateSharedDataParameters() = 0;
504 InitializeZeroVectorConstant();
511 #ifndef ITK_MANUAL_INSTANTIATION
512 # include "itkRegionBasedLevelSetFunction.hxx"
typename InputImageType::IndexType InputIndexType
ScalarValueType m_CurvatureWeight
virtual void CalculateAdvectionImage()
typename ConstNeighborhoodIterator< TInputImage >::RadiusType RadiusType
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 m_Lambda1
ScalarValueType GetReinitializationSmoothingWeight() const
vnl_matrix_fixed< ScalarValueType, Self::ImageDimension, Self::ImageDimension > m_dxy
ScalarValueType m_AdvectionWeight
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)
ScalarValueType m_AreaWeight
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
InputImageConstPointer m_InitialImage
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
void SetFunctionId(const unsigned int &iFid)
static VectorType m_ZeroVectorConstant
ImageBaseType::IndexType IndexType
void SetRadius(const SizeType &)
ScalarValueType m_ReinitializationSmoothingWeight
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
ScalarValueType m_OverlapPenaltyWeight
typename ImageType::PixelType PixelType
Simulate a standard C array with copy semantics.
FeatureImageConstPointer m_FeatureImage
void SetInitialImage(InputImageType *f)
virtual void SetCurvatureWeight(const ScalarValueType c)
typename HeavisideFunctionType::ConstPointer HeavisideFunctionConstPointer
SharedDataPointer m_SharedData
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
signed long OffsetValueType
ScalarValueType m_Lambda2
typename FeatureImageType::IndexType FeatureIndexType
typename InputImageType::IndexValueType InputIndexValueType
signed long IndexValueType
void SetAdvectionWeight(const ScalarValueType &iA)
void SetVolume(const ScalarValueType &volume)
TFeatureImage FeatureImageType
TInputImage InputImageType
void SetReinitializationSmoothingWeight(const ScalarValueType c)
ScalarValueType m_VolumeMatchingWeight
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
HeavisideFunctionConstPointer m_DomainFunction
typename InputImageType::Pointer InputImagePointer
typename InputImageType::RegionType InputRegionType
unsigned int m_FunctionId