shapeworks::ParticleShapeStatistics
Public Functions
Name | |
---|---|
ParticleShapeStatistics() | |
~ParticleShapeStatistics() | |
int | DoPCA(std::vector< std::vector< Point >> global_pts, int domainsPerShape =1) |
int | DoPCA(ParticleSystem particleSystem, int domainsPerShape =1) |
itkStaticConstMacro(Dimension , unsigned int , VDimension ) | |
int | ImportPoints(std::vector< vnl_vector< double >> points, std::vector< int > group_ids) |
int | ReadPointFiles(const std::string & s) |
int | ReloadPointFiles() |
int | WriteCSVFile(const std::string & s) |
int | WriteCSVFile2(const std::string & s) |
int | ComputeModes() |
int | PrincipalComponentProjections() |
int | FisherLinearDiscriminant(unsigned int numModes) |
const int | SampleSize() |
const int | Group1SampleSize() |
const int | Group2SampleSize() |
const int | NumberOfDimensions() |
const int | GroupID(unsigned int i) |
const std::vector< int > & | GroupID() |
const vnl_matrix< double > & | Eigenvectors() |
const std::vector< double > & | Eigenvalues() |
const vnl_vector< double > & | Mean() |
const vnl_vector< double > & | Group1Mean() |
const vnl_vector< double > & | Group2Mean() |
const vnl_vector< double > & | NormalizedGroupDifference() |
const vnl_vector< double > & | GroupDifference() |
int | ComputeMedianShape(const int ID) |
double | L1Norm(unsigned int a, unsigned int b) |
Eigen::MatrixXd & | PCALoadings() |
const vnl_vector< double > & | FishersLDA() |
const vnl_matrix< double > & | ShapeMatrix() |
const vnl_matrix< double > & | RecenteredShape() |
std::vector< double > | PercentVarByMode() |
int | SimpleLinearRegression(const std::vector< double > & y, const std::vector< double > & x, double & a, double & b) const |
Eigen::VectorXd | get_compactness(std::function< void(float)> progress_callback) |
Eigen::VectorXd | get_specificity(std::function< void(float)> progress_callback) |
Eigen::VectorXd | get_generalization(std::function< void(float)> progress_callback) |
Eigen::MatrixXd | get_group1_matrix() |
Eigen::MatrixXd | get_group2_matrix() |
Public Attributes
Name | |
---|---|
constexpr static int | VDimension |
Public Functions Documentation
function ParticleShapeStatistics
inline ParticleShapeStatistics()
function ~ParticleShapeStatistics
inline ~ParticleShapeStatistics()
function DoPCA
int DoPCA(
std::vector< std::vector< Point >> global_pts,
int domainsPerShape =1
)
function DoPCA
int DoPCA(
ParticleSystem particleSystem,
int domainsPerShape =1
)
function itkStaticConstMacro
itkStaticConstMacro(
Dimension ,
unsigned int ,
VDimension
)
Dimensionality of the domain of the particle system.
function ImportPoints
int ImportPoints(
std::vector< vnl_vector< double >> points,
std::vector< int > group_ids
)
Loads a set of point files and pre-computes some statistics.
function ReadPointFiles
int ReadPointFiles(
const std::string & s
)
Loads a set of point files and pre-computes some statistics.
function ReloadPointFiles
int ReloadPointFiles()
Reloads a set of point files and recomputes some statistics.
function WriteCSVFile
int WriteCSVFile(
const std::string & s
)
Writes a text file in comma-separated format. Suitable for reading into excel or R or Matlab for analysis.
function WriteCSVFile2
int WriteCSVFile2(
const std::string & s
)
function ComputeModes
int ComputeModes()
Computes PCA modes from the set of correspondence mode positions. Requires that ReadPointFiles be called first.
function PrincipalComponentProjections
int PrincipalComponentProjections()
Computes the principal component loadings, or projections onto the principal componenent axes for each of the samples. ComputeModes must be called first.
function FisherLinearDiscriminant
int FisherLinearDiscriminant(
unsigned int numModes
)
Computes fishers linear discriminant line for best group separation.
function SampleSize
inline const int SampleSize()
Returns the sample size.
function Group1SampleSize
inline const int Group1SampleSize()
function Group2SampleSize
inline const int Group2SampleSize()
function NumberOfDimensions
inline const int NumberOfDimensions()
Returns the number of dimensions (this is number of points times Dimension)
function GroupID
inline const int GroupID(
unsigned int i
)
Returns the group ids
function GroupID
inline const std::vector< int > & GroupID()
function Eigenvectors
inline const vnl_matrix< double > & Eigenvectors()
Returns the eigenvectors/values.
function Eigenvalues
inline const std::vector< double > & Eigenvalues()
function Mean
inline const vnl_vector< double > & Mean()
Returns the mean shape.
function Group1Mean
inline const vnl_vector< double > & Group1Mean()
function Group2Mean
inline const vnl_vector< double > & Group2Mean()
function NormalizedGroupDifference
inline const vnl_vector< double > & NormalizedGroupDifference()
function GroupDifference
inline const vnl_vector< double > & GroupDifference()
function ComputeMedianShape
int ComputeMedianShape(
const int ID
)
Returns the median shape for the set of shapes with Group ID equal to the integer argument. For example, ComputeMedianShape(0) returns the median shape for the set of shapes with m_groupIDs == 0. The median shape is defined as the shape with the minimum sum of Euclidean L1 norms to all other shapes in that group. Arguments passed to this function are set to the index number of the median shape for Group A and Group B, respectively.
function L1Norm
double L1Norm(
unsigned int a,
unsigned int b
)
Returns the euclidean L1 norm between shape a and b
function PCALoadings
inline Eigen::MatrixXd & PCALoadings()
Returns the component loadings
function FishersLDA
inline const vnl_vector< double > & FishersLDA()
Returns the Fisher linear discriminant
function ShapeMatrix
inline const vnl_matrix< double > & ShapeMatrix()
Returns the shape matrix
function RecenteredShape
inline const vnl_matrix< double > & RecenteredShape()
Returns the shape with the mean subtracted
function PercentVarByMode
inline std::vector< double > PercentVarByMode()
function SimpleLinearRegression
int SimpleLinearRegression(
const std::vector< double > & y,
const std::vector< double > & x,
double & a,
double & b
) const
Computes a simple linear regression of the first list of values with respect to the second y=a + bx. Returns the estimated parameters a & b. Returns 0 on success and -1 on fail.
function get_compactness
Eigen::VectorXd get_compactness(
std::function< void(float)> progress_callback
)
function get_specificity
Eigen::VectorXd get_specificity(
std::function< void(float)> progress_callback
)
function get_generalization
Eigen::VectorXd get_generalization(
std::function< void(float)> progress_callback
)
function get_group1_matrix
Eigen::MatrixXd get_group1_matrix()
function get_group2_matrix
Eigen::MatrixXd get_group2_matrix()
Public Attributes Documentation
variable VDimension
static constexpr static int VDimension = 3;
Updated on 2022-03-31 at 09:51:18 -0600