Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re #8943. Moving newly exposed IMaskWorkspace into python.
- Loading branch information
1 parent
ce0be8c
commit a296cb5
Showing
3 changed files
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
Code/Mantid/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
#include "MantidAPI/IMaskWorkspace.h" | ||
#include "MantidAPI/MatrixWorkspace.h" | ||
#include "MantidPythonInterface/kernel/Registry/DataItemInterface.h" | ||
#include <boost/python/class.hpp> | ||
|
||
using Mantid::API::IMaskWorkspace; | ||
using Mantid::API::IMaskWorkspace_sptr; | ||
using Mantid::API::MatrixWorkspace; | ||
using namespace boost::python; | ||
namespace Registry = Mantid::PythonInterface::Registry; | ||
|
||
/** Python exports of the Mantid::API::IMaskWorkspace class. */ | ||
void export_IMaskWorkspace() | ||
{ | ||
class_<IMaskWorkspace, boost::noncopyable>("IMaskWorkspace", no_init) | ||
class_<IMaskWorkspace, bases<MatrixWorkspace>, boost::noncopyable>("IMaskWorkspace", no_init) | ||
.def("getNumberMasked", &IMaskWorkspace::getNumberMasked, args("self"), | ||
"Total number of masked pixels") | ||
; | ||
|
||
Registry::DataItemInterface<IMaskWorkspace> entry; | ||
entry.castFromID("MaskWorkspace"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters