Skip to content

shapeworks::ShapeWorksUtils

Public Functions

Name
time_point now()
get the current time
double elapsed(time_point start, time_point end, bool print_elapsed =true)
return elapsed time in seconds, optionally printing to console
unsigned get_rng_seed()
returns random seed
void set_rng_seed(const unsigned seed)
sets random seed
unsigned get_random_number()
generates random number
bool is_directory(const std::string & pathname)
returns true if pathname is a directory
bool file_exists(const std::string & filename)
returns true if filename exists
void setup_console_logging(bool show_progress, bool xml_status)
Set up the console logging options.
void set_progress_callback(void * ptr)
Set up a progress callback.
void setup_threads()
Set up the number of threads from TBB_NUM_THREADS env variable.
Matrix33 convert_matrix(const vtkSmartPointer< vtkMatrix4x4 > & mat)
converts a vtkMatrix4x4 to a Matrix33 and corresponding translationVector
Vector3 get_offset(const vtkSmartPointer< vtkMatrix4x4 > & mat)

Public Functions Documentation

function now

static inline time_point now()

get the current time

function elapsed

static double elapsed(
    time_point start,
    time_point end,
    bool print_elapsed =true
)

return elapsed time in seconds, optionally printing to console

function get_rng_seed

static inline unsigned get_rng_seed()

returns random seed

function set_rng_seed

static void set_rng_seed(
    const unsigned seed
)

sets random seed

function get_random_number

static inline unsigned get_random_number()

generates random number

function is_directory

static bool is_directory(
    const std::string & pathname
)

returns true if pathname is a directory

function file_exists

static bool file_exists(
    const std::string & filename
)

returns true if filename exists

function setup_console_logging

static void setup_console_logging(
    bool show_progress,
    bool xml_status
)

Set up the console logging options.

function set_progress_callback

static void set_progress_callback(
    void * ptr
)

Set up a progress callback.

function setup_threads

static void setup_threads()

Set up the number of threads from TBB_NUM_THREADS env variable.

function convert_matrix

static Matrix33 convert_matrix(
    const vtkSmartPointer< vtkMatrix4x4 > & mat
)

converts a vtkMatrix4x4 to a Matrix33 and corresponding translationVector

function get_offset

static Vector3 get_offset(
    const vtkSmartPointer< vtkMatrix4x4 > & mat
)

Updated on 2024-07-12 at 20:10:35 +0000