Mantid
Loading...
Searching...
No Matches
RectangularDetector.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
10#include <boost/python/class.hpp>
11#include <boost/python/copy_const_reference.hpp>
12#include <boost/python/register_ptr_to_python.hpp>
13#include <boost/python/return_value_policy.hpp>
14
16using namespace Mantid::Geometry;
17using namespace boost::python;
18
20
21
26 register_ptr_to_python<RectangularDetector_sptr>();
27 register_ptr_to_python<RectangularDetector_const_sptr>();
28
29 // vector of RectangularDetector's without an internal proxy
30 std_vector_exporter<RectangularDetector_const_sptr, /*NoProxy=*/true>::wrap("std_vector_rectangular_detector");
31
32 class_<RectangularDetector, bases<GridDetector>, boost::noncopyable>("RectangularDetector", no_init)
33 .def("xpixels", &RectangularDetector::xpixels, arg("self"), return_value_policy<copy_const_reference>(),
34 "Returns the number of pixels in the X direction")
35 .def("ypixels", &RectangularDetector::ypixels, arg("self"), return_value_policy<copy_const_reference>(),
36 "Returns the number of pixels in the Y direction")
37 .def("xstep", &RectangularDetector::xstep, arg("self"), "Returns the step size in the X direction")
38 .def("ystep", &RectangularDetector::ystep, arg("self"), "Returns the step size in the Y direction")
39 .def("xsize", &RectangularDetector::xsize, arg("self"), "Returns the size in the X direction")
40 .def("ysize", &RectangularDetector::ysize, arg("self"), "Returns the size in the Y direction")
41 .def("xstart", &RectangularDetector::xstart, arg("self"), "Returns the start position in the X direction")
42 .def("ystart", &RectangularDetector::ystart, arg("self"), "Returns the start position in the Y direction")
43 .def("idstart", &RectangularDetector::idstart, arg("self"), return_value_policy<copy_const_reference>(),
44 "Returns the idstart")
45 .def("idfillbyfirst_y", &RectangularDetector::idfillbyfirst_y, arg("self"),
46 return_value_policy<copy_const_reference>(), "Returns the idfillbyfirst_y")
47 .def("idstepbyrow", &RectangularDetector::idstepbyrow, arg("self"), return_value_policy<copy_const_reference>(),
48 "Returns the idstepbyrow")
49 .def("idstep", &RectangularDetector::idstep, arg("self"), return_value_policy<copy_const_reference>(),
50 "Returns the idstep")
51 .def("minDetectorID", &RectangularDetector::minDetectorID, arg("self"),
52 return_value_policy<copy_const_reference>(), "Returns the minimum detector id")
53 .def("maxDetectorID", &RectangularDetector::maxDetectorID, arg("self"),
54 return_value_policy<copy_const_reference>(), "Returns the maximum detector id");
55}
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition GetPointer.h:17
void export_RectangularDetector()
Enables boost.python to automatically "cast" an object up to the appropriate Detector leaf type.
RectangularDetector is a type of CompAssembly, an assembly of components.
std::shared_ptr< const RectangularDetector > RectangularDetector_const_sptr
A struct to help export std::vector types.