Mantid
Loading...
Searching...
No Matches
SaveVTK.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2008 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
9//---------------------------------------------------
10// Includes
11//---------------------------------------------------
12#include "MantidAPI/Algorithm.h"
13#include "MantidDataHandling/DllConfig.h"
14
15#include <span>
16
17namespace Mantid {
18namespace DataHandling {
45class MANTID_DATAHANDLING_DLL SaveVTK final : public API::Algorithm {
46
47public:
49 SaveVTK();
50
52 const std::string name() const override { return "SaveVTK"; };
54 const std::string summary() const override {
55 return "Save a workspace out to a VTK file format for use with 3D "
56 "visualisation tools such as Paraview.";
57 }
58
60 int version() const override { return 1; };
62 const std::string category() const override { return "DataHandling\\XML"; }
63
64private:
66 void init() override;
67
69 void exec() override;
70
72 void checkOptionalProperties();
73
75 void writeVTKPiece(std::ostream &outVTP, std::span<double const> xValue, std::span<double const> yValue,
76 std::span<double const> errors, int index) const;
77
79 double m_Xmin;
80
82 double m_Xmax;
83};
84} // namespace DataHandling
85} // namespace Mantid
std::map< DeltaEMode::Type, std::string > index
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
Saves a 1D or 2D workspace using the vtk file format described in the "file formats" document at http...
Definition SaveVTK.h:45
const std::string name() const override
Algorithm's name.
Definition SaveVTK.h:52
int version() const override
Algorithm's version.
Definition SaveVTK.h:60
double m_Xmin
The x-axis minimum.
Definition SaveVTK.h:79
const std::string category() const override
Algorithm's category.
Definition SaveVTK.h:62
double m_Xmax
The x-axis minimum.
Definition SaveVTK.h:82
const std::string summary() const override
Summary of algorithms purpose.
Definition SaveVTK.h:54
Helper class which provides the Collimation Length for SANS instruments.