{"action":"opened","issue":{"url":"https://api.github.com/repos/astra-toolbox/astra-toolbox/issues/40","repository_url":"https://api.github.com/repos/astra-toolbox/astra-toolbox","labels_url":"https://api.github.com/repos/astra-toolbox/astra-toolbox/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/astra-toolbox/astra-toolbox/issues/40/comments","events_url":"https://api.github.com/repos/astra-toolbox/astra-toolbox/issues/40/events","html_url":"https://github.com/astra-toolbox/astra-toolbox/issues/40","id":148787984,"number":40,"title":"`parallel3d_vec` projections mysteriously zero","user":{"login":"jacobhinkle","id":1454944,"avatar_url":"https://avatars.githubusercontent.com/u/1454944?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobhinkle","html_url":"https://github.com/jacobhinkle","followers_url":"https://api.github.com/users/jacobhinkle/followers","following_url":"https://api.github.com/users/jacobhinkle/following{/other_user}","gists_url":"https://api.github.com/users/jacobhinkle/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobhinkle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobhinkle/subscriptions","organizations_url":"https://api.github.com/users/jacobhinkle/orgs","repos_url":"https://api.github.com/users/jacobhinkle/repos","events_url":"https://api.github.com/users/jacobhinkle/events{/privacy}","received_events_url":"https://api.github.com/users/jacobhinkle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-15T23:00:48Z","updated_at":"2016-04-15T23:00:48Z","closed_at":null,"body":"Hello,\r\n\r\nFirst, thank you for your work. A project like ASTRA has been sorely needed for a long time now.\r\n\r\nI am having some problems with the `parallel3d_vec` geometry.  Below, I am trying to project a simple volume containing zeros outside a small box of ones.  The geometry I list below should correspond to rotating about the `y` axis as opposed to `z`.\r\n\r\n```python\r\nimport astra\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\n# set up simple example volume\r\nsh = [25,35,45]\r\nvol0 = np.zeros(sh)\r\n# only one little odd-shaped block of ones\r\nvol0[5:15,10:34,5:41] = 1\r\n\r\n# initialize vol_geom\r\nvol_geom = astra.create_vol_geom(sh[1], sh[2], sh[0])\r\n\r\n# initialize proj_geom\r\nshuv = [100, 100]\r\ntheta = np.arange(90)*np.pi/180.0\r\nc = np.cos(theta)\r\ns = np.sin(theta)\r\nv = np.zeros((theta.size,12))\r\nv[:,0] = s\r\nv[:,1] = 0\r\nv[:,2] = c\r\nv[:,3:6] = 0\r\nv[:,6] = c\r\nv[:,7] = 0\r\nv[:,8] = -s\r\nv[:,9] = 0\r\nv[:,10] = 1\r\nv[:,11] = 0\r\nproj_geom = astra.create_proj_geom('parallel3d_vec', shuv[0], shuv[1], v)\r\n\r\n# get a projector id\r\nproj_id = astra.create_projector('cuda3d', proj_geom, vol_geom)\r\n\r\n# project the volume\r\npv_id, pv = astra.create_sino3d_gpu(vol0, proj_geom, vol_geom)\r\n\r\nplt.imshow(np.squeeze(vol0[:,sh[1]//2,:]), cmap='gray', interpolation='nearest')\r\nplt.title('Volume Slice')\r\nplt.figure()\r\nplt.imshow(np.squeeze(np.max(pv[:,:,:], 1)), cmap='gray', interpolation='nearest')\r\nplt.title('MIP of Projections (all zero)')\r\nprint \"Scalar range of pv is {} to {}\".format(np.min(pv), np.max(pv))\r\n\r\n# clean up\r\nastra.data3d.delete(pv_id)\r\nastra.projector.delete(proj_id)\r\n```\r\nWhen I run this code, the projection array `pv` is all zeros.  I also get all zeros if I backproject using this geometry with a non-zero sinogram array.\r\n\r\nSince my detector is still centered at zero, and the `r`, `u`, and `v` vectors are all orthogonal, I am having trouble understanding how it's possible to get a zero projection.  In fact even if I'm screwing up and the ray direction is in the plane of the detector it still would surprise me to have a zero line integral, since the volume is non-zero at the origin.\r\n\r\nThank you for any help you can provide!\r\n-Jacob"}}