37 "Include any peak in the region that has a shape extent "
38 "extending into that region.");
42 auto mandatoryExtents = std::make_shared<Mantid::Kernel::MandatoryValidator<std::vector<double>>>();
44 std::vector<double> extents(2, 0);
48 "A comma separated list of min, max for each dimension,\n"
49 "specifying the extents of each dimension. Optional, default +-50 in "
57 std::stringstream outbuff;
59 throw std::invalid_argument(
"Six commma separated entries for the extents expected");
63 throw std::invalid_argument(outbuff.str());
67 throw std::invalid_argument(outbuff.str());
71 throw std::invalid_argument(outbuff.str());
86 if (normal.
scalar_prod(touchPoint - faceVertex) != 0) {
87 throw std::runtime_error(
"Debugging. Calculation is wrong. touch point should always be on the "
104 const int minXIndex = 0;
105 const int maxXIndex = 1;
106 const int minYIndex = 2;
107 const int maxYIndex = 3;
108 const int minZIndex = 4;
109 const int maxZIndex = 5;
132 faces[faceIndex++] = {point1, point5, point6};
136 faces[faceIndex++] = {point4, point7, point8};
140 faces[faceIndex++] = {point1, point4, point8};
144 faces[faceIndex++] = {point2, point3, point7};
148 faces[faceIndex++] = {point1, point2, point3};
152 faces[faceIndex++] = {point5, point6, point7};
163 const bool checkPeakExtents = this->
getProperty(
"CheckPeakExtents");
#define DECLARE_ALGORITHM(classname)
void declareProperty(std::unique_ptr< Kernel::Property > p, const std::string &doc="") override
Add a property to the list of managed properties.
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
PeaksInRegion : Find peaks that are either inside a box region, or that have a radius of sufficent si...
void exec() override
Execute the algorithm.
void init() override
Initialize the algorithm's properties.
std::vector< double > m_extents
Extents.
void validateExtentsInput() const override
Validate the input extents.
VecVecV3D createFaces() const override
Create the faces associated with this shape.
int numberOfFaces() const override
Implementation of pure virtual method on PeaksIntersection.
bool pointInsideAllExtents(const Mantid::Kernel::V3D &testPoint, const Mantid::Kernel::V3D &peakCenter) const override
Check that a point is inside ALL of the extents.
void checkTouchPoint(const Mantid::Kernel::V3D &touchPoint, const Mantid::Kernel::V3D &normal, const Mantid::Kernel::V3D &faceVertex) const override
Verfifies that the normals have been set up correctly such that the touch point falls onto the plane.
bool pointOutsideAnyExtents(const Mantid::Kernel::V3D &testPoint) const override
Check that a point is outside any of the extents.
const std::string category() const override
Algorithm's category for identification.
int version() const override
Algorithm's version for identification.
void executePeaksIntersection(const bool checkPeakExtents=true)
Run the algorithm.
void initBaseProperties()
Initalize the common properties.
Support for a property that holds an array of values.
void setPropertySettings(const std::string &name, std::unique_ptr< IPropertySettings > settings)
The concrete, templated class for properties.
constexpr double scalar_prod(const V3D &v) const noexcept
Calculates the cross product.
std::vector< VecV3D > VecVecV3D