Skip to content

shapeworks::Sampler

Public Classes

Name
struct CuttingPlaneType
struct SphereType

Public Types

Name
using float PixelType
using itk::Image< PixelType, Dimension > ImageType
using ImageType::PointType PointType
using MeanCurvatureContainer< PixelType, Dimension > MeanCurvatureCacheType
using vnl_matrix_fixed< double, Dimension+1, Dimension+1 > TransformType
using GradientDescentOptimizer OptimizerType
using std::vector< std::vector< std::pair< Eigen::Vector3d, Eigen::Vector3d > > > CuttingPlaneList

Public Functions

Name
Sampler()
Constructor.
virtual ~Sampler()
Destructor.
ParticleSystem * GetParticleSystem()
Returns the particle system.
const ParticleSystem * GetParticleSystem() const
SamplingFunction * GetCurvatureGradientFunction()
OptimizerType * GetOptimizer()
Return a pointer to the optimizer object.
const OptimizerType * GetOptimizer() const
void SetPointsFile(unsigned int i, const std::string & s)
void SetPointsFile(const std::string & s)
void SetInitialPoints(std::vector< std::vector< itk::Point< double > > > initial_points)
Set initial particle positions (e.g. for fixed subjects)
void AddImage(ImageType::Pointer image, double narrow_band, std::string name ="")
void ApplyConstraintsToZeroCrossing()
void AddMesh(std::shared_ptr< shapeworks::MeshWrapper > mesh, double geodesic_remesh_percent =100)
void AddContour(vtkSmartPointer< vtkPolyData > poly_data)
void SetFieldAttributes(const std::vector< std::string > & s)
void SetDomainsPerShape(int n)
void SetCuttingPlane(unsigned int i, const vnl_vector_fixed< double, Dimension > & va, const vnl_vector_fixed< double, Dimension > & vb, const vnl_vector_fixed< double, Dimension > & vc)
void AddFreeFormConstraint(int domain, const FreeFormConstraint & ffc)
void TransformCuttingPlanes(unsigned int i)
void AddSphere(unsigned int i, vnl_vector_fixed< double, Dimension > & c, double r)
void SetAdaptivityMode()
void SetCorrespondenceOn()
void SetCorrespondenceOff()
void SetSamplingOn()
void SetSamplingOff()
bool GetCorrespondenceOn() const
bool GetSamplingOn() const
void SetCorrespondenceMode(shapeworks::CorrespondenceMode mode)
void RegisterGeneralShapeMatrices()
void SetAttributeScales(const std::vector< double > & s)
void SetXYZ(unsigned int i, bool flag)
void SetNormals(int i, bool flag)
void SetAttributesPerDomain(const std::vector< int > s)
LegacyShapeMatrix * GetShapeMatrix()
ShapeMatrix * GetGeneralShapeMatrix()
ShapeGradientMatrix * GetGeneralShapeGradientMatrix()
DualVectorFunction * GetLinkingFunction()
LegacyCorrespondenceFunction * GetEnsembleEntropyFunction()
DisentangledCorrespondenceFunction * GetDisentangledEnsembleEntropyFunction()
LegacyCorrespondenceFunction * GetEnsembleRegressionEntropyFunction()
LegacyCorrespondenceFunction * GetEnsembleMixedEffectsEntropyFunction()
CorrespondenceFunction * GetMeshBasedGeneralEntropyGradientFunction()
const DualVectorFunction * GetLinkingFunction() const
const LegacyCorrespondenceFunction * GetEnsembleEntropyFunction() const
const DisentangledCorrespondenceFunction * GetDisentangledEnsembleEntropyFunction() const
const LegacyCorrespondenceFunction * GetEnsembleRegressionEntropyFunction() const
const LegacyCorrespondenceFunction * GetEnsembleMixedEffectsEntropyFunction() const
const CorrespondenceFunction * GetMeshBasedGeneralEntropyGradientFunction() const
void SetTimeptsPerIndividual(int n)
shapeworks::CorrespondenceMode GetCorrespondenceMode() const
void SetTransformFile(const std::string & s)
void SetTransformFile(const char * s)
void SetPrefixTransformFile(const std::string & s)
void SetPrefixTransformFile(const char * s)
void SetPairwisePotentialType(int pairwise_potential_type)
int GetPairwisePotentialType()
void SetVerbosity(unsigned int val)
unsigned int GetVerbosity()
void SetSharedBoundaryEnabled(bool enabled)
void SetSharedBoundaryWeight(double weight)
void ReadTransforms()
void ReadPointsFiles()
void AllocateDataCaches()
void AllocateDomainsAndNeighborhoods()
void InitializeOptimizationFunctions()
void initialize_initial_positions()
void Initialize()
void ReInitialize()
void Execute()
CuttingPlaneList ComputeCuttingPlanes()
Eigen::Vector3d ComputePlaneNormal(const vnl_vector< double > & a, const vnl_vector< double > & b, const vnl_vector< double > & c)
std::vector< FreeFormConstraint > GetFFCs()
void SetMeshFFCMode(bool mesh_ffc_mode)

