Libs/Common/ShapeworksUtils.h
Namespaces
| Name |
|---|
| shapeworks User usage reporting (telemetry) |
Classes
| Name | |
|---|---|
| class | shapeworks::ShapeWorksUtils |
Source code
```cpp
pragma once
include
include
include
include
include
include
include "Shapeworks.h"
namespace shapeworks {
class ShapeWorksUtils {
using time_point = std::chrono::time_point
public: static time_point now() { return std::chrono::steady_clock::now(); }
static double elapsed(time_point start, time_point end, bool print_elapsed = true);
static unsigned get_rng_seed() { return rng_seed_; }
static void set_rng_seed(const unsigned seed);
static unsigned get_random_number() { return mt_(); }
// TODO: in C++17 this is a standard function static bool is_directory(const std::string& pathname);
// TODO: in C++17 this is a standard function static bool file_exists(const std::string& filename);
static void setup_console_logging(bool show_progress, bool xml_status);
static void set_progress_callback(void* ptr);
static void setup_threads();
static Matrix33 convert_matrix(const vtkSmartPointer
private:
static unsigned rng_seed_;
static std::mt19937 mt_;
static std::unique_ptr
} // namespace shapeworks ```
Updated on 2026-03-31 at 16:02:11 +0000