Skip to content

Commit

Permalink
#34 Added example docstring in geometry.hh
Browse files Browse the repository at this point in the history
  • Loading branch information
carljohnsen committed Feb 15, 2023
1 parent c8528c9 commit ec9b2f6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/lib/cpp/include/geometry.hh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,21 @@ void print_timestamp(string message) {
//fprintf(stderr,"%s at %02d:%02d:%02d\n", message.c_str(), local_tm.tm_hour, local_tm.tm_min, local_tm.tm_sec);
}

/*
Computes the center of mass of the given tomography.
@param voxels The given tomography.
@returns The 3D coordinates of the center of mass (in Z, Y, X).
*/
array<real_t,3> center_of_mass(const input_ndarray<mask_type> voxels);

/*
Computes the inertia matrix of the given tomography based of the given center of mass.
@param voxels The given tomography.
@param cm The given center of mass.
@returns The 3x3 inertia matrix.
*/
array<real_t,9> inertia_matrix(const input_ndarray<mask_type> &voxels, const array<real_t,3> &cm);

#endif

0 comments on commit ec9b2f6

Please sign in to comment.