Public Attributes

Name
constexpr unsigned int Dimension

Public Types Documentation

using PixelType

using shapeworks::Sampler::PixelType =  float;

using ImageType

using shapeworks::Sampler::ImageType =  itk::Image<PixelType, Dimension>;

using PointType

using shapeworks::Sampler::PointType =  ImageType::PointType;

using MeanCurvatureCacheType

using shapeworks::Sampler::MeanCurvatureCacheType =  MeanCurvatureContainer<PixelType, Dimension>;

using TransformType

using shapeworks::Sampler::TransformType =  vnl_matrix_fixed<double, Dimension + 1, Dimension + 1>;

using OptimizerType

using shapeworks::Sampler::OptimizerType =  GradientDescentOptimizer;

using CuttingPlaneList

using shapeworks::Sampler::CuttingPlaneList =  std::vector<std::vector<std::pair<Eigen::Vector3d, Eigen::Vector3d> >>;

Public Functions Documentation

function Sampler

Sampler()

Constructor.

function ~Sampler

inline virtual ~Sampler()

Destructor.

function GetParticleSystem

inline ParticleSystem * GetParticleSystem()

Returns the particle system.

function GetParticleSystem

inline const ParticleSystem * GetParticleSystem() const

function GetCurvatureGradientFunction

inline SamplingFunction * GetCurvatureGradientFunction()

function GetOptimizer

inline OptimizerType * GetOptimizer()

Return a pointer to the optimizer object.

function GetOptimizer

inline const OptimizerType * GetOptimizer() const

function SetPointsFile

inline void SetPointsFile(
    unsigned int i,
    const std::string & s
)

Optionally provide a filename for an initial point set.

function SetPointsFile

inline void SetPointsFile(
    const std::string & s
)

function SetInitialPoints

inline void SetInitialPoints(
    std::vector< std::vector< itk::Point< double > > > initial_points
)

Set initial particle positions (e.g. for fixed subjects)

function AddImage

void AddImage(
    ImageType::Pointer image,
    double narrow_band,
    std::string name =""
)

function ApplyConstraintsToZeroCrossing

inline void ApplyConstraintsToZeroCrossing()

function AddMesh

void AddMesh(
    std::shared_ptr< shapeworks::MeshWrapper > mesh,
    double geodesic_remesh_percent =100
)

function AddContour

void AddContour(
    vtkSmartPointer< vtkPolyData > poly_data
)

function SetFieldAttributes

void SetFieldAttributes(
    const std::vector< std::string > & s
)

function SetDomainsPerShape

inline void SetDomainsPerShape(
    int n
)

function SetCuttingPlane

void SetCuttingPlane(
    unsigned int i,
    const vnl_vector_fixed< double, Dimension > & va,
    const vnl_vector_fixed< double, Dimension > & vb,
    const vnl_vector_fixed< double, Dimension > & vc
)

Optionally supply a cutting plane that will be set as a particle optimization constraint in the image domains.

function AddFreeFormConstraint

void AddFreeFormConstraint(
    int domain,
    const FreeFormConstraint & ffc
)

function TransformCuttingPlanes

void TransformCuttingPlanes(
    unsigned int i
)

Transform a cutting plane based on procrustes transformation

function AddSphere

void AddSphere(
    unsigned int i,
    vnl_vector_fixed< double, Dimension > & c,
    double r
)

Optionally add spheres that may be used as constraints to the domain.

function SetAdaptivityMode

inline void SetAdaptivityMode()

function SetCorrespondenceOn

inline void SetCorrespondenceOn()

function SetCorrespondenceOff

inline void SetCorrespondenceOff()

function SetSamplingOn

inline void SetSamplingOn()

function SetSamplingOff

inline void SetSamplingOff()

function GetCorrespondenceOn

inline bool GetCorrespondenceOn() const

function GetSamplingOn

inline bool GetSamplingOn() const

function SetCorrespondenceMode

void SetCorrespondenceMode(
    shapeworks::CorrespondenceMode mode
)

This method sets the optimization function for correspondences between surfaces (domains).

function RegisterGeneralShapeMatrices

