30 if (mdCoordinates ==
QLab) {
31 peakTransformFactory = std::make_shared<PeakTransformQLabFactory>();
32 }
else if (mdCoordinates ==
QSample) {
33 peakTransformFactory = std::make_shared<PeakTransformQSampleFactory>();
35 peakTransformFactory = std::make_shared<PeakTransformHKLFactory>();
37 if (!peakTransformFactory) {
38 throw std::runtime_error(
"Failed to get a valid PeakTransformFactory");
40 const std::string xDim = mdWS->
getDimension(0)->getName();
41 const std::string yDim = mdWS->
getDimension(1)->getName();
52 if (coordinateSystem ==
None) {
53 throw std::invalid_argument(
"Input image IMDHistoWorkspace must have a "
54 "known special coordinate system.");
58 throw std::invalid_argument(
"Need to have 3 or more dimension in the workspace.");
122 return m_mdWS->getSignalAtVMD(center, normalization);
Basic MD Workspace Abstract Class.
virtual Kernel::SpecialCoordinateSystem getSpecialCoordinateSystem() const =0
virtual std::shared_ptr< const Mantid::Geometry::IMDDimension > getDimension(size_t index) const
Get a dimension.
virtual size_t getNumDims() const
Mantid::signal_t signalAtPeakCenter(const Mantid::Geometry::IPeak &peak, Mantid::API::MDNormalization normalization=Mantid::API::NoNormalization) const
Get the signal value at the peak center.
PeakClusterProjection(std::shared_ptr< Mantid::API::IMDWorkspace > &mdWS)
Constructor.
std::shared_ptr< Mantid::API::IMDWorkspace > m_mdWS
Image.
std::shared_ptr< Mantid::Geometry::PeakTransform > m_peakTransform
Peak Transform.
Mantid::Kernel::V3D peakCenter(const Mantid::Geometry::IPeak &peak) const
Get the peak center.
Structure describing a single-crystal peak.
QLab : Q in the lab frame MDFrame.
QSample : Q in the sample frame.
MDNormalization
Enum describing different ways to normalize the signal in a MDWorkspace.
std::shared_ptr< PeakTransformFactory > PeakTransformFactory_sptr
Factory Shared Pointer typedef.
std::shared_ptr< PeakTransform > PeakTransform_sptr
Typedef for a PeakTransform wrapped in a shared_pointer.
SpecialCoordinateSystem
Special coordinate systems for Q3D.
double signal_t
Typedef for the signal recorded in a MDBox, etc.