Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::Geometry::MDHistoDimension Class Reference

MDHistoDimension : More...

#include <MDHistoDimension.h>

Inheritance diagram for Mantid::Geometry::MDHistoDimension:
Mantid::Geometry::IMDDimension

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 MDFramegetMDFrame () const override
 Return the md frame. More...
 
const Kernel::MDUnitgetMDUnits () 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::MDFramegetMDFrame () const =0
 
virtual const Kernel::MDUnitgetMDUnits () 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...
 

Detailed Description

MDHistoDimension :

A very simple implementation of a IMDDimension, describing the limits and number of bins in a dimension.

Author
Janik Zikovsky
Date
2011-03-24 14:16:39.231608

Definition at line 31 of file MDHistoDimension.h.

Constructor & Destructor Documentation

◆ MDHistoDimension() [1/2]

Mantid::Geometry::MDHistoDimension::MDHistoDimension ( std::string  name,
std::string  ID,
const MDFrame frame,
coord_t  min,
coord_t  max,
size_t  numBins 
)
inline

Constructor for simple MDHistoDimension.

Parameters
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.

◆ MDHistoDimension() [2/2]

Mantid::Geometry::MDHistoDimension::MDHistoDimension ( const IMDDimension other)
inline

copy constructor

Parameters
other:: other IMDDimension

Definition at line 53 of file MDHistoDimension.h.

Member Function Documentation

◆ getBinWidth()

coord_t Mantid::Geometry::MDHistoDimension::getBinWidth ( ) const
inlineoverridevirtual

Return the width of one bin.

Reimplemented from Mantid::Geometry::IMDDimension.

Definition at line 96 of file MDHistoDimension.h.

◆ getDimensionId()

const std::string & Mantid::Geometry::MDHistoDimension::getDimensionId ( ) const
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().

◆ getMaximum()

coord_t Mantid::Geometry::MDHistoDimension::getMaximum ( ) const
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().

◆ getMDFrame()

const MDFrame & Mantid::Geometry::MDHistoDimension::getMDFrame ( ) const
inlineoverridevirtual

Return the md frame.

Implements Mantid::Geometry::IMDDimension.

Definition at line 62 of file MDHistoDimension.h.

Referenced by toXMLString().

◆ getMDUnits()

const Kernel::MDUnit & Mantid::Geometry::MDHistoDimension::getMDUnits ( ) const
inlineoverridevirtual

Returns the unit.

Implements Mantid::Geometry::IMDDimension.

Definition at line 68 of file MDHistoDimension.h.

◆ getMinimum()

coord_t Mantid::Geometry::MDHistoDimension::getMinimum ( ) const
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().

◆ getName()

std::string Mantid::Geometry::MDHistoDimension::getName ( ) const
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().

◆ getNBins()

size_t Mantid::Geometry::MDHistoDimension::getNBins ( ) const
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().

◆ getNBoundaries()

size_t Mantid::Geometry::MDHistoDimension::getNBoundaries ( ) const
inlineoverridevirtual

number of bin boundaries (axis points)

Implements Mantid::Geometry::IMDDimension.

Definition at line 87 of file MDHistoDimension.h.

◆ getUnits()

const Kernel::UnitLabel Mantid::Geometry::MDHistoDimension::getUnits ( ) const
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().

◆ getX()

coord_t Mantid::Geometry::MDHistoDimension::getX ( size_t  index) const
inlineoverridevirtual

Get coordinate for index;.

Implements Mantid::Geometry::IMDDimension.

Definition at line 93 of file MDHistoDimension.h.

References index, and m_min.

◆ setMDFrame()

void Mantid::Geometry::MDHistoDimension::setMDFrame ( const MDFrame frame)
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.

Parameters
frame,:a reference to a new MDFrame

Definition at line 122 of file MDHistoDimension.h.

References Mantid::Geometry::MDFrame::clone().

◆ setRange()

void Mantid::Geometry::MDHistoDimension::setRange ( size_t  nBins,
coord_t  min,
coord_t  max 
)
inlineoverridevirtual

Change the extents and number of bins.

Parameters
nBins:: number of bins
min:: extents minimum
max:: extents maximum

Implements Mantid::Geometry::IMDDimension.

Definition at line 103 of file MDHistoDimension.h.

References m_max, and m_min.

◆ toXMLString()

std::string Mantid::Geometry::MDHistoDimension::toXMLString ( ) const
overridevirtual

Member Data Documentation

◆ m_binWidth

coord_t Mantid::Geometry::MDHistoDimension::m_binWidth
private

Calculated bin size.

Definition at line 144 of file MDHistoDimension.h.

◆ m_dimensionId

std::string Mantid::Geometry::MDHistoDimension::m_dimensionId
private

ID string.

Definition at line 129 of file MDHistoDimension.h.

◆ m_frame

Geometry::MDFrame_uptr Mantid::Geometry::MDHistoDimension::m_frame
private

Multidimensional frame.

Definition at line 132 of file MDHistoDimension.h.

◆ m_max

coord_t Mantid::Geometry::MDHistoDimension::m_max
private

Extent of dimension.

Definition at line 138 of file MDHistoDimension.h.

◆ m_min

coord_t Mantid::Geometry::MDHistoDimension::m_min
private

Extent of dimension.

Definition at line 135 of file MDHistoDimension.h.

◆ m_name

std::string Mantid::Geometry::MDHistoDimension::m_name
private

Name.

Definition at line 126 of file MDHistoDimension.h.

◆ m_numBins

size_t Mantid::Geometry::MDHistoDimension::m_numBins
private

Number of bins.

Definition at line 141 of file MDHistoDimension.h.


The documentation for this class was generated from the following files: