Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Mantid::API::IMDIterator Class Referenceabstract

This is an interface to an iterator of an IMDWorkspace. More...

#include <IMDIterator.h>

Inheritance diagram for Mantid::API::IMDIterator:
Mantid::API::MatrixWorkspaceMDIterator Mantid::DataObjects::MDBoxIterator Mantid::DataObjects::MDHistoWorkspaceIterator

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

Detailed Description

This is an interface to an iterator of an IMDWorkspace.

Author
Roman Tolchenov, Tessella Support Services plc
Date
15/03/2011

Definition at line 39 of file IMDIterator.h.

Constructor & Destructor Documentation

◆ IMDIterator()

Mantid::API::IMDIterator::IMDIterator ( )

Default constructor.

Definition at line 15 of file IMDIterator.cpp.

◆ ~IMDIterator()

virtual Mantid::API::IMDIterator::~IMDIterator ( )
virtualdefault

Member Function Documentation

◆ findNeighbourIndexes()

virtual std::vector< size_t > Mantid::API::IMDIterator::findNeighbourIndexes ( ) const
pure virtual

◆ findNeighbourIndexesFaceTouching()

virtual std::vector< size_t > Mantid::API::IMDIterator::findNeighbourIndexesFaceTouching ( ) const
pure virtual

◆ getCenter()

virtual Mantid::Kernel::VMD Mantid::API::IMDIterator::getCenter ( ) const
pure virtual

◆ getDataSize()

virtual size_t Mantid::API::IMDIterator::getDataSize ( ) const
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.

◆ getError()

virtual signal_t Mantid::API::IMDIterator::getError ( ) const
pure virtual

◆ getInnerDetectorID()

virtual int32_t Mantid::API::IMDIterator::getInnerDetectorID ( size_t  index) const
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.

◆ getInnerError()

virtual signal_t Mantid::API::IMDIterator::getInnerError ( size_t  index) const
pure virtual

◆ getInnerExpInfoIndex()

virtual uint16_t Mantid::API::IMDIterator::getInnerExpInfoIndex ( size_t  index) const
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.

◆ getInnerGoniometerIndex()

virtual uint16_t Mantid::API::IMDIterator::getInnerGoniometerIndex ( size_t  index) const
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.

◆ getInnerPosition()

virtual coord_t Mantid::API::IMDIterator::getInnerPosition ( size_t  index,
size_t  dimension 
) const
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.

◆ getInnerSignal()

virtual signal_t Mantid::API::IMDIterator::getInnerSignal ( size_t  index) const
pure virtual

◆ getIsMasked()

virtual bool Mantid::API::IMDIterator::getIsMasked ( ) const
pure virtual

◆ getLinearIndex()

virtual size_t Mantid::API::IMDIterator::getLinearIndex ( ) const
pure virtual

◆ getNormalization()

Mantid::API::MDNormalization Mantid::API::IMDIterator::getNormalization ( ) const
Returns
how the signal will be normalized when calling getNormalizedSignal()

Definition at line 25 of file IMDIterator.cpp.

References m_normalization.

◆ getNormalizedError()

virtual signal_t Mantid::API::IMDIterator::getNormalizedError ( ) const
pure virtual

◆ getNormalizedSignal()

virtual signal_t Mantid::API::IMDIterator::getNormalizedSignal ( ) const
pure virtual

◆ getNumEvents()

virtual size_t Mantid::API::IMDIterator::getNumEvents ( ) const
pure virtual

Returns the number of events/points contained in this box.

Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.

◆ getSignal()

virtual signal_t Mantid::API::IMDIterator::getSignal ( ) const
pure virtual

◆ getVertexesArray() [1/2]

virtual std::unique_ptr< coord_t[]> Mantid::API::IMDIterator::getVertexesArray ( size_t &  numVertices) const
pure virtual

Return a list of vertexes defining the volume pointed to.

Implemented in Mantid::API::MatrixWorkspaceMDIterator, Mantid::DataObjects::MDBoxIterator, and Mantid::DataObjects::MDHistoWorkspaceIterator.

◆ getVertexesArray() [2/2]

virtual std::unique_ptr< coord_t[]> Mantid::API::IMDIterator::getVertexesArray ( size_t &  numVertices,
const size_t  outDimensions,
const bool *  maskDim 
) const
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.

◆ isWithinBounds()

virtual bool Mantid::API::IMDIterator::isWithinBounds ( size_t  index) const
pure virtual

◆ jumpTo()

virtual void Mantid::API::IMDIterator::jumpTo ( size_t  index)
pure virtual

◆ next() [1/2]

virtual bool Mantid::API::IMDIterator::next ( )
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().

◆ next() [2/2]

virtual bool Mantid::API::IMDIterator::next ( size_t  skip)
pure virtual

◆ setNormalization()

void Mantid::API::IMDIterator::setNormalization ( Mantid::API::MDNormalization  normalization)

Set how the signal will be normalized when calling getNormalizedSignal()

Parameters
normalization:: method to use

Definition at line 21 of file IMDIterator.cpp.

References m_normalization.

Referenced by Mantid::Crystal::HardThresholdBackground::configureIterator().

◆ valid()

virtual bool Mantid::API::IMDIterator::valid ( ) const
pure virtual

Member Data Documentation

◆ m_normalization

Mantid::API::MDNormalization Mantid::API::IMDIterator::m_normalization
protected

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