36 std::vector<std::string> operators{
"AND",
"OR",
"XOR",
"NOT"};
40 "MaskWorkspace 1 for binary operation");
43 "Optional MaskWorkspace 2 for binary operation");
44 declareProperty(
"OperationType",
"AND", std::make_shared<StringListValidator>(operators),
45 "Operator for Workspace1 and Workspace2");
48 "Output MaskWorkspace as result of binary operation");
63 if (outputws != inputws1) {
66 outputws = std::make_shared<DataObjects::MaskWorkspace>(inputws1->getInstrument());
67 outputws->copyFrom(inputws1);
83 }
else if (op ==
"OR") {
85 }
else if (op ==
"XOR") {
90 outputws->binaryOperation(inputws2_special, binop);
#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.
A property class for workspaces.
BinaryOperateMasks : TODO: DESCRIPTION.
void init() override
Initialisation code.
~BinaryOperateMasks() override
Destructor.
void exec() override
Execution code.
IPropertyManager * setProperty(const std::string &name, const T &value)
Templated method to set the value of a PropertyWithValue.
std::shared_ptr< const SpecialWorkspace2D > SpecialWorkspace2D_const_sptr
shared pointer to a const SpecialWorkspace2D
std::shared_ptr< const MaskWorkspace > MaskWorkspace_const_sptr
shared pointer to a const MaskWorkspace
std::shared_ptr< MaskWorkspace > MaskWorkspace_sptr
shared pointer to the MaskWorkspace class
@ Input
An input workspace.
@ Output
An output workspace.