Loading [MathJax]/jax/output/HTML-CSS/config.js
Mantid
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
w
x
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Properties
a
b
e
f
i
l
m
o
s
t
u
w
Related Functions
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Variables
_
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
e
f
k
l
o
p
r
s
t
v
w
Macros
a
b
c
d
e
f
g
i
k
l
m
n
p
q
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
Loading...
Searching...
No Matches
Framework
PythonInterface
mantid
geometry
src
Exports
ComponentInfoItem.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 +
7
#include "
MantidGeometry/Instrument/ComponentInfoItem.h
"
8
#include "
MantidGeometry/Instrument/ComponentInfo.h
"
9
#include "
MantidKernel/Quat.h
"
10
#include "
MantidKernel/V3D.h
"
11
#include "
MantidPythonInterface/core/Converters/WrapWithNDArray.h
"
12
#include "
MantidPythonInterface/core/Policies/VectorToNumpy.h
"
13
#include <boost/python/class.hpp>
14
#include <boost/python/make_function.hpp>
15
#include <boost/python/module.hpp>
16
17
using
Mantid::Geometry::ComponentInfo
;
18
using
Mantid::Geometry::ComponentInfoItem
;
19
using
Mantid::Kernel::V3D
;
20
using namespace
boost::python
;
21
using namespace
Mantid::PythonInterface::Converters
;
22
using namespace
Mantid::PythonInterface::Policies
;
23
24
// Export DetectorInfoItem
25
void
export_ComponentInfoItem
() {
26
27
// Export to Python
28
class_<ComponentInfoItem<ComponentInfo>>(
"ComponentInfoItem"
, no_init)
29
.add_property(
"isDetector"
, &
ComponentInfoItem<ComponentInfo>::isDetector
)
30
.add_property(
"componentsInSubtree"
, make_function(&
ComponentInfoItem<ComponentInfo>::componentsInSubtree
,
31
return_value_policy<VectorToNumpy>()))
32
.add_property(
"detectorsInSubtree"
, make_function(&
ComponentInfoItem<ComponentInfo>::detectorsInSubtree
,
33
return_value_policy<VectorToNumpy>()))
34
.add_property(
"position"
, &
ComponentInfoItem<ComponentInfo>::position
)
35
.add_property(
"rotation"
, &
ComponentInfoItem<ComponentInfo>::rotation
)
36
.add_property(
"parent"
, &
ComponentInfoItem<ComponentInfo>::parent
)
37
.add_property(
"hasParent"
, &
ComponentInfoItem<ComponentInfo>::hasParent
)
38
.add_property(
"scaleFactor"
, &
ComponentInfoItem<ComponentInfo>::scaleFactor
)
39
.add_property(
"name"
, &
ComponentInfoItem<ComponentInfo>::name
)
40
.add_property(
"children"
, make_function(&
ComponentInfoItem<ComponentInfo>::children
,
41
return_value_policy<
VectorRefToNumpy<WrapReadOnly>
>()))
42
.add_property(
"index"
, &
ComponentInfoItem<ComponentInfo>::index
);
43
}
export_ComponentInfoItem
void export_ComponentInfoItem()
Definition:
ComponentInfoItem.cpp:25
ComponentInfoItem.h
ComponentInfo.h
Quat.h
V3D.h
VectorToNumpy.h
WrapWithNDArray.h
Mantid::Geometry::ComponentInfoItem
ComponentInfoItem Return type for ComponentInfoIterators.
Definition:
ComponentInfoItem.h:20
Mantid::Geometry::ComponentInfo
ComponentInfo : Provides a component centric view on to the instrument.
Definition:
ComponentInfo.h:40
Mantid::Kernel::V3D
Class for 3D vectors.
Definition:
V3D.h:34
Mantid::PythonInterface::Converters
Definition:
CArrayToNDArray.h:14
Mantid::PythonInterface::Policies
Definition:
AsType.h:20
boost::python
Definition:
NDArray.h:50
Mantid::PythonInterface::Policies::VectorRefToNumpy
Implements a return value policy that returns a numpy array from a rerence to a std::vector.
Definition:
VectorToNumpy.h:63
Generated on Tue Jan 3 2023 11:57:59 for Mantid by
1.9.5