20class MDImplicitFunction;
42 IMDWorkspace(
const Parallel::StorageMode storageMode = Parallel::StorageMode::Cloned);
49 std::vector<coord_t>
x;
50 std::vector<signal_t>
y;
51 std::vector<signal_t>
e;
55 std::unique_ptr<IMDWorkspace>
clone()
const {
return std::unique_ptr<IMDWorkspace>(doClone()); }
58 std::unique_ptr<IMDWorkspace>
cloneEmpty()
const {
return std::unique_ptr<IMDWorkspace>(doCloneEmpty()); }
75 virtual std::vector<std::unique_ptr<IMDIterator>>
92 std::string getConvention()
const;
93 void setConvention(std::string convention);
94 std::string changeQConvention();
104 virtual void setMDMasking(std::unique_ptr<Mantid::Geometry::MDImplicitFunction> maskingRegion) = 0;
135 void makeSinglePointWithNaN(std::vector<coord_t> &x, std::vector<signal_t> &y, std::vector<signal_t> &e)
const;
137 const std::string toString()
const override;
Basic MD Workspace Abstract Class.
virtual void setMDMasking(std::unique_ptr< Mantid::Geometry::MDImplicitFunction > maskingRegion)=0
Setter for the masking region.
virtual void clearFileBacked(bool)
if a workspace was filebacked, this should clear file-based status, delete file-based information and...
virtual signal_t getSignalAtCoord(const coord_t *coords, const Mantid::API::MDNormalization &normalization) const =0
Returns the (normalized) signal at a given coordinates.
IMDWorkspace(const IMDWorkspace &)=default
Protected copy constructor. May be used by childs for cloning.
virtual bool isMDHistoWorkspace() const
IMDWorkspace * doCloneEmpty() const override=0
Virtual cloneEmpty method.
IMDWorkspace & operator=(const IMDWorkspace &other)=delete
virtual uint64_t getNEvents() const =0
virtual Kernel::SpecialCoordinateSystem getSpecialCoordinateSystem() const =0
std::unique_ptr< IMDWorkspace > clone() const
Returns a clone of the workspace.
virtual void clearMDMasking()=0
Clear existing masks.
virtual bool hasOrientedLattice() const =0
std::unique_ptr< IMDWorkspace > cloneEmpty() const
Returns a default-initialized clone of the workspace.
virtual signal_t getSignalWithMaskAtCoord(const coord_t *coords, const Mantid::API::MDNormalization &normalization) const =0
Returns the (normalized) signal at a given coordinates or 0 if the value.
virtual uint64_t getNPoints() const =0
Get the number of points associated with the workspace.
virtual ITableWorkspace_sptr makeBoxTable(size_t, size_t)
this is the method to build table workspace from any workspace.
virtual std::vector< std::unique_ptr< IMDIterator > > createIterators(size_t suggestedNumCores=1, Mantid::Geometry::MDImplicitFunction *function=nullptr) const =0
Creates a new iterator pointing to the first cell in the workspace.
IMDWorkspace * doClone() const override=0
Virtual clone method. Not implemented to force implementation in children.
Describes the geometry (i.e.
Base Workspace Abstract Class.
An "ImplicitFunction" defining a hyper-cuboid-shaped region in N dimensions.
Marks code as not implemented yet.
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
std::shared_ptr< const IMDWorkspace > IMDWorkspace_const_sptr
Shared pointer to the IMDWorkspace base class (const version)
static const signal_t MDMaskValue
std::shared_ptr< IMDWorkspace > IMDWorkspace_sptr
Shared pointer to the IMDWorkspace base class.
MDNormalization
Enum describing different ways to normalize the signal in a MDWorkspace.
@ VolumeNormalization
Divide the signal by the volume of the box/bin.
SpecialCoordinateSystem
Special coordinate systems for Q3D.
Helper class which provides the Collimation Length for SANS instruments.
float coord_t
Typedef for the data type to use for coordinate axes in MD objects such as MDBox, MDEventWorkspace,...
double signal_t
Typedef for the signal recorded in a MDBox, etc.
Holds X, Y, E for a line plot.
std::vector< signal_t > y
std::vector< signal_t > e