inline void RegisterGeneralShapeMatrices()

function SetAttributeScales

inline void SetAttributeScales(
    const std::vector< double > & s
)

function SetXYZ

inline void SetXYZ(
    unsigned int i,
    bool flag
)

function SetNormals

inline void SetNormals(
    int i,
    bool flag
)

function SetAttributesPerDomain

void SetAttributesPerDomain(
    const std::vector< int > s
)

function GetShapeMatrix

inline LegacyShapeMatrix * GetShapeMatrix()

function GetGeneralShapeMatrix

inline ShapeMatrix * GetGeneralShapeMatrix()

function GetGeneralShapeGradientMatrix

inline ShapeGradientMatrix * GetGeneralShapeGradientMatrix()

function GetLinkingFunction

inline DualVectorFunction * GetLinkingFunction()

function GetEnsembleEntropyFunction

inline LegacyCorrespondenceFunction * GetEnsembleEntropyFunction()

function GetDisentangledEnsembleEntropyFunction

inline DisentangledCorrespondenceFunction * GetDisentangledEnsembleEntropyFunction()

function GetEnsembleRegressionEntropyFunction

inline LegacyCorrespondenceFunction * GetEnsembleRegressionEntropyFunction()

function GetEnsembleMixedEffectsEntropyFunction

inline LegacyCorrespondenceFunction * GetEnsembleMixedEffectsEntropyFunction()

function GetMeshBasedGeneralEntropyGradientFunction

inline CorrespondenceFunction * GetMeshBasedGeneralEntropyGradientFunction()

function GetLinkingFunction

inline const DualVectorFunction * GetLinkingFunction() const

function GetEnsembleEntropyFunction

inline const LegacyCorrespondenceFunction * GetEnsembleEntropyFunction() const

function GetDisentangledEnsembleEntropyFunction

inline const DisentangledCorrespondenceFunction * GetDisentangledEnsembleEntropyFunction() const

function GetEnsembleRegressionEntropyFunction

inline const LegacyCorrespondenceFunction * GetEnsembleRegressionEntropyFunction() const

function GetEnsembleMixedEffectsEntropyFunction

inline const LegacyCorrespondenceFunction * GetEnsembleMixedEffectsEntropyFunction() const

function GetMeshBasedGeneralEntropyGradientFunction

inline const CorrespondenceFunction * GetMeshBasedGeneralEntropyGradientFunction() const

function SetTimeptsPerIndividual

inline void SetTimeptsPerIndividual(
    int n
)

function GetCorrespondenceMode

inline shapeworks::CorrespondenceMode GetCorrespondenceMode() const

function SetTransformFile

inline void SetTransformFile(
    const std::string & s
)

function SetTransformFile

inline void SetTransformFile(
    const char * s
)

function SetPrefixTransformFile

inline void SetPrefixTransformFile(
    const std::string & s
)

function SetPrefixTransformFile

inline void SetPrefixTransformFile(
    const char * s
)

function SetPairwisePotentialType

inline void SetPairwisePotentialType(
    int pairwise_potential_type
)

function GetPairwisePotentialType

inline int GetPairwisePotentialType()

function SetVerbosity

inline void SetVerbosity(
    unsigned int val
)

function GetVerbosity

inline unsigned int GetVerbosity()

function SetSharedBoundaryEnabled

inline void SetSharedBoundaryEnabled(
    bool enabled
)

function SetSharedBoundaryWeight

inline void SetSharedBoundaryWeight(
    double weight
)

function ReadTransforms

void ReadTransforms()

function ReadPointsFiles

void ReadPointsFiles()

function AllocateDataCaches

void AllocateDataCaches()

function AllocateDomainsAndNeighborhoods

void AllocateDomainsAndNeighborhoods()

function InitializeOptimizationFunctions

void InitializeOptimizationFunctions()

function initialize_initial_positions

void initialize_initial_positions()

function Initialize

inline void Initialize()

function ReInitialize

void ReInitialize()

function Execute

void Execute()

function ComputeCuttingPlanes

CuttingPlaneList ComputeCuttingPlanes()

function ComputePlaneNormal

Eigen::Vector3d ComputePlaneNormal(
    const vnl_vector< double > & a,
    const vnl_vector< double > & b,
    const vnl_vector< double > & c
)

function GetFFCs

inline std::vector< FreeFormConstraint > GetFFCs()

function SetMeshFFCMode

inline void SetMeshFFCMode(
    bool mesh_ffc_mode
)

Public Attributes Documentation

variable Dimension

static constexpr unsigned int Dimension = 3;

Updated on 2024-11-11 at 19:51:46 +0000