8#include "MantidJson/Json.h"
23 std::string algorithmName,
int algorithmVersion)
24 :
PeakShapeBase(frame,
std::move(algorithmName), algorithmVersion), m_radius(peakRadius) {}
37 std::string algorithmName,
int algorithmVersion)
38 :
PeakShapeBase(frame,
std::move(algorithmName), algorithmVersion), m_radius(peakRadius),
39 m_backgroundInnerRadius(peakInnerRadius), m_backgroundOuterRadius(peakOuterRadius) {
52 root[
"radius"] = Json::Value(
m_radius);
59 return Mantid::JsonHelpers::jsonToString(root);
83 boost::optional<double>
value;
double value
The value of the point.
PeakShapeBase : Base class for concrete PeakShapes containing common code.
void buildCommon(Json::Value &root) const
Build common parts of outgoing JSON serialization.
bool operator==(const PeakShapeBase &other) const
Equals operator.
PeakShapeSpherical : PeakShape for a spherical peak.
PeakShapeSpherical(const double &peakRadius, Kernel::SpecialCoordinateSystem frame, std::string algorithmName=std::string(), int algorithmVersion=-1)
Constructor.
std::string shapeName() const override
Shape name.
boost::optional< double > radius(RadiusType type=RadiusType::Radius) const override
Peak radius.
boost::optional< double > backgroundInnerRadius() const
Peak inner background radius.
std::string toJSON() const override
Serialization method.
double m_radius
Peak radius.
boost::optional< double > m_backgroundInnerRadius
Background inner radius;.
bool operator==(const PeakShapeSpherical &other) const
Equals operator.
static const std::string sphereShapeName()
Non-instance shape name.
boost::optional< double > backgroundOuterRadius() const
Peak outer background radius.
PeakShapeSpherical * clone() const override
Clone the peak shape.
boost::optional< double > m_backgroundOuterRadius
Background outer radius.
RadiusType
For selecting different radius types.
SpecialCoordinateSystem
Special coordinate systems for Q3D.