Mantid
Loading...
Searching...
No Matches
SmoothMD.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2015 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
10#include "MantidMDAlgorithms/DllConfig.h"
11#include <boost/optional.hpp>
12#include <memory>
13
14namespace Mantid {
15namespace API {
16class IMDHistoWorkspace;
17}
18namespace MDAlgorithms {
19
20DLLExport std::vector<double> gaussianKernel(const double fwhm);
21DLLExport std::vector<double> normaliseKernel(std::vector<double> kernel);
22DLLExport std::vector<double> renormaliseKernel(std::vector<double> kernel, const std::vector<bool> &validity);
23
26class MANTID_MDALGORITHMS_DLL SmoothMD final : public API::Algorithm {
27public:
28 const std::string name() const override;
29 int version() const override;
30 const std::vector<std::string> seeAlso() const override { return {"ThresholdMD"}; }
31 const std::string category() const override;
32 const std::string summary() const override;
33 std::map<std::string, std::string> validateInputs() override;
34
35 std::shared_ptr<Mantid::API::IMDHistoWorkspace>
36 hatSmooth(const std::shared_ptr<const Mantid::API::IMDHistoWorkspace> &toSmooth,
37 const std::vector<double> &widthVector, const std::shared_ptr<Mantid::API::IMDHistoWorkspace> &weightingWS);
38
39 std::shared_ptr<Mantid::API::IMDHistoWorkspace>
40 gaussianSmooth(const std::shared_ptr<const Mantid::API::IMDHistoWorkspace> &toSmooth,
41 const std::vector<double> &widthVector,
42 const std::shared_ptr<Mantid::API::IMDHistoWorkspace> &weightingWS);
43
44private:
45 void init() override;
46 void exec() override;
47};
48
49} // namespace MDAlgorithms
50} // namespace Mantid
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
Definition: System.h:53
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
SmoothMD : Algorithm for smoothing MDHistoWorkspaces.
Definition: SmoothMD.h:26
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: SmoothMD.h:30
DLLExport std::vector< double > gaussianKernel(const double fwhm)
Definition: SmoothMD.cpp:77
DLLExport std::vector< double > renormaliseKernel(std::vector< double > kernel, const std::vector< bool > &validity)
Definition: SmoothMD.cpp:114
DLLExport std::vector< double > normaliseKernel(std::vector< double > kernel)
Definition: SmoothMD.cpp:131
Helper class which provides the Collimation Length for SANS instruments.