Table of Contents
Algorithm to set a MDHistoWorkspace in points determined by a mask boolean MDHistoWorkspace.
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | IMDHistoWorkspace | Mandatory | An input MDHistoWorkspace. |
MaskWorkspace | Input | IMDHistoWorkspace | Mandatory | A mask MDHistoWorkspace, where true indicates where to set the value. |
ValueWorkspace | Input | IMDHistoWorkspace | Workspace to copy to the output workspace over the input. Optional - specify this or Value. | |
Value | Input | number | Optional | Single number to set in the output workspace. Optional - specify this or ValueWorkspace |
OutputWorkspace | Output | IMDHistoWorkspace | Mandatory | An output MDHistoWorkspace. |
This algorithm is used to replace values in a MDHistoWorkspace but only at particular points.
A mask MDHistoWorkspace is provided, where non-zero values indicate ‘true’. At these points, the corresponding value in the ValueWorkspace will be set. Any ‘false’ points in the MaskWorkspace are skipped.
If ValueWorkspace is not specified, the you must specify Value, which is a a simple number to set.
In matlab, the equivalent function call would be WS[mask] = OtherWS[mask]
See this page on boolean operations for examples of how to create a mask.
Categories: AlgorithmIndex | MDAlgorithms\MDArithmetic
C++ source: SetMDUsingMask.cpp (last modified: 2019-06-05)
C++ header: SetMDUsingMask.h (last modified: 2018-10-05)