Mantid
Loading...
Searching...
No Matches
Namespaces | Functions
CoordinateConversion.h File Reference
#include "Types.h"
#include <algorithm>
#include <cmath>
#include <iomanip>

Go to the source code of this file.

Namespaces

namespace  morton_index
 

Functions

template<size_t ND, typename IntT , typename MortonT >
MortonT morton_index::calculateDefaultBound (IntT intBound)
 
template<int ND>
size_t morton_index::CalculateRequiredCoordinateIntegerWidth (const MDSpaceBounds< ND > &bounds, const MDSpaceSteps< ND > &steps)
 Calculates the required width of the interleaved integer to accurately represent coordinates in a given space at a given resolution. More...
 
template<int ND>
bool morton_index::CheckCoordinatesInMDSpace (const MDSpaceBounds< ND > &bounds, const MDCoordinate< ND > &coord)
 Checks that a coordinate is within the extents of an MD space. More...
 
template<typename IntT >
float morton_index::ConvertCoordinateFromIntegerRange (IntT value, float lower, float upper)
 Converts a single integer coordinate to a floating point. More...
 
template<int ND, typename IntT >
MDCoordinate< ND > morton_index::ConvertCoordinatesFromIntegerRange (const MDSpaceBounds< ND > &bounds, const Eigen::Array< IntT, ND, 1 > &intCoord)
 Converts a point expressed as integer coordinates back to floating point, given bounds of the original coordinate space. More...
 
template<int ND, typename IntT >
Eigen::Array< IntT, ND, 1 > morton_index::ConvertCoordinatesToIntegerRange (const MDSpaceBounds< ND > &bounds, const float *crd)
 Converts a point to integer range given a range of floating point coordinates. More...
 
template<typename IntT >
IntT morton_index::ConvertCoordinateToIntegerRange (float value, float lower, float upper)
 Converts a single floating point coordinate to an integer range. More...
 
template<size_t nd, typename IntT , typename MortonT , typename coord_t = float>
MortonT morton_index::coordinatesToIndex (coord_t *coord, const MDSpaceBounds< nd > &space)
 
template<int ND>
void morton_index::ExpandBounds (MDSpaceBounds< ND > &bounds)
 Expands a coordinate space enough that floating point error cannot cause an overflow when mapping a value at the upper limit of the range to an integer range. More...
 
template<size_t nd, typename IntT , typename MortonT >
MDCoordinate< nd > morton_index::indexToCoordinates (const MortonT &idx, const MDSpaceBounds< nd > &space)
 
template<typename MortonT >
bool morton_index::morton_contains (const MortonT lower, const MortonT upper, const MortonT value)
 Checks if a point defined by a Morton number is within the box bounds (as defined by an upper and lower Morton number). More...