From ebd5fe932fd2d6c4a516bc1cdc69e37aa4f5cf55 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Wed, 8 Feb 2017 10:43:35 +0100
Subject: Make python -sinocone a synonym of -sino.

The matlab interface already behaves like this.
---
 matlab/mex/astra_mex_data3d_c.cpp |  2 +-
 python/astra/data3d_c.pyx         | 14 +-------------
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/matlab/mex/astra_mex_data3d_c.cpp b/matlab/mex/astra_mex_data3d_c.cpp
index 2dca3b8..f0aa3c8 100644
--- a/matlab/mex/astra_mex_data3d_c.cpp
+++ b/matlab/mex/astra_mex_data3d_c.cpp
@@ -60,7 +60,7 @@ using namespace astra;
 //-----------------------------------------------------------------------------------------
 /**
  * id = astra_mex_io_data('create', datatype, geometry, data);
- *        datatype: ['-vol','-sino','-sinocone'] 
+ *        datatype: ['-vol','-sino']
  */
 void astra_mex_data3d_create(int& nlhs, mxArray* plhs[], int& nrhs, const mxArray* prhs[])
 { 
diff --git a/python/astra/data3d_c.pyx b/python/astra/data3d_c.pyx
index 1b9293a..3934f22 100644
--- a/python/astra/data3d_c.pyx
+++ b/python/astra/data3d_c.pyx
@@ -86,7 +86,7 @@ def create(datatype,geometry,data=None, link=False):
             pDataObject3D = <CFloat32Data3DMemory * > new CFloat32VolumeData3DMemory(pGeometry)
         del cfg
         del pGeometry
-    elif datatype == '-sino' or datatype == '-proj3d':
+    elif datatype == '-sino' or datatype == '-proj3d' or datatype == '-sinocone':
         cfg = utils.dictToConfig(six.b('ProjectionGeometry'), geometry)
         tpe = wrap_from_bytes(cfg.self.getAttribute(six.b('type')))
         if (tpe == "parallel3d"):
@@ -111,18 +111,6 @@ def create(datatype,geometry,data=None, link=False):
             pDataObject3D = <CFloat32Data3DMemory * > new CFloat32ProjectionData3DMemory(ppGeometry)
         del ppGeometry
         del cfg
-    elif datatype == "-sinocone":
-        cfg = utils.dictToConfig(six.b('ProjectionGeometry'), geometry)
-        pppGeometry = new CConeProjectionGeometry3D()
-        if not pppGeometry.initialize(cfg[0]):
-            del cfg
-            del pppGeometry
-            raise Exception('Geometry class not initialized.')
-        if link:
-            pCustom = <CFloat32CustomMemory*> new CFloat32CustomPython(data)
-            pDataObject3D = <CFloat32Data3DMemory * > new CFloat32ProjectionData3DMemory(pppGeometry, pCustom)
-        else:
-            pDataObject3D = <CFloat32Data3DMemory * > new CFloat32ProjectionData3DMemory(pppGeometry)
     else:
         raise Exception("Invalid datatype.  Please specify '-vol' or '-proj3d'.")
 
-- 
cgit v1.2.3