Mantid
|
An implementation of IMDIterator that iterates through a MDHistoWorkspace. More...
#include <MDHistoWorkspaceIterator.h>
Public Member Functions | |
std::vector< size_t > | findNeighbourIndexes () const override |
Gets indexes of bins/pixels/boxes neighbouring the present iterator location. More... | |
std::vector< size_t > | findNeighbourIndexesByWidth (const int &width) const |
Find vertex-touching neighbours. More... | |
std::vector< size_t > | findNeighbourIndexesByWidth (const std::vector< int > &widths) const |
Find vertex-touching neighbours. More... | |
std::pair< std::vector< size_t >, std::vector< bool > > | findNeighbourIndexesByWidth1D (const int &width, const int &width_dimension) const |
Find vertex-touching neighbours. More... | |
std::vector< size_t > | findNeighbourIndexesFaceTouching () const override |
Find neighbor indexes, but only return those that are face-touching. More... | |
VecMDExtents | getBoxExtents () const |
Get the extents in n-dimensions corresponding to the position of the box of the current iterator. More... | |
Mantid::Kernel::VMD | getCenter () const override |
Returns the position of the center of the box pointed to. More... | |
size_t | getDataSize () const override |
signal_t | getError () const override |
Returns the error for this box, same as innerError. More... | |
int32_t | getInnerDetectorID (size_t index) const override |
For a given event/point in this box, return the detector ID. More... | |
signal_t | getInnerError (size_t index) const override |
Returns the error of a given event. More... | |
uint16_t | getInnerExpInfoIndex (size_t index) const override |
For a given event/point in this box, return the associated experiment-info index. More... | |
uint16_t | getInnerGoniometerIndex (size_t index) const override |
For a given event/point in this box, return the goniometer index. More... | |
coord_t | getInnerPosition (size_t index, size_t dimension) const override |
Returns the position of a given event for a given dimension. More... | |
signal_t | getInnerSignal (size_t index) const override |
Returns the signal of a given event. More... | |
bool | getIsMasked () const override |
Returns true if masking is used. More... | |
size_t | getLinearIndex () const override |
Getter for the linear index. More... | |
signal_t | getNormalizedError () const override |
Returns the normalized error for this box. More... | |
signal_t | getNormalizedSignal () const override |
Returns the normalized signal for this box. More... | |
size_t | getNumEvents () const override |
Returns the number of events/points contained in this box. More... | |
virtual signal_t | getNumEventsFraction () const |
Returns the number of events/points contained in this box. More... | |
signal_t | getSignal () const override |
Returns the signal for this box, same as innerSignal. More... | |
std::unique_ptr< coord_t[]> | getVertexesArray (size_t &numVertices) const override |
Return a list of vertexes defining the volume pointed to. More... | |
std::unique_ptr< coord_t[]> | getVertexesArray (size_t &numVertices, const size_t outDimensions, const bool *maskDim) const override |
Return a list of vertexes defining the volume pointed to, enable masking of dimensions. More... | |
void | init (const MDHistoWorkspace *workspace, Mantid::Geometry::MDImplicitFunction *function, size_t beginPos=0, size_t endPos=size_t(-1)) |
Constructor helper. More... | |
bool | isWithinBounds (size_t index) const override |
void | jumpTo (size_t index) override |
Jump to the index^th cell. More... | |
virtual coord_t | jumpToNearest (const Mantid::Kernel::VMD &fromLocation) |
Jump the iterator to the nearest valid position correspoinding to the centre current position of the desired iterator position. More... | |
MDHistoWorkspaceIterator (const MDHistoWorkspace *workspace, Mantid::Geometry::MDImplicitFunction *function=nullptr, size_t beginPos=0, size_t endPos=size_t(-1)) | |
Constructor. More... | |
MDHistoWorkspaceIterator (const MDHistoWorkspace *workspace, SkippingPolicy *skippingPolicy, Mantid::Geometry::MDImplicitFunction *function=nullptr, size_t beginPos=0, size_t endPos=size_t(-1)) | |
Constructor. More... | |
MDHistoWorkspaceIterator (const MDHistoWorkspace_const_sptr &workspace, Mantid::Geometry::MDImplicitFunction *function=nullptr, size_t beginPos=0, size_t endPos=size_t(-1)) | |
Constructor. More... | |
MDHistoWorkspaceIterator (const MDHistoWorkspace_const_sptr &workspace, SkippingPolicy *skippingPolicy, Mantid::Geometry::MDImplicitFunction *function=nullptr, size_t beginPos=0, size_t endPos=size_t(-1)) | |
Constructor. More... | |
bool | next () override |
Advance to the next cell. More... | |
bool | next (size_t skip) override |
Advance, skipping a certain number of cells. More... | |
size_t | permutationCacheSize () const |
bool | valid () const override |
~MDHistoWorkspaceIterator () override | |
Destructor. More... | |
Public Member Functions inherited from Mantid::API::IMDIterator | |
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 Member Functions | |
std::vector< int64_t > | createPermutations (const std::vector< int > &widths) const |
Create or fetch permutations relating to a given neighbour width. More... | |
Protected Attributes | |
uint64_t | m_begin |
The beginning linear index in the workspace. More... | |
coord_t * | m_binWidth |
Width of each bin in each dimension. More... | |
coord_t * | m_center |
Center of the current box. Not set until getCenter() is called. More... | |
std::unique_ptr< Mantid::Geometry::MDImplicitFunction > | m_function |
Implicit function to limit volume searched. More... | |
size_t * | m_index |
Index into each dimension. More... | |
size_t * | m_indexMaker |
Array to find indices from linear indices. More... | |
size_t * | m_indexMax |
Index into each dimension. More... | |
uint64_t | m_max |
The maximum linear index in the workspace. More... | |
size_t | m_nd |
Number of dimensions. More... | |
coord_t * | m_origin |
Origin (index 0,0,0) in the space = the minimum of each dimension. More... | |
std::vector< int64_t > | m_permutationsFaceTouching |
Neigbour finding permutations for face touching neighbours (3 by 3 width). More... | |
PermutationsMap | m_permutationsVertexTouchingMap |
Neighbour finding permutations map for vertex touching. More... | |
uint64_t | m_pos |
The linear position/index into the MDHistoWorkspace. More... | |
SkippingPolicy_scptr | m_skippingPolicy |
Skipping policy. More... | |
const MDHistoWorkspace * | m_ws |
The MDHistoWorkspace being iterated. More... | |
Protected Attributes inherited from Mantid::API::IMDIterator | |
Mantid::API::MDNormalization | m_normalization |
Normalization method for getNormalizedSignal() More... | |
An implementation of IMDIterator that iterates through a MDHistoWorkspace.
It treats the bin in the workspace as a box containing a single "event", at the center of each bin and with the proper signal/error.
Definition at line 36 of file MDHistoWorkspaceIterator.h.
Mantid::DataObjects::MDHistoWorkspaceIterator::MDHistoWorkspaceIterator | ( | const MDHistoWorkspace_const_sptr & | workspace, |
SkippingPolicy * | skippingPolicy, | ||
Mantid::Geometry::MDImplicitFunction * | function = nullptr , |
||
size_t | beginPos = 0 , |
||
size_t | endPos = size_t(-1) |
||
) |
Constructor.
workspace | :: MDHistoWorkspace_sptr being iterated |
skippingPolicy | :: The skipping policy to use. |
function | :: The implicit function to use. Becomes owned by this object. |
beginPos | :: Start position |
endPos | :: End position |
Definition at line 121 of file MDHistoWorkspaceIterator.cpp.
Mantid::DataObjects::MDHistoWorkspaceIterator::MDHistoWorkspaceIterator | ( | const MDHistoWorkspace * | workspace, |
SkippingPolicy * | skippingPolicy, | ||
Mantid::Geometry::MDImplicitFunction * | function = nullptr , |
||
size_t | beginPos = 0 , |
||
size_t | endPos = size_t(-1) |
||
) |
Constructor.
workspace | :: MDHistoWorkspace_sptr being iterated |
function | :: The implicit function to use. Becomes owned by this object. |
skippingPolicy | :: The skipping policy to use |
beginPos | :: Start position |
endPos | :: End position |
Definition at line 140 of file MDHistoWorkspaceIterator.cpp.
Mantid::DataObjects::MDHistoWorkspaceIterator::MDHistoWorkspaceIterator | ( | const MDHistoWorkspace_const_sptr & | workspace, |
Mantid::Geometry::MDImplicitFunction * | function = nullptr , |
||
size_t | beginPos = 0 , |
||
size_t | endPos = size_t(-1) |
||
) |
Constructor.
workspace | :: MDHistoWorkspace_sptr being iterated |
function | :: The implicit function to use. Becomes owned by this object. |
workspace | :: MDHistoWorkspace_sptr being iterated |
function | :: The implicit function to use. Becomes owned by this object. |
beginPos | :: start position |
endPos | :: end position |
Definition at line 90 of file MDHistoWorkspaceIterator.cpp.
Mantid::DataObjects::MDHistoWorkspaceIterator::MDHistoWorkspaceIterator | ( | const MDHistoWorkspace * | workspace, |
Mantid::Geometry::MDImplicitFunction * | function = nullptr , |
||
size_t | beginPos = 0 , |
||
size_t | endPos = size_t(-1) |
||
) |
Constructor.
workspace | :: MDHistoWorkspace_sptr being iterated |
function | :: The implicit function to use. Becomes owned by this object. |
beginPos | |
endPos |
Definition at line 105 of file MDHistoWorkspaceIterator.cpp.
|
override |
Destructor.
Definition at line 234 of file MDHistoWorkspaceIterator.cpp.
References m_binWidth, m_center, m_index, m_indexMaker, m_indexMax, and m_origin.
|
protected |
Create or fetch permutations relating to a given neighbour width.
This is to create the permutations needed to operate find neighbours in the vertex-touching schenarios Rather than having to fabricate what the possible permutations are each time the iterator is moved and the method is called, we can cache the results, and re-use them as the only factors are the and the dimensionality, the width (n-neighbours).
widths | : vector of integer widths. |
Definition at line 529 of file MDHistoWorkspaceIterator.cpp.
References Mantid::API::MDGeometry::getDimension(), Mantid::Geometry::m, m_nd, m_permutationsVertexTouchingMap, and m_ws.
Referenced by findNeighbourIndexesByWidth(), and findNeighbourIndexesByWidth1D().
|
overridevirtual |
Gets indexes of bins/pixels/boxes neighbouring the present iterator location.
Return all vertex touching neighbours. The number of neighbour indexes returned will depend upon the dimensionality of the workspace as well as the presence of boundaries and edges.
FindNeighbours will return the indexes of neighbours even if they are unreachable from the current iterator. To verify that the indexes are reachable from the current iterator, run isWithinBounds. Note that this is only a concern where the workspace iteration is portioned up amongst >1 iterators.
Implements Mantid::API::IMDIterator.
Definition at line 478 of file MDHistoWorkspaceIterator.cpp.
References findNeighbourIndexesByWidth().
std::vector< size_t > Mantid::DataObjects::MDHistoWorkspaceIterator::findNeighbourIndexesByWidth | ( | const int & | width | ) | const |
Find vertex-touching neighbours.
Expands out the width to make a n-dimensional vector filled with the requested width.
width | : Odd number of pixels for all dimensions. |
Definition at line 592 of file MDHistoWorkspaceIterator.cpp.
References findNeighbourIndexesByWidth(), and m_nd.
Referenced by findNeighbourIndexes(), and findNeighbourIndexesByWidth().
std::vector< size_t > Mantid::DataObjects::MDHistoWorkspaceIterator::findNeighbourIndexesByWidth | ( | const std::vector< int > & | widths | ) | const |
Find vertex-touching neighbours.
widths | : Vector containing odd number of pixels per dimension. Entries match dimensions of iterator. |
Definition at line 603 of file MDHistoWorkspaceIterator.cpp.
References createPermutations(), Mantid::Kernel::Utils::NestedForLoop::GetIndicesFromLinearIndex(), Mantid::Kernel::Utils::isNeighbourOfSubject(), m_index, m_indexMaker, m_indexMax, m_nd, and m_pos.
std::pair< std::vector< size_t >, std::vector< bool > > Mantid::DataObjects::MDHistoWorkspaceIterator::findNeighbourIndexesByWidth1D | ( | const int & | width, |
const int & | width_dimension | ||
) | const |
Find vertex-touching neighbours.
This function always returns a vector of indexes which has a size equal to the product of the widths. This is because it also returns a vector of bools (of the same size) which records the validity of each index, rather than removing invalid indexes from the list. This function only allows a width vector to have one non-singleton dimension. NB, the index of the central pixel is included in the output array.
width | : Width in the non-singleton dimension |
width_dimension | : The non-singleton dimension of the widths vector |
Definition at line 646 of file MDHistoWorkspaceIterator.cpp.
References createPermutations(), Mantid::Kernel::Utils::NestedForLoop::GetIndicesFromLinearIndex(), Mantid::Kernel::Utils::isNeighbourOfSubject(), m_index, m_indexMaker, m_indexMax, m_nd, and m_pos.
|
overridevirtual |
Find neighbor indexes, but only return those that are face-touching.
Will return the indexes of neighbours even if they are unreachable from the current iterator. To verify that the indexes are reachable from the current iterator, run isWithinBounds. Note that this is only a concern where the workspace iteration is portioned up amongst >1 iterators.
Implements Mantid::API::IMDIterator.
Definition at line 493 of file MDHistoWorkspaceIterator.cpp.
References Mantid::Kernel::Utils::NestedForLoop::GetIndicesFromLinearIndex(), Mantid::Kernel::Utils::isNeighbourOfSubject(), m_index, m_indexMaker, m_indexMax, m_nd, m_permutationsFaceTouching, and m_pos.
VecMDExtents Mantid::DataObjects::MDHistoWorkspaceIterator::getBoxExtents | ( | ) | const |
Get the extents in n-dimensions corresponding to the position of the box of the current iterator.
Definition at line 397 of file MDHistoWorkspaceIterator.cpp.
References Mantid::Geometry::d, Mantid::Kernel::Utils::NestedForLoop::GetIndicesFromLinearIndex(), m_binWidth, m_index, m_indexMaker, m_indexMax, m_nd, m_origin, and m_pos.
Referenced by performWeightedSum().
|
overridevirtual |
Returns the position of the center of the box pointed to.
Implements Mantid::API::IMDIterator.
Definition at line 382 of file MDHistoWorkspaceIterator.cpp.
References Mantid::Geometry::d, Mantid::Kernel::Utils::NestedForLoop::GetIndicesFromLinearIndex(), m_binWidth, m_center, m_index, m_indexMaker, m_indexMax, m_nd, m_origin, and m_pos.
|
overridevirtual |
Implements Mantid::API::IMDIterator.
Definition at line 244 of file MDHistoWorkspaceIterator.cpp.
|
overridevirtual |
Returns the error for this box, same as innerError.
Implements Mantid::API::IMDIterator.
Definition at line 363 of file MDHistoWorkspaceIterator.cpp.
References Mantid::DataObjects::MDHistoWorkspace::getErrorAt(), m_pos, and m_ws.
Referenced by performWeightedSum().
|
overridevirtual |
For a given event/point in this box, return the detector ID.
Implements Mantid::API::IMDIterator.
Definition at line 438 of file MDHistoWorkspaceIterator.cpp.
|
overridevirtual |
Returns the error of a given event.
Implements Mantid::API::IMDIterator.
Definition at line 453 of file MDHistoWorkspaceIterator.cpp.
References Mantid::DataObjects::MDHistoWorkspace::getErrorAt(), m_pos, and m_ws.
|
overridevirtual |
For a given event/point in this box, return the associated experiment-info index.
Implements Mantid::API::IMDIterator.
Definition at line 424 of file MDHistoWorkspaceIterator.cpp.
|
overridevirtual |
For a given event/point in this box, return the goniometer index.
Implements Mantid::API::IMDIterator.
Definition at line 431 of file MDHistoWorkspaceIterator.cpp.
|
overridevirtual |
Returns the position of a given event for a given dimension.
Implements Mantid::API::IMDIterator.
Definition at line 445 of file MDHistoWorkspaceIterator.cpp.
References Mantid::DataObjects::MDHistoWorkspace::getCenter(), m_pos, and m_ws.
|
overridevirtual |
Returns the signal of a given event.
Implements Mantid::API::IMDIterator.
Definition at line 450 of file MDHistoWorkspaceIterator.cpp.
References Mantid::DataObjects::MDHistoWorkspace::getSignalAt(), m_pos, and m_ws.
|
overridevirtual |
Returns true if masking is used.
Implements Mantid::API::IMDIterator.
Definition at line 455 of file MDHistoWorkspaceIterator.cpp.
References Mantid::DataObjects::MDHistoWorkspace::getIsMaskedAt(), m_pos, and m_ws.
Referenced by performWeightedSum().
|
overridevirtual |
Getter for the linear index.
Implements Mantid::API::IMDIterator.
Definition at line 461 of file MDHistoWorkspaceIterator.cpp.
References m_pos.
Referenced by Mantid::MDAlgorithms::ReplicateMD::exec().
|
overridevirtual |
Returns the normalized error for this box.
Implements Mantid::API::IMDIterator.
Definition at line 344 of file MDHistoWorkspaceIterator.cpp.
References Mantid::DataObjects::MDHistoWorkspace::getErrorAt(), Mantid::DataObjects::MDHistoWorkspace::getInverseVolume(), Mantid::DataObjects::MDHistoWorkspace::getNumEventsAt(), Mantid::API::IMDIterator::m_normalization, m_pos, m_ws, Mantid::API::NoNormalization, Mantid::API::NumEventsNormalization, and Mantid::API::VolumeNormalization.
|
overridevirtual |
Returns the normalized signal for this box.
Implements Mantid::API::IMDIterator.
Definition at line 328 of file MDHistoWorkspaceIterator.cpp.
References Mantid::DataObjects::MDHistoWorkspace::getInverseVolume(), Mantid::DataObjects::MDHistoWorkspace::getNumEventsAt(), Mantid::DataObjects::MDHistoWorkspace::getSignalAt(), Mantid::API::IMDIterator::m_normalization, m_pos, m_ws, Mantid::API::NoNormalization, Mantid::API::NumEventsNormalization, and Mantid::API::VolumeNormalization.
|
overridevirtual |
Returns the number of events/points contained in this box.
Implements Mantid::API::IMDIterator.
Definition at line 415 of file MDHistoWorkspaceIterator.cpp.
References getNumEventsFraction().
|
virtual |
Returns the number of events/points contained in this box.
Definition at line 420 of file MDHistoWorkspaceIterator.cpp.
References Mantid::DataObjects::MDHistoWorkspace::getNumEventsAt(), m_pos, and m_ws.
Referenced by getNumEvents(), and performWeightedSum().
|
overridevirtual |
Returns the signal for this box, same as innerSignal.
Implements Mantid::API::IMDIterator.
Definition at line 360 of file MDHistoWorkspaceIterator.cpp.
References Mantid::DataObjects::MDHistoWorkspace::getSignalAt(), m_pos, and m_ws.
Referenced by performWeightedSum().
|
overridevirtual |
Return a list of vertexes defining the volume pointed to.
Implements Mantid::API::IMDIterator.
Definition at line 366 of file MDHistoWorkspaceIterator.cpp.
References Mantid::DataObjects::MDHistoWorkspace::getVertexesArray(), m_pos, and m_ws.
|
overridevirtual |
Return a list of vertexes defining the volume pointed to, enable masking of dimensions.
Implements Mantid::API::IMDIterator.
Definition at line 371 of file MDHistoWorkspaceIterator.cpp.
References UNUSED_ARG.
void Mantid::DataObjects::MDHistoWorkspaceIterator::init | ( | const MDHistoWorkspace * | workspace, |
Mantid::Geometry::MDImplicitFunction * | function, | ||
size_t | beginPos = 0 , |
||
size_t | endPos = size_t(-1) |
||
) |
Constructor helper.
workspace | :: MDWorkspace |
function | :: implicit function or NULL for none. Gains ownership of the pointer. |
beginPos | :: Start position |
endPos | :: End position |
Definition at line 155 of file MDHistoWorkspaceIterator.cpp.
References Mantid::Geometry::d, Mantid::API::MDGeometry::getDimension(), Mantid::Kernel::Utils::NestedForLoop::GetIndicesFromLinearIndex(), Mantid::DataObjects::MDHistoWorkspace::getNPoints(), Mantid::API::MDGeometry::getNumDims(), m_begin, m_binWidth, m_center, m_function, m_index, m_indexMaker, m_indexMax, m_max, m_nd, m_origin, m_permutationsFaceTouching, m_pos, m_ws, next(), Mantid::Kernel::Utils::NestedForLoop::SetUp(), Mantid::Kernel::Utils::NestedForLoop::SetUpIndexMaker(), valid(), and workspace.
Referenced by MDHistoWorkspaceIterator().
|
overridevirtual |
index | : linear index to inspect against iterator |
Implements Mantid::API::IMDIterator.
Definition at line 517 of file MDHistoWorkspaceIterator.cpp.
|
overridevirtual |
Jump to the index^th cell.
No range checking is performed, for performance reasons!
index | :: point to jump to. Must be 0 <= index < getDataSize(). |
Implements Mantid::API::IMDIterator.
Definition at line 252 of file MDHistoWorkspaceIterator.cpp.
References index, m_begin, and m_pos.
Referenced by jumpToNearest().
|
virtual |
Jump the iterator to the nearest valid position correspoinding to the centre current position of the desired iterator position.
fromLocation | : destination or nearest to. |
Definition at line 260 of file MDHistoWorkspaceIterator.cpp.
References Mantid::Geometry::d, Mantid::Kernel::Utils::NestedForLoop::GetLinearIndex(), jumpTo(), m_binWidth, m_indexMaker, m_indexMax, m_nd, and m_origin.
|
overridevirtual |
Advance to the next cell.
If the current cell is the last one in the workspace do nothing and return false.
Implements Mantid::API::IMDIterator.
Definition at line 290 of file MDHistoWorkspaceIterator.cpp.
References Mantid::Geometry::d, Mantid::Kernel::Utils::NestedForLoop::Increment(), m_binWidth, m_center, m_function, m_index, m_indexMax, m_max, m_nd, m_origin, m_pos, and m_skippingPolicy.
Referenced by init().
|
overridevirtual |
Advance, skipping a certain number of cells.
skip | :: how many to increase. If 1, then every point will be sampled. |
Implements Mantid::API::IMDIterator.
Definition at line 320 of file MDHistoWorkspaceIterator.cpp.
size_t Mantid::DataObjects::MDHistoWorkspaceIterator::permutationCacheSize | ( | ) | const |
Definition at line 686 of file MDHistoWorkspaceIterator.cpp.
References m_permutationsVertexTouchingMap.
|
overridevirtual |
Implements Mantid::API::IMDIterator.
Definition at line 283 of file MDHistoWorkspaceIterator.cpp.
Referenced by init().
|
protected |
The beginning linear index in the workspace.
Definition at line 126 of file MDHistoWorkspaceIterator.h.
Referenced by getDataSize(), init(), isWithinBounds(), and jumpTo().
|
protected |
Width of each bin in each dimension.
Definition at line 144 of file MDHistoWorkspaceIterator.h.
Referenced by getBoxExtents(), getCenter(), init(), jumpToNearest(), next(), and ~MDHistoWorkspaceIterator().
|
protected |
Center of the current box. Not set until getCenter() is called.
Definition at line 138 of file MDHistoWorkspaceIterator.h.
Referenced by getCenter(), init(), next(), and ~MDHistoWorkspaceIterator().
|
protected |
Implicit function to limit volume searched.
Definition at line 132 of file MDHistoWorkspaceIterator.h.
|
protected |
Index into each dimension.
Definition at line 147 of file MDHistoWorkspaceIterator.h.
Referenced by findNeighbourIndexesByWidth(), findNeighbourIndexesByWidth1D(), findNeighbourIndexesFaceTouching(), getBoxExtents(), getCenter(), init(), next(), and ~MDHistoWorkspaceIterator().
|
protected |
Array to find indices from linear indices.
Definition at line 153 of file MDHistoWorkspaceIterator.h.
Referenced by findNeighbourIndexesByWidth(), findNeighbourIndexesByWidth1D(), findNeighbourIndexesFaceTouching(), getBoxExtents(), getCenter(), init(), jumpToNearest(), and ~MDHistoWorkspaceIterator().
|
protected |
Index into each dimension.
Definition at line 150 of file MDHistoWorkspaceIterator.h.
Referenced by findNeighbourIndexesByWidth(), findNeighbourIndexesByWidth1D(), findNeighbourIndexesFaceTouching(), getBoxExtents(), getCenter(), init(), jumpToNearest(), next(), and ~MDHistoWorkspaceIterator().
|
protected |
The maximum linear index in the workspace.
Definition at line 129 of file MDHistoWorkspaceIterator.h.
Referenced by getDataSize(), init(), isWithinBounds(), next(), and valid().
|
protected |
Number of dimensions.
Definition at line 135 of file MDHistoWorkspaceIterator.h.
Referenced by createPermutations(), findNeighbourIndexesByWidth(), findNeighbourIndexesByWidth1D(), findNeighbourIndexesFaceTouching(), getBoxExtents(), getCenter(), init(), jumpToNearest(), and next().
|
protected |
Origin (index 0,0,0) in the space = the minimum of each dimension.
Definition at line 141 of file MDHistoWorkspaceIterator.h.
Referenced by getBoxExtents(), getCenter(), init(), jumpToNearest(), next(), and ~MDHistoWorkspaceIterator().
|
mutableprotected |
Neigbour finding permutations for face touching neighbours (3 by 3 width).
Definition at line 156 of file MDHistoWorkspaceIterator.h.
Referenced by findNeighbourIndexesFaceTouching(), and init().
|
mutableprotected |
Neighbour finding permutations map for vertex touching.
Keyed via the width (n-pixels) of neighbours required.
Definition at line 160 of file MDHistoWorkspaceIterator.h.
Referenced by createPermutations(), and permutationCacheSize().
|
protected |
The linear position/index into the MDHistoWorkspace.
Definition at line 123 of file MDHistoWorkspaceIterator.h.
Referenced by findNeighbourIndexesByWidth(), findNeighbourIndexesByWidth1D(), findNeighbourIndexesFaceTouching(), getBoxExtents(), getCenter(), getError(), getInnerError(), getInnerPosition(), getInnerSignal(), getIsMasked(), getLinearIndex(), getNormalizedError(), getNormalizedSignal(), getNumEventsFraction(), getSignal(), getVertexesArray(), init(), jumpTo(), next(), and valid().
|
protected |
|
protected |
The MDHistoWorkspace being iterated.
Definition at line 120 of file MDHistoWorkspaceIterator.h.
Referenced by createPermutations(), getError(), getInnerError(), getInnerPosition(), getInnerSignal(), getIsMasked(), getNormalizedError(), getNormalizedSignal(), getNumEventsFraction(), getSignal(), getVertexesArray(), and init().