From 85f397c64461499a27b13e84fbc0348b19feb248 Mon Sep 17 00:00:00 2001 From: Wim van Aarle Date: Tue, 24 Feb 2015 16:58:50 +0100 Subject: re-enabled get_geometry for 3d projectors --- matlab/mex/astra_mex_projector3d_c.cpp | 16 ++++++++-------- src/ConeVecProjectionGeometry3D.cpp | 2 +- src/ParallelProjectionGeometry3D.cpp | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/matlab/mex/astra_mex_projector3d_c.cpp b/matlab/mex/astra_mex_projector3d_c.cpp index 25980f9..95b3e0f 100644 --- a/matlab/mex/astra_mex_projector3d_c.cpp +++ b/matlab/mex/astra_mex_projector3d_c.cpp @@ -135,16 +135,16 @@ void astra_mex_projector3d_get_projection_geometry(int nlhs, mxArray* plhs[], in } // step3: get projection_geometry and turn it into a MATLAB struct - //if (1 <= nlhs) { - // plhs[0] = createProjectionGeometryStruct(pProjector->getProjectionGeometry()); - //} + if (1 <= nlhs) { + plhs[0] = createProjectionGeometryStruct(pProjector->getProjectionGeometry()); + } } //----------------------------------------------------------------------------------------- /** * [recon_geom] = astra_mex_projector3d('get_volume_geometry', pid); */ -void astra_mex_projector3d_get_reconstruction_geometry(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) +void astra_mex_projector3d_get_volume_geometry(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { // step1: read input if (nrhs < 2) { @@ -161,9 +161,9 @@ void astra_mex_projector3d_get_reconstruction_geometry(int nlhs, mxArray* plhs[] } // step3: get projection_geometry and turn it into a MATLAB struct - //if (1 <= nlhs) { - // plhs[0] = createVolumeGeometryStruct(pProjector->getVolumeGeometry()); - //} + if (1 <= nlhs) { + plhs[0] = createVolumeGeometryStruct(pProjector->getVolumeGeometry()); + } } //----------------------------------------------------------------------------------------- @@ -413,7 +413,7 @@ void mexFunction(int nlhs, mxArray* plhs[], } else if (sMode == "get_projection_geometry") { astra_mex_projector3d_get_projection_geometry(nlhs, plhs, nrhs, prhs); } else if (sMode == "get_volume_geometry") { - astra_mex_projector3d_get_reconstruction_geometry(nlhs, plhs, nrhs, prhs); + astra_mex_projector3d_get_volume_geometry(nlhs, plhs, nrhs, prhs); } else if (sMode == "weights_single_ray") { astra_mex_projector_weights_single_ray(nlhs, plhs, nrhs, prhs); //} else if (sMode == "weights_projection") { diff --git a/src/ConeVecProjectionGeometry3D.cpp b/src/ConeVecProjectionGeometry3D.cpp index fd549e0..3c32527 100644 --- a/src/ConeVecProjectionGeometry3D.cpp +++ b/src/ConeVecProjectionGeometry3D.cpp @@ -198,7 +198,7 @@ bool CConeVecProjectionGeometry3D::isEqual(const CProjectionGeometry3D * _pGeom2 // is of type bool CConeVecProjectionGeometry3D::isOfType(const std::string& _sType) const { - return (_sType == "cone3d_vec" || _sType == "cone_vec"); + return (_sType == "cone_vec"); } //---------------------------------------------------------------------------------------- diff --git a/src/ParallelProjectionGeometry3D.cpp b/src/ParallelProjectionGeometry3D.cpp index 2400ff9..7130d71 100644 --- a/src/ParallelProjectionGeometry3D.cpp +++ b/src/ParallelProjectionGeometry3D.cpp @@ -154,7 +154,7 @@ bool CParallelProjectionGeometry3D::isEqual(const CProjectionGeometry3D * _pGeom // is of type bool CParallelProjectionGeometry3D::isOfType(const std::string& _sType) const { - return (_sType == "parallel" || _sType == "parallel3d"); + return (_sType == "parallel3d"); } //---------------------------------------------------------------------------------------- -- cgit v1.2.3