FAST/Utility.hpp file

Contents

Namespaces

namespace fast
FAST namespace - All FAST code lives in this namespace.

Classes

class fast::Progress
A utility class for keeping track of progress and printing progress to the console.

Functions

auto log2(double n) -> double
auto round(double n) -> double
auto round(double n, int decimals) -> double
template<typename ... Args>
auto format(std::string format, Args && ... args) -> std::string
template<class T>
auto min(T a, T b) -> T
template<class T>
auto max(T a, T b) -> T
template<class T>
auto sign(T value) -> T
auto getPowerOfTwoSize(unsigned int size) -> unsigned int
auto allocateDataArray(unsigned int voxels, DataType type, unsigned int nrOfComponents) -> void*
template<class T>
auto getSumFromOpenCLImageResult(void* voidData, unsigned int size, unsigned int nrOfComponents) -> float
void getMaxAndMinFromOpenCLImage(OpenCLDevice::pointer device, cl::Image2D image, DataType type, float* min, float* max)
void getMaxAndMinFromOpenCLImage(OpenCLDevice::pointer device, cl::Image3D image, DataType type, float* min, float* max)
void getMaxAndMinFromOpenCLBuffer(OpenCLDevice::pointer device, cl::Buffer buffer, unsigned int size, DataType type, float* min, float* max)
void getIntensitySumFromOpenCLImage(OpenCLDevice::pointer device, cl::Image2D image, DataType type, float* sum)
void getIntensitySumFromOpenCLImage(OpenCLDevice::pointer device, cl::Image3D image, DataType type, float* sum)
void getIntensityStdDevFromOpenCLImage(OpenCLDevice::pointer device, cl::Image2D image, DataType type, float average, float* stddev)
void getIntensityStdDevFromOpenCLImage(OpenCLDevice::pointer device, cl::Image3D image, DataType type, float average, float* stddev)
template<class T>
void getMaxAndMinFromData(void* voidData, unsigned int nrOfElements, float* min, float* max)
template<class T>
auto getSumFromData(void* voidData, unsigned int nrOfElements) -> float
template<class T>
auto getStandardDeviationFromData(void* voidData, unsigned int nrOfElements) -> float
auto createRegion(unsigned int x, unsigned int y, unsigned int z) -> cl::size_t<3>
auto createRegion(Vector3ui size) -> cl::size_t<3>
auto createOrigoRegion() -> cl::size_t<3>
auto getCLErrorString(cl_int err) -> std::string
static void ltrim(std::string& s)
static void rtrim(std::string& s)
static void trim(std::string& s)
auto replace(std::string str, std::string find, std::string replacement) -> std::string
template<class T>
static void hash_combine(std::size_t& seed, const T& v)
auto loadPerspectiveMatrix(float fovy, float aspect, float zNear, float zFar) -> Matrix4f
auto loadOrthographicMatrix(float left, float right, float bottom, float top, float zNear, float zFar) -> Matrix4f
auto fileSize(std::string filename) -> uint64_t
Returns size in bytes of file.
auto stringToLower(std::string) -> std::string
Convert string to only upper case.
auto stringToUpper(std::string) -> std::string
Convert string to only lower case.
auto generateRandomString(int length) -> std::string
Generate random alphanumeric string of a given length.
auto roundToString(double value, int decimals = 0) -> std::string
Round double to a certain number of decimals, then convert to string.
auto roundToString(float value, int decimals = 0) -> std::string
Round float to a certain number of decimals, then convert to string.