FAST/Utility.cpp file

Contents

Namespaces

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

Functions

auto log2(double n) -> double
auto round(double n) -> double
auto round(double n, int decimals) -> double
auto allocateDataArray(unsigned int voxels, DataType type, unsigned int nrOfComponents) -> void*
template<class T>
void getMaxAndMinFromOpenCLImageResult(void* voidData, unsigned int size, unsigned int nrOfComponents, float* min, float* max)
auto getPowerOfTwoSize(unsigned int size) -> unsigned int
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::Image3D image, DataType type, float average, float* stddev)
void getIntensityStdDevFromOpenCLImage(OpenCLDevice::pointer device, cl::Image2D image, DataType type, float average, float* stddev)
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)
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
auto replace(std::string str, std::string find, std::string replacement) -> std::string
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
static auto compare_nocase(const std::string& first, const std::string& second) -> bool
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 fileSize(std::string filename) -> uint64_t
Returns size in bytes of file.
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.
static auto getConsoleWidth() -> int

Defines

#define _USE_MATH_DEFINES