Skip to content

shapeworks::Constraints

Public Types

Name
using itk::Point< double, 3 > Point3

Public Functions

Name
Constraints()
~Constraints()
void addPlane(const vnl_vector< double > & a, const vnl_vector< double > & b, const vnl_vector< double > & c)
void addSphere(const vnl_vector_fixed< double, DIMENSION > & v, double r)
void addFreeFormConstraint(std::shared_ptr< shapeworks::Mesh > mesh)
bool transformConstraints(const vnl_matrix_fixed< double, 4, 4 > & transform)
bool transformPlanes(const vnl_matrix_fixed< double, 4, 4 > & transform)
std::stringstream applyBoundaryConstraints(vnl_vector_fixed< double, 3 > & gradE, const Point3 & pos)
std::stringstream applyBoundaryConstraints(vnl_vector_fixed< float, 3 > & gradE, const Point3 & pos)
std::stringstream applyPlaneConstraints(vnl_vector_fixed< double, 3 > & gradE, const Point3 & pos)
bool writePlanes(std::string filename)
bool writeSpheres(std::string filename)
bool writeFreeFormConstraint(std::string filename)
bool isCuttingPlaneDefined() const
bool isCuttingSphereDefined() const
std::vector< PlaneConstraint > & getPlaneConstraints()
std::vector< SphereConstraint > & getSphereConstraints()
bool isAnyViolated(const Point3 & pos)
std::vector< int > planesViolated(Eigen::Vector3d pt)
void printAll()
std::string violationReport(const Point3 & pos)
std::vector< std::vector< double > > violationReportData(const Point3 & pos)
vnl_vector_fixed< double, 3 > constraintsGradient(const Point3 & pos) const
vnl_vector_fixed< double, 3 > constraintsLagrangianGradient(const Point3 & pos, const Point3 & prepos, double C)
void InitializeLagrangianParameters(double lambda, double mu, double z)
void UpdateZs(const Point3 & pos, double C)
void UpdateMus(const Point3 & pos, double C)
bool GetActive()
void SetActive(bool ac)
void Read(std::string filename)
void Write(std::string filename)
FreeFormConstraint & getFreeformConstraint()
bool hasConstraints()
void clipMesh(Mesh & mesh)

Public Types Documentation

using Point3

using shapeworks::Constraints::Point3 =  itk::Point<double, 3>;

Public Functions Documentation

function Constraints

inline Constraints()

function ~Constraints

inline ~Constraints()

function addPlane

void addPlane(
    const vnl_vector< double > & a,
    const vnl_vector< double > & b,
    const vnl_vector< double > & c
)

function addSphere

void addSphere(
    const vnl_vector_fixed< double, DIMENSION > & v,
    double r
)

function addFreeFormConstraint

void addFreeFormConstraint(
    std::shared_ptr< shapeworks::Mesh > mesh
)

function transformConstraints

bool transformConstraints(
    const vnl_matrix_fixed< double, 4, 4 > & transform
)

function transformPlanes

bool transformPlanes(
    const vnl_matrix_fixed< double, 4, 4 > & transform
)

function applyBoundaryConstraints

std::stringstream applyBoundaryConstraints(
    vnl_vector_fixed< double, 3 > & gradE,
    const Point3 & pos
)

function applyBoundaryConstraints

std::stringstream applyBoundaryConstraints(
    vnl_vector_fixed< float, 3 > & gradE,
    const Point3 & pos
)

function applyPlaneConstraints

std::stringstream applyPlaneConstraints(
    vnl_vector_fixed< double, 3 > & gradE,
    const Point3 & pos
)

function writePlanes

inline bool writePlanes(
    std::string filename
)

function writeSpheres

inline bool writeSpheres(
    std::string filename
)

function writeFreeFormConstraint

inline bool writeFreeFormConstraint(
    std::string filename
)

function isCuttingPlaneDefined

inline bool isCuttingPlaneDefined() const

function isCuttingSphereDefined

inline bool isCuttingSphereDefined() const

function getPlaneConstraints

inline std::vector< PlaneConstraint > & getPlaneConstraints()

function getSphereConstraints

inline std::vector< SphereConstraint > & getSphereConstraints()

function isAnyViolated

bool isAnyViolated(
    const Point3 & pos
)

function planesViolated

std::vector< int > planesViolated(
    Eigen::Vector3d pt
)

function printAll

void printAll()

function violationReport

std::string violationReport(
    const Point3 & pos
)

function violationReportData

std::vector< std::vector< double > > violationReportData(
    const Point3 & pos
)

function constraintsGradient

vnl_vector_fixed< double, 3 > constraintsGradient(
    const Point3 & pos
) const

function constraintsLagrangianGradient

vnl_vector_fixed< double, 3 > constraintsLagrangianGradient(
    const Point3 & pos,
    const Point3 & prepos,
    double C
)

function InitializeLagrangianParameters

void InitializeLagrangianParameters(
    double lambda,
    double mu,
    double z
)

function UpdateZs

void UpdateZs(
    const Point3 & pos,
    double C
)

function UpdateMus

void UpdateMus(
    const Point3 & pos,
    double C
)

function GetActive

inline bool GetActive()

function SetActive

inline void SetActive(
    bool ac
)

function Read

void Read(
    std::string filename
)

function Write

void Write(
    std::string filename
)

function getFreeformConstraint

FreeFormConstraint & getFreeformConstraint()

function hasConstraints

bool hasConstraints()

function clipMesh

void clipMesh(
    Mesh & mesh
)

Updated on 2022-07-23 at 17:50:03 -0600