19#include <boost/lexical_cast.hpp>
52 return (boost::lexical_cast<std::string>(
min) +
"-" + boost::lexical_cast<std::string>(
max));
60 min =
static_cast<T
>(
min * scaling + offset);
61 max =
static_cast<T
>(
max * scaling + offset);
72 double dMax = double(other.max);
75 double dMin = double(other.min);
79 other.max =
static_cast<T
>(dMax);
80 other.min =
static_cast<T
>(dMin);
81 other.m_size =
static_cast<T
>(dMax - dMin);
85 min =
static_cast<T
>(dMin);
86 max =
static_cast<T
>(dMax);
87 m_size =
static_cast<T
>(dMax - dMin);
Simple class that holds the extents (min/max) of a given dimension in a MD workspace or MDBox.
T max
Extent: maximum value in that dimension.
void scaleExtents(double scaling, double offset)
void setExtents(double dMin, double dMax)
MDDimensionExtents()
Empty constructor - reset everything.
T min
Extent: minimum value in that dimension.
void expand(MDDimensionExtents &other)
T getGridVertex(const size_t ind) const
return the vertice in the grid, based on this extent's size
T m_size
the box size; It is important to have box size defined from doubles to avoid accuracy loss when extra...
std::string extentsStr() const
Helper class which provides the Collimation Length for SANS instruments.