Mantid
|
#include <MDHistoDimension.h>
Public Member Functions | |
coord_t | getBinWidth () const override |
Return the width of one bin. More... | |
const std::string & | getDimensionId () const override |
Short name which identify the dimension among other dimension. More... | |
coord_t | getMaximum () const override |
Returns the maximum extent of this dimension. More... | |
const MDFrame & | getMDFrame () const override |
Return the md frame. More... | |
const Kernel::MDUnit & | getMDUnits () const override |
Returns the unit. More... | |
coord_t | getMinimum () const override |
Returns the minimum extent of this dimension. More... | |
std::string | getName () const override |
Return the name of the dimension as can be displayed along the axis. More... | |
size_t | getNBins () const override |
number of bins dimension have (an integrated has one). More... | |
size_t | getNBoundaries () const override |
number of bin boundaries (axis points) More... | |
const Kernel::UnitLabel | getUnits () const override |
Return the units of the dimension as a string. More... | |
coord_t | getX (size_t index) const override |
Get coordinate for index;. More... | |
MDHistoDimension (const IMDDimension *other) | |
copy constructor More... | |
MDHistoDimension (std::string name, std::string ID, const MDFrame &frame, coord_t min, coord_t max, size_t numBins) | |
Constructor for simple MDHistoDimension. More... | |
void | setMDFrame (const MDFrame &frame) |
Set the MDFrame. More... | |
void | setRange (size_t nBins, coord_t min, coord_t max) override |
Change the extents and number of bins. More... | |
std::string | toXMLString () const override |
Dimensions must be xml serializable. More... | |
Public Member Functions inherited from Mantid::Geometry::IMDDimension | |
virtual coord_t | getBinWidth () const |
virtual const std::string & | getDimensionId () const =0 |
short name which identify the dimension among other dimension. More... | |
virtual bool | getIsIntegrated () const |
virtual coord_t | getMaximum () const =0 |
virtual const Geometry::MDFrame & | getMDFrame () const =0 |
virtual const Kernel::MDUnit & | getMDUnits () const =0 |
virtual coord_t | getMinimum () const =0 |
virtual std::string | getName () const =0 |
virtual size_t | getNBins () const =0 |
virtual size_t | getNBoundaries () const =0 |
virtual const Kernel::UnitLabel | getUnits () const =0 |
virtual coord_t | getX (size_t ind) const =0 |
bool | operator!= (const IMDDimension &) const |
bool | operator== (const IMDDimension &) const |
virtual void | setRange (size_t nBins, coord_t min, coord_t max)=0 |
Change the extents and number of bins. More... | |
virtual std::string | toXMLString () const =0 |
virtual | ~IMDDimension ()=default |
Destructor. More... | |
Private Attributes | |
coord_t | m_binWidth |
Calculated bin size. More... | |
std::string | m_dimensionId |
ID string. More... | |
Geometry::MDFrame_uptr | m_frame |
Multidimensional frame. More... | |
coord_t | m_max |
Extent of dimension. More... | |
coord_t | m_min |
Extent of dimension. More... | |
std::string | m_name |
Name. More... | |
size_t | m_numBins |
Number of bins. More... | |
A very simple implementation of a IMDDimension, describing the limits and number of bins in a dimension.
Definition at line 31 of file MDHistoDimension.h.
|
inline |
Constructor for simple MDHistoDimension.
name | :: full name of the axis |
ID | :: identifier string |
frame | :: MDFrame |
min | :: minimum extent |
max | :: maximum extent |
numBins | :: number of bins (evenly spaced) |
Definition at line 41 of file MDHistoDimension.h.
|
inline |
copy constructor
other | :: other IMDDimension |
Definition at line 53 of file MDHistoDimension.h.
|
inlineoverridevirtual |
Return the width of one bin.
Reimplemented from Mantid::Geometry::IMDDimension.
Definition at line 96 of file MDHistoDimension.h.
|
inlineoverridevirtual |
Short name which identify the dimension among other dimension.
A dimension can be usually found by its ID and various various method exist to manipulate set of dimensions by their names.
Implements Mantid::Geometry::IMDDimension.
Definition at line 74 of file MDHistoDimension.h.
Referenced by toXMLString().
|
inlineoverridevirtual |
Returns the maximum extent of this dimension.
Implements Mantid::Geometry::IMDDimension.
Definition at line 77 of file MDHistoDimension.h.
References m_max.
Referenced by toXMLString().
|
inlineoverridevirtual |
Return the md frame.
Implements Mantid::Geometry::IMDDimension.
Definition at line 62 of file MDHistoDimension.h.
Referenced by toXMLString().
|
inlineoverridevirtual |
Returns the unit.
Implements Mantid::Geometry::IMDDimension.
Definition at line 68 of file MDHistoDimension.h.
|
inlineoverridevirtual |
Returns the minimum extent of this dimension.
Implements Mantid::Geometry::IMDDimension.
Definition at line 80 of file MDHistoDimension.h.
References m_min.
Referenced by toXMLString().
|
inlineoverridevirtual |
Return the name of the dimension as can be displayed along the axis.
Implements Mantid::Geometry::IMDDimension.
Definition at line 59 of file MDHistoDimension.h.
Referenced by toXMLString().
|
inlineoverridevirtual |
number of bins dimension have (an integrated has one).
A axis directed along dimension would have getNBins+1 axis points.
Implements Mantid::Geometry::IMDDimension.
Definition at line 84 of file MDHistoDimension.h.
Referenced by toXMLString().
|
inlineoverridevirtual |
number of bin boundaries (axis points)
Implements Mantid::Geometry::IMDDimension.
Definition at line 87 of file MDHistoDimension.h.
|
inlineoverridevirtual |
Return the units of the dimension as a string.
Implements Mantid::Geometry::IMDDimension.
Definition at line 65 of file MDHistoDimension.h.
Referenced by toXMLString().
|
inlineoverridevirtual |
Get coordinate for index;.
Implements Mantid::Geometry::IMDDimension.
Definition at line 93 of file MDHistoDimension.h.
|
inline |
Set the MDFrame.
This method was added in order to set the correct MDFrame information on workspaces which are loaded from legacy files. This is currently being used by SetMDFrame. Except for legacy corrections you should not have to use of this method. If you think you do, it is advisible to consolut with other Mantid team members before using it.
frame,: | a reference to a new MDFrame |
Definition at line 122 of file MDHistoDimension.h.
References Mantid::Geometry::MDFrame::clone().
|
inlineoverridevirtual |
Change the extents and number of bins.
nBins | :: number of bins |
min | :: extents minimum |
max | :: extents maximum |
Implements Mantid::Geometry::IMDDimension.
Definition at line 103 of file MDHistoDimension.h.
|
overridevirtual |
Dimensions must be xml serializable.
Implements Mantid::Geometry::IMDDimension.
Definition at line 23 of file MDHistoDimension.cpp.
References getDimensionId(), Mantid::Geometry::IMDDimension::getIsIntegrated(), getMaximum(), getMDFrame(), getMinimum(), getName(), getNBins(), and getUnits().
|
private |
Calculated bin size.
Definition at line 144 of file MDHistoDimension.h.
|
private |
ID string.
Definition at line 129 of file MDHistoDimension.h.
|
private |
Multidimensional frame.
Definition at line 132 of file MDHistoDimension.h.
|
private |
Extent of dimension.
Definition at line 138 of file MDHistoDimension.h.
|
private |
Extent of dimension.
Definition at line 135 of file MDHistoDimension.h.
|
private |
Name.
Definition at line 126 of file MDHistoDimension.h.
|
private |
Number of bins.
Definition at line 141 of file MDHistoDimension.h.