fix tests
This commit is contained in:
@@ -267,7 +267,8 @@ void init_math(py::module_ &m) {
|
||||
.def("__call__", &Accumulator_ABClip<double>::operator());
|
||||
|
||||
// 5. Core Math Structures
|
||||
py::class_<AffineTransform>(m, "AffineTransform")
|
||||
py::class_<AffineTransform, std::shared_ptr<AffineTransform>>(m,
|
||||
"AffineTransform")
|
||||
.def(py::init<>())
|
||||
.def("GetWorldMatrix", &AffineTransform::GetWorldMatrix)
|
||||
.def("SetPosition", &AffineTransform::SetPosition)
|
||||
@@ -284,7 +285,7 @@ void init_math(py::module_ &m) {
|
||||
.def("EulerYZYRotate", &AffineTransform::EulerYZYRotate)
|
||||
.def("FlipAxes", &AffineTransform::FlipAxes);
|
||||
|
||||
py::class_<Geometry, AffineTransform>(m, "Geometry")
|
||||
py::class_<Geometry, AffineTransform, std::shared_ptr<Geometry>>(m, "Geometry")
|
||||
.def(py::init<>())
|
||||
.def("GetWorldPoint", py::overload_cast<const Vector4f>(
|
||||
&Geometry::GetWorldPoint, py::const_))
|
||||
@@ -295,7 +296,8 @@ void init_math(py::module_ &m) {
|
||||
.def("GetLocalPoint",
|
||||
py::overload_cast<float, float, float>(&Geometry::GetLocalPoint));
|
||||
|
||||
py::class_<ContainerBox, AffineTransform, Object>(m, "ContainerBox")
|
||||
py::class_<ContainerBox, AffineTransform, Object, std::shared_ptr<ContainerBox>>(
|
||||
m, "ContainerBox")
|
||||
.def(py::init<>())
|
||||
.def("SetOrigin", &ContainerBox::SetOrigin)
|
||||
.def("GetOrigin", &ContainerBox::GetOrigin)
|
||||
@@ -323,7 +325,7 @@ void init_math(py::module_ &m) {
|
||||
.value("ZYX", StructuredData::ZYX)
|
||||
.export_values();
|
||||
|
||||
py::class_<StructuredData>(m, "StructuredData")
|
||||
py::class_<StructuredData, std::shared_ptr<StructuredData>>(m, "StructuredData")
|
||||
.def(py::init<const Vector3i &>())
|
||||
.def("GetDims", &StructuredData::GetDims)
|
||||
.def("SetDims", &StructuredData::SetDims)
|
||||
@@ -335,7 +337,8 @@ void init_math(py::module_ &m) {
|
||||
.def("Map", &StructuredData::Map)
|
||||
.def("UnMap", &StructuredData::UnMap);
|
||||
|
||||
py::class_<StructuredGrid, ContainerBox, StructuredData>(m, "StructuredGrid")
|
||||
py::class_<StructuredGrid, ContainerBox, StructuredData,
|
||||
std::shared_ptr<StructuredGrid>>(m, "StructuredGrid")
|
||||
.def(py::init<const Vector3i &>())
|
||||
.def("SetSpacing", &StructuredGrid::SetSpacing)
|
||||
.def("GetSpacing", &StructuredGrid::GetSpacing)
|
||||
@@ -380,7 +383,8 @@ void init_math(py::module_ &m) {
|
||||
.def_readwrite("Value", &Voxel::Value)
|
||||
.def_readwrite("Count", &Voxel::Count);
|
||||
|
||||
py::class_<Abstract::VoxImage, StructuredGrid>(m, "AbstractVoxImage")
|
||||
py::class_<Abstract::VoxImage, StructuredGrid,
|
||||
std::shared_ptr<Abstract::VoxImage>>(m, "AbstractVoxImage")
|
||||
.def("GetValue", py::overload_cast<const Vector3i &>(
|
||||
&Abstract::VoxImage::GetValue, py::const_))
|
||||
.def("GetValue", py::overload_cast<const int>(
|
||||
@@ -394,7 +398,8 @@ void init_math(py::module_ &m) {
|
||||
.def("ImportFromVtk", &Abstract::VoxImage::ImportFromVtk)
|
||||
.def("ImportFromVti", &Abstract::VoxImage::ImportFromVti);
|
||||
|
||||
py::class_<VoxImage<Voxel>, Abstract::VoxImage>(m, "VoxImage")
|
||||
py::class_<VoxImage<Voxel>, Abstract::VoxImage,
|
||||
std::shared_ptr<VoxImage<Voxel>>>(m, "VoxImage")
|
||||
.def(py::init<>())
|
||||
.def(py::init<const Vector3i &>())
|
||||
.def("Data", &VoxImage<Voxel>::Data,
|
||||
|
||||
Reference in New Issue
Block a user