Skip to content

Libs/Particles/CorrespondenceEvaluation.h

Namespaces

Name
shapeworks
User usage reporting (telemetry)

Classes

Name
struct shapeworks::CorrespondenceQualityRow
Per-subject-per-domain correspondence quality result row.
struct shapeworks::CorrespondenceQualityStats
Aggregate summary statistics.
struct shapeworks::CorrespondenceQualityReport
Full evaluation report.
class shapeworks::CorrespondenceEvaluation

Source code

#pragma once

#include <Eigen/Core>
#include <memory>
#include <string>
#include <vector>

namespace shapeworks {

class Project;
using ProjectHandle = std::shared_ptr<Project>;

struct CorrespondenceQualityRow {
  std::string subject;
  int domain = 0;
  double mean_dist = 0.0;    
  double max_dist = 0.0;     
  double bbox_diag = 0.0;    
  double norm_mean = 0.0;    
  double norm_max = 0.0;     
  bool is_template = false;  
};

struct CorrespondenceQualityStats {
  double mean = 0.0;
  double median = 0.0;
  double p95 = 0.0;
  double max = 0.0;
};

struct CorrespondenceQualityReport {
  std::vector<CorrespondenceQualityRow> rows;
  std::string template_subject;
  int num_evaluated = 0;                 
  int num_template_rows = 0;
  CorrespondenceQualityStats agg_raw;    
  CorrespondenceQualityStats agg_norm;   
};

class CorrespondenceEvaluation {
 public:
  enum class DistanceMethod { PointToCell, PointToPoint };

  static CorrespondenceQualityReport evaluate(ProjectHandle project,
                                              DistanceMethod method = DistanceMethod::PointToCell,
                                              const std::string& output_meshes_dir = "");
};

}  // namespace shapeworks

Updated on 2026-07-27 at 05:53:17 +0000