22 const bool ignoreMaskedDetectors,
const int nNeighbours)
24 std::vector<specnum_t> spectrumNumbers;
26 spectrumNumbers.reserve(nhist);
27 for (
size_t i = 0; i < nhist; ++i)
31 std::move(spectrumNumbers), ignoreMaskedDetectors);
45 const double radius)
const {
48 if (spectra.empty()) {
50 "Cannot find spectrum number for "
65 const double radius)
const {
IPeaksWorkspace_sptr workspace
specnum_t getSpectrumNo() const
Base MatrixWorkspace Abstract Class.
std::vector< specnum_t > getSpectraFromDetectorIDs(const std::vector< detid_t > &detIdList) const
Converts a list of detector IDs to the corresponding spectrum numbers.
virtual ISpectrum & getSpectrum(const size_t index)=0
Return the underlying ISpectrum ptr at the given workspace index.
virtual std::size_t getNumberHistograms() const =0
Returns the number of histograms in the workspace.
std::map< specnum_t, Kernel::V3D > getNeighbours(const Geometry::IDetector *comp, const double radius=0.0) const
Queries the WorkspaceNearestNeighbours object for the selected detector.
const MatrixWorkspace & m_workspace
WorkspaceNearestNeighbourInfo(const MatrixWorkspace &workspace, const bool ignoreMaskedDetectors, const int nNeighbours=8)
Creates WorkspaceNearestNeighbourInfo.
std::unique_ptr< WorkspaceNearestNeighbours > m_nearestNeighbours
std::map< specnum_t, Kernel::V3D > getNeighboursExact(specnum_t spec) const
Queries the WorkspaceNearestNeighbours object for the selected spectrum number.
~WorkspaceNearestNeighbourInfo()
Interface class for detector objects.
virtual detid_t getID() const =0
Get the detector ID.
Exception for when an item is not found in a collection.
int32_t specnum_t
Typedef for a spectrum Number.