Mantid
Loading...
Searching...
No Matches
TransformMD.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
11#include "MantidMDAlgorithms/DllConfig.h"
12
13namespace Mantid {
14namespace MDAlgorithms {
15
20class MANTID_MDALGORITHMS_DLL TransformMD final : public API::Algorithm {
21public:
22 const std::string name() const override;
24 const std::string summary() const override { return "Scale and/or offset the coordinates of a MDWorkspace"; }
25
26 int version() const override;
27 const std::vector<std::string> seeAlso() const override { return {"InvertMDDim"}; }
28 const std::string category() const override;
29
30private:
31 void init() override;
32 void exec() override;
33 void reverse(signal_t *array, size_t arrayLength);
35 const std::vector<int> &axes);
36 template <typename MDE, size_t nd> void doTransform(typename Mantid::DataObjects::MDEventWorkspace<MDE, nd>::sptr ws);
37
38 std::vector<double> m_scaling;
39 std::vector<double> m_offset;
40};
41
42} // namespace MDAlgorithms
43} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
std::shared_ptr< MDEventWorkspace< MDE, nd > > sptr
Typedef for a shared pointer of this kind of event workspace.
Scale and/or offset the coordinates of a MDWorkspace.
Definition: TransformMD.h:20
std::vector< double > m_offset
Definition: TransformMD.h:39
const std::string summary() const override
Summary of algorithms purpose.
Definition: TransformMD.h:24
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
Definition: TransformMD.h:27
std::vector< double > m_scaling
Definition: TransformMD.h:38
std::shared_ptr< MDHistoWorkspace > MDHistoWorkspace_sptr
A shared pointer to a MDHistoWorkspace.
Helper class which provides the Collimation Length for SANS instruments.
double signal_t
Typedef for the signal recorded in a MDBox, etc.
Definition: MDTypes.h:36