Mantid
|
This is an interface to an iterator of an IMDWorkspace. More...
#include <IMDIterator.h>
Public Member Functions | |
virtual std::vector< size_t > | findNeighbourIndexes () const =0 |
Find neighbouring indexes vertex touching. More... | |
virtual std::vector< size_t > | findNeighbourIndexesFaceTouching () const =0 |
Find neighbouring indexes face touching. More... | |
virtual Mantid::Kernel::VMD | getCenter () const =0 |
Returns the position of the center of the box pointed to. More... | |
virtual size_t | getDataSize () const =0 |
Get the size of the data (number of entries that will be iterated through) More... | |
virtual signal_t | getError () const =0 |
Returns the total error for this box. More... | |
virtual int32_t | getInnerDetectorID (size_t index) const =0 |
For a given event/point in this box, return the detector ID. More... | |
virtual signal_t | getInnerError (size_t index) const =0 |
Returns the error of a given event. More... | |
virtual uint16_t | getInnerExpInfoIndex (size_t index) const =0 |
For a given event/point in this box, return the associated experiment-info index. More... | |
virtual uint16_t | getInnerGoniometerIndex (size_t index) const =0 |
For a given event/point in this box, return the goniometer index. More... | |
virtual coord_t | getInnerPosition (size_t index, size_t dimension) const =0 |
Returns the position of a given event for a given dimension. More... | |
virtual signal_t | getInnerSignal (size_t index) const =0 |
Returns the signal of a given event. More... | |
virtual bool | getIsMasked () const =0 |
Returns true if masking is used. More... | |
virtual size_t | getLinearIndex () const =0 |
Get the linear index. More... | |
Mantid::API::MDNormalization | getNormalization () const |
virtual signal_t | getNormalizedError () const =0 |
Returns the normalized error for this box. More... | |
virtual signal_t | getNormalizedSignal () const =0 |
Returns the normalized signal for this box. More... | |
virtual size_t | getNumEvents () const =0 |
Returns the number of events/points contained in this box. More... | |
virtual signal_t | getSignal () const =0 |
Returns the total signal for this box. More... | |
virtual std::unique_ptr< coord_t[]> | getVertexesArray (size_t &numVertices) const =0 |
Return a list of vertexes defining the volume pointed to. More... | |
virtual std::unique_ptr< coord_t[]> | getVertexesArray (size_t &numVertices, const size_t outDimensions, const bool *maskDim) const =0 |
Return a list of vertexes defining the volume pointed to, enable masking of dimensions. More... | |
IMDIterator () | |
Default constructor. More... | |
virtual bool | isWithinBounds (size_t index) const =0 |
Is index reachable by the iterator. More... | |
virtual void | jumpTo (size_t index)=0 |
Jump to the index^th cell. More... | |
virtual bool | next ()=0 |
Advance to the next cell. More... | |
virtual bool | next (size_t skip)=0 |
Advance, skipping a certain number of cells. More... | |
void | setNormalization (Mantid::API::MDNormalization normalization) |
Set how the signal will be normalized when calling getNormalizedSignal() More... | |
virtual bool | valid () const =0 |
Is the current position of the iterator valid? More... | |
virtual | ~IMDIterator ()=default |
Protected Attributes | |
Mantid::API::MDNormalization | m_normalization |
Normalization method for getNormalizedSignal() More... | |
This is an interface to an iterator of an IMDWorkspace.
Definition at line 39 of file IMDIterator.h.
Mantid::API::IMDIterator::IMDIterator | ( | ) |
Default constructor.
Definition at line 15 of file IMDIterator.cpp.
|
virtualdefault |
|
pure virtual |
Find neighbouring indexes vertex touching.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
Find neighbouring indexes face touching.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
Returns the position of the center of the box pointed to.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
Referenced by Mantid::MDAlgorithms::UserFunctionMD::functionMD(), and Mantid::Crystal::PeakBackground::isBackground().
|
pure virtual |
Get the size of the data (number of entries that will be iterated through)
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
Returns the total error for this box.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
For a given event/point in this box, return the detector ID.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
Returns the error of a given event.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
For a given event/point in this box, return the associated experiment-info index.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
For a given event/point in this box, return the goniometer index.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
Returns the position of a given event for a given dimension.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
Returns the signal of a given event.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
Returns true if masking is used.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
Referenced by Mantid::DataObjects::SkipMaskedBins::keepGoing().
|
pure virtual |
Get the linear index.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
Referenced by Mantid::Crystal::ConnectedComponentLabeling::calculateDisjointTree().
Mantid::API::MDNormalization Mantid::API::IMDIterator::getNormalization | ( | ) | const |
Definition at line 25 of file IMDIterator.cpp.
References m_normalization.
|
pure virtual |
Returns the normalized error for this box.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
Returns the normalized signal for this box.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
Referenced by Mantid::Crystal::HardThresholdBackground::isBackground().
|
pure virtual |
Returns the number of events/points contained in this box.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
Returns the total signal for this box.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
Return a list of vertexes defining the volume pointed to.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
Return a list of vertexes defining the volume pointed to, enable masking of dimensions.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
Is index reachable by the iterator.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
pure virtual |
Jump to the index^th cell.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
Referenced by Mantid::Crystal::ConnectedComponentLabeling::calculateDisjointTree().
|
pure virtual |
Advance to the next cell.
If the current cell is the last one in the workspace do nothing and return false.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
Referenced by Mantid::Crystal::ConnectedComponentLabeling::calculateDisjointTree().
|
pure virtual |
Advance, skipping a certain number of cells.
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
void Mantid::API::IMDIterator::setNormalization | ( | Mantid::API::MDNormalization | normalization | ) |
Set how the signal will be normalized when calling getNormalizedSignal()
normalization | :: method to use |
Definition at line 21 of file IMDIterator.cpp.
References m_normalization.
Referenced by Mantid::Crystal::HardThresholdBackground::configureIterator().
|
pure virtual |
Is the current position of the iterator valid?
Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.
|
protected |
Normalization method for getNormalizedSignal()
Definition at line 125 of file IMDIterator.h.
Referenced by getNormalization(), Mantid::API::MatrixWorkspaceMDIterator::getNormalizedError(), Mantid::DataObjects::MDHistoWorkspaceIterator::getNormalizedError(), Mantid::API::MatrixWorkspaceMDIterator::getNormalizedSignal(), Mantid::DataObjects::MDHistoWorkspaceIterator::getNormalizedSignal(), and setNormalization().