|
Mantid
|
#include <WorkspaceBoundingBox.h>
Public Member Functions | |
| double | calculateDistance () const |
| double | calculateRadiusX () const |
| double | calculateRadiusY () const |
| bool | containsPoint (double x, double y) |
| Checks if a given x/y coord is within the bounding box. More... | |
| int | findFirstValidWs (const int numSpec) const |
Searches for the first valid spectrum info in member variable workspace More... | |
| double | getCenterX () const |
| double | getCenterY () const |
| API::MatrixWorkspace_const_sptr | getWorkspace () |
| double | getX () const |
| double | getXMax () const |
| double | getXMin () const |
| double | getY () const |
| double | getYMax () const |
| double | getYMin () const |
| bool | isOutOfBoundsOfNonDirectBeam (const double beamRadius, int index, const bool directBeam) |
| Checks to see if spectrum at index is within the diameter of the given beamRadius. More... | |
| bool | isValidWs (int index) const |
| Performs checks on the spectrum located at index to determine if it is acceptable to be operated on. More... | |
| void | normalizePosition (double x, double y) |
| Perform normalization on x/y coords over given values. More... | |
| void | setBounds (double xMin, double xMax, double yMin, double yMax) |
| void | setCenter (double x, double y) |
| void | setPosition (double x, double y) |
| void | updateMinMax (int index) |
| Compare current mins and maxs to the coordinates of the spectrum at index expnd mins and maxs to include this spectrum. More... | |
| double | updatePositionAndReturnCount (int index) |
| Sets member variables x/y to new x/y based on spectrum info and historgram data at the given index. More... | |
| WorkspaceBoundingBox () | |
| WorkspaceBoundingBox (const API::MatrixWorkspace_const_sptr &workspace) | |
| ~WorkspaceBoundingBox () | |
Private Member Functions | |
| Kernel::V3D & | position (int index) const |
| double | yValue (const int index) const |
Private Attributes | |
| double | centerX {0} |
| double | centerY {0} |
| int | m_cachedHistogramYIndex {-1} |
| Kernel::V3D | m_cachedPosition |
| int | m_cachedPositionIndex {-1} |
| double | m_cachedYValue |
| const API::SpectrumInfo * | m_spectrumInfo |
| API::MatrixWorkspace_const_sptr | m_workspace |
| double | x {0} |
| double | xMax {0} |
| double | xMin {0} |
| double | y {0} |
| double | yMax {0} |
| double | yMin {0} |
Definition at line 25 of file WorkspaceBoundingBox.h.
| Mantid::Algorithms::WorkspaceBoundingBox::WorkspaceBoundingBox | ( | const API::MatrixWorkspace_const_sptr & | workspace | ) |
Definition at line 10 of file WorkspaceBoundingBox.cpp.
References m_spectrumInfo, m_workspace, and workspace.
| Mantid::Algorithms::WorkspaceBoundingBox::WorkspaceBoundingBox | ( | ) |
Definition at line 17 of file WorkspaceBoundingBox.cpp.
References m_spectrumInfo.
|
default |
| double Mantid::Algorithms::WorkspaceBoundingBox::calculateDistance | ( | ) | const |
Definition at line 148 of file WorkspaceBoundingBox.cpp.
References centerX, centerY, x, and y.
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
| double Mantid::Algorithms::WorkspaceBoundingBox::calculateRadiusX | ( | ) | const |
Definition at line 154 of file WorkspaceBoundingBox.cpp.
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
| double Mantid::Algorithms::WorkspaceBoundingBox::calculateRadiusY | ( | ) | const |
Definition at line 156 of file WorkspaceBoundingBox.cpp.
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
| bool Mantid::Algorithms::WorkspaceBoundingBox::containsPoint | ( | double | x, |
| double | y | ||
| ) |
Checks if a given x/y coord is within the bounding box.
| x | :: x coordinate |
| y | :: y coordinate |
Definition at line 174 of file WorkspaceBoundingBox.cpp.
References x, xMax, xMin, and yMin.
Referenced by Mantid::Algorithms::updateBoundingBox().
| int Mantid::Algorithms::WorkspaceBoundingBox::findFirstValidWs | ( | const int | numSpec | ) | const |
Searches for the first valid spectrum info in member variable workspace
| numSpec | :: the number of spectrum in the workspace to search through |
Definition at line 89 of file WorkspaceBoundingBox.cpp.
References isValidWs().
|
inline |
Definition at line 34 of file WorkspaceBoundingBox.h.
References centerX.
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
|
inline |
Definition at line 35 of file WorkspaceBoundingBox.h.
References centerY.
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
|
inline |
Definition at line 31 of file WorkspaceBoundingBox.h.
References m_workspace.
Referenced by Mantid::Algorithms::updateBoundingBox().
|
inline |
Definition at line 32 of file WorkspaceBoundingBox.h.
References x.
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
|
inline |
Definition at line 37 of file WorkspaceBoundingBox.h.
References xMax.
|
inline |
Definition at line 36 of file WorkspaceBoundingBox.h.
References xMin.
|
inline |
Definition at line 33 of file WorkspaceBoundingBox.h.
References y.
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
|
inline |
Definition at line 39 of file WorkspaceBoundingBox.h.
References yMax.
|
inline |
Definition at line 38 of file WorkspaceBoundingBox.h.
References yMin.
| bool Mantid::Algorithms::WorkspaceBoundingBox::isOutOfBoundsOfNonDirectBeam | ( | const double | beamRadius, |
| int | index, | ||
| const bool | directBeam | ||
| ) |
Checks to see if spectrum at index is within the diameter of the given beamRadius.
| beamRadius | :: radius of beam in meters |
| index | :: index of spectrum data |
| directBeam | :: whether or not the spectrum is subject to the beam |
Definition at line 137 of file WorkspaceBoundingBox.cpp.
References centerX, centerY, and position.
Referenced by Mantid::Algorithms::initBoundingBox(), and Mantid::Algorithms::updateBoundingBox().
| bool Mantid::Algorithms::WorkspaceBoundingBox::isValidWs | ( | int | index | ) | const |
Performs checks on the spectrum located at index to determine if it is acceptable to be operated on.
| index | :: index of spectrum data |
Definition at line 65 of file WorkspaceBoundingBox.cpp.
References Mantid::API::g_log, Mantid::API::SpectrumInfo::hasDetectors(), index, Mantid::API::SpectrumInfo::isMonitor(), m_spectrumInfo, Mantid::Kernel::Logger::warning(), and yValue().
Referenced by findFirstValidWs(), Mantid::Algorithms::initBoundingBox(), and Mantid::Algorithms::updateBoundingBox().
| void Mantid::Algorithms::WorkspaceBoundingBox::normalizePosition | ( | double | x, |
| double | y | ||
| ) |
Perform normalization on x/y coords over given values.
| x | :: value to normalize member x over |
| y | :: value to normalize member y over |
Definition at line 163 of file WorkspaceBoundingBox.cpp.
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
|
private |
Definition at line 23 of file WorkspaceBoundingBox.cpp.
References index, m_cachedPosition, m_cachedPositionIndex, m_spectrumInfo, and Mantid::API::SpectrumInfo::position().
| void Mantid::Algorithms::WorkspaceBoundingBox::setBounds | ( | double | xMin, |
| double | xMax, | ||
| double | yMin, | ||
| double | yMax | ||
| ) |
Definition at line 52 of file WorkspaceBoundingBox.cpp.
References xMax, xMin, yMax, and yMin.
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
| void Mantid::Algorithms::WorkspaceBoundingBox::setCenter | ( | double | x, |
| double | y | ||
| ) |
Definition at line 47 of file WorkspaceBoundingBox.cpp.
References centerX, centerY, x, and y.
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
| void Mantid::Algorithms::WorkspaceBoundingBox::setPosition | ( | double | x, |
| double | y | ||
| ) |
Definition at line 42 of file WorkspaceBoundingBox.cpp.
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
| void Mantid::Algorithms::WorkspaceBoundingBox::updateMinMax | ( | int | index | ) |
Compare current mins and maxs to the coordinates of the spectrum at index expnd mins and maxs to include this spectrum.
| index | :: index of spectrum data |
Definition at line 119 of file WorkspaceBoundingBox.cpp.
References position, x, xMax, xMin, y, yMax, and yMin.
Referenced by Mantid::Algorithms::initBoundingBox().
| double Mantid::Algorithms::WorkspaceBoundingBox::updatePositionAndReturnCount | ( | int | index | ) |
Sets member variables x/y to new x/y based on spectrum info and historgram data at the given index.
| index | :: index of spectrum data |
Definition at line 104 of file WorkspaceBoundingBox.cpp.
References position, x, y, and yValue().
Referenced by Mantid::Algorithms::initBoundingBox(), and Mantid::Algorithms::updateBoundingBox().
|
private |
Definition at line 34 of file WorkspaceBoundingBox.cpp.
References index, m_cachedHistogramYIndex, m_cachedYValue, and m_workspace.
Referenced by isValidWs(), and updatePositionAndReturnCount().
|
private |
Definition at line 64 of file WorkspaceBoundingBox.h.
Referenced by calculateDistance(), getCenterX(), isOutOfBoundsOfNonDirectBeam(), and setCenter().
|
private |
Definition at line 65 of file WorkspaceBoundingBox.h.
Referenced by calculateDistance(), getCenterY(), isOutOfBoundsOfNonDirectBeam(), and setCenter().
|
mutableprivate |
Definition at line 73 of file WorkspaceBoundingBox.h.
Referenced by yValue().
|
mutableprivate |
Definition at line 72 of file WorkspaceBoundingBox.h.
Referenced by position().
|
mutableprivate |
Definition at line 71 of file WorkspaceBoundingBox.h.
Referenced by position().
|
mutableprivate |
Definition at line 74 of file WorkspaceBoundingBox.h.
Referenced by yValue().
|
private |
Definition at line 61 of file WorkspaceBoundingBox.h.
Referenced by isValidWs(), position(), and WorkspaceBoundingBox().
|
private |
Definition at line 60 of file WorkspaceBoundingBox.h.
Referenced by getWorkspace(), WorkspaceBoundingBox(), and yValue().
|
private |
Definition at line 62 of file WorkspaceBoundingBox.h.
Referenced by calculateDistance(), calculateRadiusX(), containsPoint(), getX(), normalizePosition(), setCenter(), setPosition(), updateMinMax(), and updatePositionAndReturnCount().
|
private |
Definition at line 67 of file WorkspaceBoundingBox.h.
Referenced by calculateRadiusX(), containsPoint(), getXMax(), setBounds(), and updateMinMax().
|
private |
Definition at line 66 of file WorkspaceBoundingBox.h.
Referenced by calculateRadiusX(), containsPoint(), getXMin(), setBounds(), and updateMinMax().
|
private |
Definition at line 63 of file WorkspaceBoundingBox.h.
Referenced by calculateDistance(), calculateRadiusY(), getY(), normalizePosition(), setCenter(), setPosition(), updateMinMax(), and updatePositionAndReturnCount().
|
private |
Definition at line 69 of file WorkspaceBoundingBox.h.
Referenced by calculateRadiusY(), getYMax(), setBounds(), and updateMinMax().
|
private |
Definition at line 68 of file WorkspaceBoundingBox.h.
Referenced by calculateRadiusY(), containsPoint(), getYMin(), setBounds(), and updateMinMax().