Git Product home page Git Product logo

astra-toolbox's Introduction

The ASTRA Toolbox

The ASTRA Toolbox is a MATLAB and Python toolbox of high-performance GPU primitives for 2D and 3D tomography.

We support 2D parallel and fan beam geometries, and 3D parallel and cone beam. All of them have highly flexible source/detector positioning.

A large number of 2D and 3D algorithms are available, including FBP, SIRT, SART, CGLS.

The basic forward and backward projection operations are GPU-accelerated, and directly callable from MATLAB and Python to enable building new algorithms.

Documentation / samples

See the MATLAB and Python code samples in samples/ directory and on http://www.astra-toolbox.com/.

Installation instructions

Windows/Linux, using conda for Python packages

Requirements: conda Python environment, with 64 bit Python 3.7-3.11.

Conda packages for ASTRA Toolbox are available from the astra-toolbox channel, whereas CUDA-related packages can be installed from nvidia channel. To install ASTRA into the desired conda environment, run:

conda install astra-toolbox -c astra-toolbox -c nvidia

We also provide development packages:

conda install astra-toolbox -c astra-toolbox/label/dev -c nvidia

Windows, binary

Add the mex and tools subdirectories to your MATLAB path, or copy the Python astra module to your Python site-packages directory. We require the Microsoft Visual Studio 2015 redistributable package. If this is not already installed on your system, it is included as vc_redist.x64.exe in the ASTRA zip file.

Linux, from source

For MATLAB

Requirements: g++ (7.1 or higher), CUDA (5.5 or higher), MATLAB (R2012a or higher)

cd build/linux
./autogen.sh   # when building a git version
./configure --with-cuda=/usr/local/cuda \
            --with-matlab=/usr/local/MATLAB/R2012a \
            --prefix=$HOME/astra \
            --with-install-type=module
make
make install

Add $HOME/astra/matlab and its subdirectories (tools, mex) to your MATLAB path.

If you want to build the Octave interface instead of the MATLAB interface, specify --enable-octave instead of --with-matlab=.... The Octave files will be installed into $HOME/astra/octave . On some Linux distributions building the Astra Octave interface will require the Octave development package to be installed (e.g., liboctave-dev on Ubuntu).

NB: Each MATLAB version only supports a specific range of g++ versions. Despite this, if you have a newer g++ and if you get errors related to missing GLIBCXX_3.4.xx symbols, it is often possible to work around this requirement by deleting the version of libstdc++ supplied by MATLAB in MATLAB_PATH/bin/glnx86 or MATLAB_PATH/bin/glnxa64 (at your own risk), or setting LD_PRELOAD=/usr/lib64/libstdc++.so.6 (or similar) when starting MATLAB.

For Python

Requirements: g++ (7.1 or higher), CUDA (5.5 or higher), Python (2.7 or 3.x), Cython, six, scipy

cd build/linux
./autogen.sh   # when building a git version
./configure --with-cuda=/usr/local/cuda \
            --with-python \
            --with-install-type=module
make
make install

This will install Astra into your current Python environment.

As a C++ library

Requirements: g++, boost, CUDA (8.0 or higher)

cd build/linux
./autogen.sh   # when building a git version
./configure --with-cuda=/usr/local/cuda
make
make install-dev

This will install the Astra library and C++ headers.

macOS, from source

Use the Homebrew package manager to install boost, libtool, autoconf, automake.

cd build/linux
./autogen.sh
CPPFLAGS="-I/usr/local/include" NVCCFLAGS="-I/usr/local/include" ./configure \
  --with-cuda=/usr/local/cuda \
  --with-matlab=/Applications/MATLAB_R2016b.app \
  --prefix=$HOME/astra \
  --with-install-type=module
make
make install

Windows, from source using Visual Studio 2015

Requirements: Visual Studio 2015 (full or community), boost (recent), CUDA 9.0, MATLAB (R2012a or higher) and/or WinPython 3.x.

Using the Visual Studio IDE:

Set the environment variable MATLAB_ROOT to your MATLAB install location. Copy boost headers to lib\include\boost, and boost libraries to lib\x64. Open astra_vc14.sln in Visual Studio. Select the appropriate solution configuration (typically Release_CUDA|x64). Build the solution. Install by copying AstraCuda64.dll and all .mexw64 files from bin\x64\Release_CUDA and the entire matlab/tools directory to a directory to be added to your MATLAB path.

Using .bat scripts in build\msvc:

Edit build_env.bat and set up the correct directories. Run build_setup.bat to automatically copy the boost headers and libraries. For MATLAB: Run build_matlab.bat. The .dll and .mexw64 files will be in bin\x64\Release_Cuda. For Python 3.9: Run build_python39.bat. Astra will be directly installed into site-packages.

Testing your installation

To perform a (very) basic test of your ASTRA installation in Python, you can run the following Python command.

import astra
astra.test()

To test your ASTRA installation in MATLAB, the equivalent command is:

astra_test

References

If you use the ASTRA Toolbox for your research, we would appreciate it if you would refer to the following papers:

W. van Aarle, W. J. Palenstijn, J. Cant, E. Janssens, F. Bleichrodt, A. Dabravolski, J. De Beenhouwer, K. J. Batenburg, and J. Sijbers, “Fast and Flexible X-ray Tomography Using the ASTRA Toolbox”, Optics Express, 24(22), 25129-25147, (2016), http://dx.doi.org/10.1364/OE.24.025129

W. van Aarle, W. J. Palenstijn, J. De Beenhouwer, T. Altantzis, S. Bals, K. J. Batenburg, and J. Sijbers, “The ASTRA Toolbox: A platform for advanced algorithm development in electron tomography”, Ultramicroscopy, 157, 35–47, (2015), http://dx.doi.org/10.1016/j.ultramic.2015.05.002

Additionally, if you use parallel beam GPU code, we would appreciate it if you would refer to the following paper:

W. J. Palenstijn, K J. Batenburg, and J. Sijbers, "Performance improvements for iterative electron tomography reconstruction using graphics processing units (GPUs)", Journal of Structural Biology, vol. 176, issue 2, pp. 250-253, 2011, http://dx.doi.org/10.1016/j.jsb.2011.07.017

License

The ASTRA Toolbox is open source under the GPLv3 license.

Contact

email: [email protected] website: http://www.astra-toolbox.com/

Copyright: 2010-2021, imec Vision Lab, University of Antwerp 2014-2021, CWI, Amsterdam http://visielab.uantwerpen.be/ and http://www.cwi.nl/

astra-toolbox's People

Contributors

a-detiste avatar adler-j avatar ahendriksen avatar askorikov avatar brookst avatar buzmakov avatar carterbox avatar codeling avatar dmpelt avatar eureka3 avatar fsherry avatar jbedorf avatar joergkappes avatar lxop avatar obi-wan avatar rendersjens avatar swelborn avatar valeriysokolov avatar vincentvn avatar wjp avatar wvaarle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

astra-toolbox's Issues

Mismatch between cuda and cpu forward/backward projections

This may not be the place to ask this and I am sorry if that is the case. I am trying to use astra to calculate forward and backward projections efficiently - however I seem to be seeing a large difference in the sinogram and backprojection operations for the same geometry when using the cuda rather than the cpu backend.

The following is the code I am running;

vol_geom = astra.create_vol_geom(256,256, -1,1,-1,1)
proj_geom = astra.create_proj_geom('parallel', 0.009, 256, np.linspace(0,np.pi,180,False))

#create cuda projector using vol and proj geom
proj_id = astra.create_projector('cuda',proj_geom,vol_geom)

cuda_sino_id,cuda_sino = astra.create_sino(P, proj_id)
cuda_backproject_id,cuda_backproject = astra.create_backprojection(cuda_sino,proj_id)

#create cpu projector using vol and proj geom
proj_id = astra.create_projector('line',proj_geom,vol_geom)

sino_id,sino = astra.create_sino(P, proj_id)
backproject_id,backproject = astra.create_backprojection(sino,proj_id)

if I look at plots of the sinogram and backprojections they differ by what appears to be a large scaling factor - my assumption is that the two should be approximately equal just that cuda should be more efficient?!

These are the plots I get;

cudavscpu

The cuda sinogram seems to have values of around 100x smaller than the cpu version and the backprojection around 1000x larger.

I am probably making a rookie mistake somewhere - any help would be appreciated!!

Code not compiling

I tried pulling the latest code from git and trying to compile. I get the following error.

g++ -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -I/usr/local/cuda/include -DASTRA_CUDA -DASTRA_PYTHON -I/usr/include/python2.7 -I../include -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c /home/usv/code/astra-toolbox/python/astra/algorithm_c.cpp -o /home/usv/code/astra-toolbox/build/linux/python/build/temp.linux-x86_64-2.7/home/usv/code/astra-toolbox/python/astra/algorithm_c.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
/home/usv/code/astra-toolbox/python/astra/algorithm_c.cpp: In function ‘PyObject* __pyx_pf_5astra_11algorithm_c_4get_res_norm(PyObject*, PyObject*)’:
/home/usv/code/astra-toolbox/python/astra/algorithm_c.cpp:1620:28: error: expected type-specifier before ‘CReconstructionAlgorithm2D’
__pyx_t_2 = dynamic_cast<CReconstructionAlgorithm2D*>(__pyx_v_alg); if (unlikely(__pyx_t_2 == NULL)) __PYX_ERR(0, 84, __pyx_L1_error)
^
/home/usv/code/astra-toolbox/python/astra/algorithm_c.cpp:1620:28: error: expected ‘>’ before ‘CReconstructionAlgorithm2D’
/home/usv/code/astra-toolbox/python/astra/algorithm_c.cpp:1620:28: error: expected ‘(’ before ‘CReconstructionAlgorithm2D’
/home/usv/code/astra-toolbox/python/astra/algorithm_c.cpp:1620:28: error: ‘CReconstructionAlgorithm2D’ was not declared in this scope

The machines I tried were Ubuntu machine with gcc 4.8.4.

GNU Octave bindings

I have an experimental patch at 0813055 that will build .oct files if configure finds the 'octave-config' program. In the current form, it needs you to manually create a symlink octave -> matlab in the astra-toolbox root.

I am not sure we want to support building both Octave and Matlab bindings at the same time. Otherwise we can just re-use the matlab rules and just change some make variables when building the octave variant. What do you think?

Other filters than Ram-Lak in FDK_CUDA

It is not clear from the online documentation of FDK_CUDA which filter is used, but line 233 of fdk.cu indicates it is Ram-Lak applied to each detector line. In FBP_CUDA it is possible to specify other filters. Are there any plans to introduce this also in FDK_CUDA? That would be quite useful!

`parallel3d_vec` projections mysteriously zero

Hello,

First, thank you for your work. A project like ASTRA has been sorely needed for a long time now.

I 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.

import astra
import numpy as np
import matplotlib.pyplot as plt

# set up simple example volume
sh = [25,35,45]
vol0 = np.zeros(sh)
# only one little odd-shaped block of ones
vol0[5:15,10:34,5:41] = 1

# initialize vol_geom
vol_geom = astra.create_vol_geom(sh[1], sh[2], sh[0])

# initialize proj_geom
shuv = [100, 100]
theta = np.arange(90)*np.pi/180.0
c = np.cos(theta)
s = np.sin(theta)
v = np.zeros((theta.size,12))
v[:,0] = s
v[:,1] = 0
v[:,2] = c
v[:,3:6] = 0
v[:,6] = c
v[:,7] = 0
v[:,8] = -s
v[:,9] = 0
v[:,10] = 1
v[:,11] = 0
proj_geom = astra.create_proj_geom('parallel3d_vec', shuv[0], shuv[1], v)

# get a projector id
proj_id = astra.create_projector('cuda3d', proj_geom, vol_geom)

# project the volume
pv_id, pv = astra.create_sino3d_gpu(vol0, proj_geom, vol_geom)

plt.imshow(np.squeeze(vol0[:,sh[1]//2,:]), cmap='gray', interpolation='nearest')
plt.title('Volume Slice')
plt.figure()
plt.imshow(np.squeeze(np.max(pv[:,:,:], 1)), cmap='gray', interpolation='nearest')
plt.title('MIP of Projections (all zero)')
print "Scalar range of pv is {} to {}".format(np.min(pv), np.max(pv))

# clean up
astra.data3d.delete(pv_id)
astra.projector.delete(proj_id)

When 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.

Since 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.

Thank you for any help you can provide!
-Jacob

DART algorithm on single-precision level

Hi all,

I'm relatively new to working with the ASTRA-toolbox so please excuse the occasional (or over-all) lack of expertise. I'm using ASTRA 1.7.1 via Matlab 2016a.

Is there a way to perform algorithm calculations (DART is of major interest at the moment) on single-precision level?

Thanks in advance!

Python sample s016_plots.py crashes

Python example s016_plots.py from git repository crashes on runing. (Linux Ubuntu 12.04 x64, python 2.7.9)

➜  python git:(master) ✗ python s016_plots.py                          
Traceback (most recent call last):
  File "s016_plots.py", line 39, in <module>
    sinogram_id, sinogram = astra.create_sino(P, proj_id,useCUDA=True)
TypeError: create_sino() got an unexpected keyword argument 'useCUDA'

Batched forward/backward projections

In some applications, it is of interest to perform several independed projections. E.g. 1000 fan beam projections, all on different data.

This is ofc doable by simply calling the respective astra function 1000 times, but one would expect a noticeable speedup by doing this as one large batched job.

Is this something you guys would be interested in adding? I guess the 2d case is where the gain is the most significant.

Conda package with numpy 1.12

When installing astra, numpy 1.11 is currently a requirement, but 1.12 has been out for a while. It would be nice if you provided conda packages for 1.12 as well.

MPI: overflow when initializing large object with (local) array

  File "astra/data3d_c.pyx", line 187, in astra.data3d_c.create (astra/data3d_c.cpp:4000)
  File "astra/data3d_c.pyx", line 424, in astra.data3d_c.fillDataObject (astra/data3d_c.cpp:7317)
  File "MPI/Comm.pyx", line 1175, in mpi4py.MPI.Comm.send (src/mpi4py.MPI.c:106424)
  File "MPI/msgpickle.pxi", line 210, in mpi4py.MPI.PyMPI_send (src/mpi4py.MPI.c:42085)
  File "MPI/msgpickle.pxi", line 112, in mpi4py.MPI.Pickle.dump (src/mpi4py.MPI.c:40704)
OverflowError: cannot serialize a bytes object larger than 4 GiB

This exception is triggered when sending an object larger than 4 GB, but in fact sending an object larger than 2GB already seems to trigger an overflow bug in mpi4py,

ImportError after conda install

After installing astra via:

conda install -c astra-toolbox astra-toolbox=1.8

I try importing astra and it fails

>>> import astra
Traceback (most recent call last):

  File "<ipython-input-1-dd583ecd89eb>", line 1, in <module>
    import astra

  File "c:\anaconda\lib\site-packages\astra\__init__.py", line 26, in <module>
    from . import matlab as m

  File "c:\anaconda\lib\site-packages\astra\matlab.py", line 38, in <module>
    from . import astra_c

ImportError: DLL load failed: The specified procedure could not be found.

It seems you are missing a DLL in the release. At the very least you should mention somewhere what else I need installed to run astra.

Invalid MEX-file errors - undefined symbol

Hi there,

I'm running the latest github version of astra-toolbox (as of 2/8/16 3:00 PM EST) on 64-bit Ubuntu 15.10, with CUDA 7.5 and MATLAB 2015b. After setting up MATLAB to use gcc-4.7 and g++-4.7, I configured ASTRA using "./configure --with-cuda=/usr/local/cuda --with-matlab=/usr/local/MATLAB/R2015b --prefix=/usr/local/astra", then made and installed using the usual make, make install.

That all worked successfully, but now when I'm running some tests of my MATLAB code, I get the following errors:

Invalid MEX-file '/usr/local/astra/matlab/mex/astra_mex_projector_c.mexa64': /usr/local/astra/matlab/mex/astra_mex_projector_c.mexa64: undefined symbol: _ZN5astra16CCudaProjector2D4typeB5cxx11E

Invalid MEX-file '/usr/local/astra/matlab/mex/astra_mex_data2d_c.mexa64': /usr/local/astra/matlab/mex/astra_mex_data2d_c.mexa64: undefined symbol: _ZN5astra17running_in_matlabE

Googling the problem was no help, I tried 'make clean' -> 'make distclean' -> ./autogen.sh etc etc, but the errors persisted. Same if I deleted the cloned astra-toolbox directory, deleted /usr/local/astra, then re-cloned astra-toolbox and installed again. Any thoughts?

Thank you,
Matt

Can OpTomo scale forward and back projections?

Dear all,
Sorry for asking something so trivial, but I was wondering how does one achieve to get same voxel value range for original and reconstructed/back projected volume when using OpTomo in python?

For instance, if I use a test volume with constant voxel values of 1 to create N_ang = 30 projections, and back project them to a volume, the voxel values increase ~ 1e3, c.f.

import astra
import numpy as np

vx, vy, vz = 50, 50, 50
N = 50
N_ang = 30
det_x, det_y = 1, 1

# configure geometry
angles = np.deg2rad(np.linspace(-90, 90, N_ang))
proj_geom = astra.create_proj_geom('parallel3d', det_x, det_y, N, N, angles)
vol_geom = astra.create_vol_geom(vy, vx, vz)

# projector
proj_id = astra.create_projector('cuda3d', proj_geom, vol_geom)
W = astra.OpTomo(proj_id)

# test volume
v1 = np.ones([vx, vy, vz])

# simulate projections
fp = W*v1

# back projections
bp = W.T*fp

# print min, max and mean of voxel values of original and back projected volume
print "\n%10.2f %10.2f %10.2f" % (np.min(v1), np.max(v1), np.mean(v1))
print "%10.2f %10.2f %10.2f" % (np.min(bp), np.max(bp), np.mean(bp))

which gives

      1.00       1.00       1.00
    882.67    1676.65    1397.81

Naturally the values increase as function of number of projections and volume dimensions, but is there some built-in option in OpTomo to get the same scaling?

The reasons I'm asking in the first place is, that I'm testing some gradient projection methods, and the different scaling causes some issues.

My best,
- J.

Oscillating behavior with CPU FBP algorithms and large detectors

When using CPU FBP algorithms with a detector larger than 2048 pixels, oscillations appear in the reconstruction. The following images are line profiles of FBP reconstructions of only two projections of a square, from different numbers of pixels for the detector (code is shown at the bottom of this post):

2048
2048
2049
2049
8192
8192

It is clear that the oscillations suddenly appear at 2049 pixels, and increase in severity for even larger detectors. For a reconstruction of a circle with 1024 projections with a detector of 2049 pixels, the following is the result:

rec

Since the problems do not seem to be related to the specific chosen CPU projection kernel, I think it could be related to the filtering step. Does the CPU filtering code use a hardcoded limit of 2048 elements somewhere?

Code to reproduce problem:

import numpy as np
import pylab as pl
import astra

nd = 2049

pg = astra.create_proj_geom('parallel',1,nd,np.linspace(0,np.pi,2,False))
vg = astra.create_vol_geom(nd)
pid = astra.create_projector('strip',pg,vg)
w = astra.OpTomo(pid)

x = np.zeros(w.vshape)
x[nd//4:3*nd//4,nd//4:3*nd//4]=1
s = w*x

rec = w.reconstruct('FBP',s)

pl.plot(rec[nd//2])
pl.show()

Building astra in Mac OS X

Hi,

I tried building astra in Mac OS X, but it fails with:

 linux git:(master) make
cd ../../python; CPPFLAGS=" -I../.. -I../../include -I../../lib/include -stdlib=libstdc++ -mmacosx-version-min=10.6 -DASTRA_PYTHON -I/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/include/python2.7  -I../include" LDFLAGS=" -g -L/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib  -L../build/linux/.libs" python builder.py install \
    --install-base=./finalbuild --install-headers=./finalbuild --install-purelib=./finalbuild \
    --install-platlib=./finalbuild --install-scripts=./finalbuild --install-data=./finalbuild
running install
error: must supply either prefix/exec-prefix/home or install-base/install-platbase -- not both
make: *** [py] Error 1

I tried removing the prefix and exec-prefix variables from the Makefile with no luck.

Do you have any ideas on this issue?

parallel 3d projector gives zero result

Creating a parallel3d_vec geometry with rayX = 0 causes a "empty" zero output. I think it has something to do with the block direction logic inside par3d_fp.

Edit: it may be more complicated than this, however the following vectors all reproduce the result:

[ 0.          0.          1.          0.          0.          0.          0.     0.10752688  0.          0.10752688  0.          0.        ]
[ 0.          0.9839519  -0.17843389  0.          0.          0.          0.    -0.01918644 -0.10580128  0.10752688  0.          0.        ]
[ 0.          0.34293367  0.93935962  0.          0.          0.          0.     0.10100641 -0.03687459  0.10752688  0.          0.        ]
[ 0.         -0.85864109  0.51257729  0.          0.          0.          0.     0.05511584  0.092327    0.10752688  0.          0.        ]

Further examples:

This vector causes the bug:

[ 0.0099995   0.          0.99995     0.          0.          0.          0.  0.10752151  0.          0.10752688  0.          0.        ]

but this one does not:

[ 0.009999    0.009999    0.99990001  0.          0.          0.          0.  0.10751613 -0.00107516  0.10752688  0.          0.        ]

Astra with Julia

I would like to start doing some work using Julia with Astra. Although it may be possible to use functions from astra via julia's PyCall library, I think it would be more useful to use julia's CUDA libraries to call the .cu files directly. Can anyone give me some pointers to the places in the source that I should be looking in order to just initially implement a forward projection operator?

Also is this something that may be useful more widely?

Expose 1/r^2 weighted ray transform

This would allow external implementation of algorithms like FBP, I was told (in person) that there already exists a backend for this, so exposing it should perhaps be doable via a flag?

Windows installer on conda

You already have a quite simple windows installer, but it would be nice to be able to download astra with conda, which is kindoff the "standard" way of installing compiled libraries on windows with python.

Since you already have an account at conda, I suppose it wouldn't be very complicated to add windows binaries as well.

Cannot get version of astra in python

Most packages provide __version__, obtained from setup():

>>> import odl; odl.__version__
'0.4.0'
>>> import numpy; numpy.__version__
'1.10.2'
>>> import pytest; pytest.__version__
'3.0.0'

etc.

Astra however does not.

>>> import astra; astra.__version__
AttributeError: 'module' object has no attribute '__version__'

This would be a great addition since it would allow checking if some functionality is currently available or not.

Disclaimer: This may have been added since my last install of ASTRA.

Building Astra on MAC OS X with CUDA and Conda

Hello all,

I am trying to build the current version in my conda env using osx10.11.

First bug, in this current cuda implementation there are no more lib64 folder in /usr/local/cuda. I have managed to install with a cp lib/* lib64 (mimicating the lib64 on normal linux machines).

I have modified the build.sh on libastra so it does not fail.

cp -P $CUDA_ROOT/$LIBPATH/libcudart.* $PREFIX/lib
cp -P $CUDA_ROOT/$LIBPATH/libcufft.* $PREFIX/lib

Then i was able to build libastra and astra-toolbox. But in the first test i have the following message.

===== testing package: astra-toolbox-1.8b-py27_0 =====
import: u'astra'
Traceback (most recent call last):
  File "/Users/vescovi/anaconda/conda-bld/test-tmp_dir/run_test.py", line 25, in <module>
    import astra
  File "/Users/vescovi/anaconda/envs/_test/lib/python2.7/site-packages/astra/__init__.py", line 26, in <module>
    from . import matlab as m
  File "/Users/vescovi/anaconda/envs/_test/lib/python2.7/site-packages/astra/matlab.py", line 38, in <module>
    from . import astra_c
ImportError: dlopen(/Users/vescovi/anaconda/envs/_test/lib/python2.7/site-packages/astra/astra_c.so, 2): Library not loaded: /usr/local/lib/libastra.0.dylib
  Referenced from: /Users/vescovi/anaconda/envs/_test/lib/python2.7/site-packages/astra/astra_c.so
  Reason: image not found
TESTS FAILED: astra-toolbox-1.8b-py27_0

There are something wrong with the libraries bindings because i had to manually copy libastra.0.dylib to /usr/local/lib/. After that i moved to the following error.

>>> import astra
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "astra/__init__.py", line 26, in <module>
    from . import matlab as m
  File "astra/matlab.py", line 38, in <module>
    from . import astra_c
ImportError: dlopen(astra/astra_c.so, 2): Symbol not found: __ZN5astra25CCompositeGeometryManager18setGlobalGPUParamsERKNS_10SGPUParamsE
  Referenced from: astra/astra_c.so
  Expected in: /usr/local/lib/libastra.0.dylib
 in astra/astra_c.so

I am probably doing something wrong since it was not really straight forward to install the conda recipes.

Thanks,
Rafael

Astra in python package index

Adding astra to Python Package Index (PyPI) would allow users to install ASTRA by simply writing:

pip install astra-tomography

Sadly, there is a package named astra in PyPI already, but adding astra as astra-tomography would still be nice.

The main steps you need to do in order to enable this is:

  • Create an astra account on PyPI (simple and free)
  • Write a setup.py file that fully performs the build rutine of astra, perhaps by calling other files.

I feel that by doing this you would significantly widen the user base of ASTRA by allowing more "simple" users to simply download astra in one command and instantly get started!

Astra python interface crashes with boost exception

I try to process my sinogram using ASTRA.
If I reconstruct only 1 sinogram all works fine.
But if I try reconstruct some slices in the loop (see code below) astra crashes with error message
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >' what(): bad lexical cast: source type value could not be interpreted as target
Sometimes it crashes and sometime all work fine with the same script. This is an example of several simultaneous runs of one script.

➜  python astra_tomo2D_test.py
0.00166797637939
0.00754308700562
0.25839304924
➜  python astra_tomo2D_test.py
0.00157809257507
0.00757193565369
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >'
  what():  bad lexical cast: source type value could not be interpreted as target
➜ python astra_tomo2D_test.py
0.001620054245
0.00748801231384
0.258258104324

This as my python script

# coding: utf-8

import astra
import numpy as np
import time


def tomo2d(sinogram, angles):
    detector_size = sinogram.shape[1]

    rec_size = detector_size
    vol_geom = astra.create_vol_geom(rec_size, rec_size)
    proj_geom = astra.create_proj_geom('parallel', 1.0, detector_size, angles)

    sinogram_id = astra.data2d.create('-sino', proj_geom, data=sinogram)
    # Create a data object for the reconstruction
    rec_id = astra.data2d.create('-vol', vol_geom)

    # Set up the parameters for a reconstruction algorithm using the GPU
    cfg = astra.astra_dict('SART_CUDA')
    cfg['ReconstructionDataId'] = rec_id
    cfg['ProjectionDataId'] = sinogram_id
    cfg['option'] = {}
    cfg['option']['MinConstraint'] = 0
    # cfg['option']['MaxConstraint'] = 5

    # Available algorithms:
    # SIRT_CUDA, SART_CUDA, EM_CUDA, FBP_CUDA (see the FBP sample)

    # Create the algorithm object from the configuration structure
    alg_id = astra.algorithm.create(cfg)

    # Run 150 iterations of the algorithm
    astra.algorithm.run(alg_id, 150)

    # Get the result
    rec = astra.data2d.get(rec_id)

    # Clean up. Note that GPU memory is tied up in the algorithm object,
    # and main RAM in the data objects.
    astra.algorithm.delete(alg_id)
    astra.data2d.delete(rec_id)
    astra.data2d.delete(sinogram_id)

    return rec

if __name__ == '__main__':
    t = time.time()
    data = np.load('tomo2d.npz')
    print time.time() - t
    sinogram2 = data['sinogram']
    angles = data['angles']

    detector_size = sinogram2.shape[0]
    res = np.zeros(shape=(detector_size, detector_size), dtype='float32')
    print time.time() - t
    for i in range(10): # works fine for only 1 iteration !!!!
        res = tomo2d(sinogram2, angles)

    print time.time() - t

Data file used for this example can be found here

https://dl.dropboxusercontent.com/u/1592306/tomo2d.npz

I'm using ASTRA from git. Linux Ubuntu 12.04 x64 and 14.04 x64, python 2.7.9
Tested on GPUs NVIDIA GeForce GTX 660M and GTX 580 (CUDA versions 5.5 and 6.5)

Could you help me to fix this issue?
Thank you in advance.

Problem installing Astra Toolbox in Ubuntu

Hi,

I am trying to get the astra toolbox working with python 2.7 in Ubuntu 14.04.
When I execute "make" in /build/linux I get the following error:

/usr/local/cuda/bin/nvcc -gencode=arch=compute_20,code=sm_20 -gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_50,code=compute_50 -I/usr/local/cuda/include -I../.. -I../../include -DASTRA_CUDA -Iusr/inlcude/mpi -std=c++11 -DUSE_MPI=1 -c ../../cuda/3d/cgls3d.cu -o cuda/3d/cgls3d.o
../../cuda/3d/cgls3d.cu:41:17: fatal error: mpi.h: No such file or directory
#include "mpi.h"
^
compilation terminated.
make: *** [cuda/3d/cgls3d.lo] Error 1

I am also attaching the output of ./configure

By the way, the said "mpi.h" is found in /usr/lib/openmpi/include.

Any ideas on how can I get this working? What am I doing wrong?

Thank you.

PAUconfigure.txt

Import errors in python3

Importing astra in python3 results in the following error message:

jmoosmann@moosmann:/usr/bin$ python3
Python 3.4.3 (default, Oct 14 2015, 20:28:29) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import astra
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/astra/python/astra/__init__.py", line 26, in <module>
    from . import matlab as m
  File "/usr/local/astra/python/astra/matlab.py", line 38, in <module>
    from . import astra_c
ImportError: /usr/local/astra/python/astra/astra_c.so: undefined symbol: _Py_ZeroStruct

This import error is resolved by exporting LD_PRELOAD as:

export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libpython2.7.so

However, then following import error occurs:

jmoosmann@moosmann:~$ python3
Python 3.4.3 (default, Oct 14 2015, 20:28:29) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import astra
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/astra/python/astra/__init__.py", line 26, in <module>
    from . import matlab as m
  File "/usr/local/astra/python/astra/matlab.py", line 38, in <module>
    from . import astra_c
ImportError: dynamic module does not define init function (PyInit_astra_c)

The second import error is also reproduced on another Linux distribution

Different filters in FBP on CPU?

Is it possible to use different filters than the default Ram-Lak in the CPU version of FBP?

For the GPU-version this is achieved by setting FilterType, but the documentation does not say that that is possible in the CPU-version, and running the code below (modified from s014_FBP.m for CPU, change to fanflat geometry and add noise) yields identical results no matter what FilterType is set to. But since the documentation also only says the CPU FBP should work for parallel geometry, but seems to work fine for fanflat as well, I wondered if different filters would somehow be possible as well. Astra version 1.7.1 on linux.

vol_geom = astra_create_vol_geom(256, 256);
proj_geom = astra_create_proj_geom('fanflat', 1.0, 384, linspace2(0,2*pi,360),1000,0);

proj_id = astra_create_projector('line_fanflat',proj_geom,vol_geom);

% As before, create a sinogram from a phantom
P = phantom(256);
[sinogram_id, sinogram] = astra_create_sino_gpu(P, proj_geom, vol_geom);

% Add some noise
astra_add_noise_to_sino(sinogram_id,1e4);

% Create a data object for the reconstruction
rec_id = astra_mex_data2d('create', '-vol', vol_geom);

% create configuration 
cfg = astra_struct('FBP');
cfg.ReconstructionDataId = rec_id;
cfg.ProjectionDataId = sinogram_id;
cfg.ProjectorId = proj_id;
cfg.FilterType = 'Hann';

% possible values for FilterType:
% none, ram-lak, shepp-logan, cosine, hamming, hann, tukey, lanczos,
% triangular, gaussian, barlett-hann, blackman, nuttall, blackman-harris,
% blackman-nuttall, flat-top, kaiser, parzen


% Create and run the algorithm object from the configuration structure
alg_id = astra_mex_algorithm('create', cfg);
astra_mex_algorithm('run', alg_id);

% Get the result
rec = astra_mex_data2d('get', rec_id);
figure(3); imshow(rec, []);

% Clean up. Note that GPU memory is tied up in the algorithm object,
% and main RAM in the data objects.
astra_mex_algorithm('delete', alg_id);
astra_mex_data2d('delete', rec_id);
astra_mex_data2d('delete', sinogram_id);

Missing XMLNode addOption

When installing astra and having everything set up, I get the following error when running import astra

ImportError: astra/utils.so: undefined symbol: _ZN5astra7XMLNode9addOptionENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_

demangling this we get

astra::XMLNode::addOption(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

or more simply

astra::XMLNode::addOption(std::string, std::string)

EDIT:

checking utils.so with nm we find:

U _ZN5astra7XMLNode9addOptionENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_

so it is not defined in that file, in libastra.so a similar function is defined

T _ZN5astra7XMLNode9addOptionESsSs
astra::XMLNode::addOption(std::string, std::string)

but this is not the same. It would seem that parts of the library is built with c++11 support, and some parts are not.

Crash when using large data sets

Currently if you give data sets sufficiently large, astra crashes with messages such as

Error: CUDA error 11: invalid argument.
Error: Failed to allocate 300x5000x20 GPU array
Error: CUDA error 11: invalid argument.
Assertion failed: err == cudaSuccess, file c:/Users/wpalenst/git/astra-toolbox/cuda/3d/util3d.cu, line 382

is there any workaround to this available?

Edit:
On my machine, with a 980 TI card, the limit seems to be 4096 in any direction.

Medium-large data sets on Windows cause unexpected error

When trying to do FDK reconstruction using ASTRA 1.7.1beta on Windows 8 and 10 (installed by unzipping astra-1.7.1beta-matlab-win-x64.zip) I am getting an unexpected error at data sizes that should fit in GPU memory (12 GB, for example volume 700^3, 1120 projections size 700x700, but other cases as well). I have successfully run the same on a linux machine with ASTRA 1.7.1beta compiled from astra-1.7.1beta.tar.bz2 with same size GPU memory. But on Windows I get the error:
fejl1
and clicking Retry yields the errors
Error: Failed to force completion of cuda kernels: 30: unknown error.
Error: Failed to force completion of cuda kernels: 30: unknown error.
Error: CUDA error 30: unknown error.

On the other hand, when trying to use a clearly too large data set, a different - and expected - error results:
fejl2
with messages
Error: CUDA error 2: out of memory.
Error: Failed to allocate 1650x1650x1650 GPU buffer.

Have you seen similar before and know if anything can be done about it? Thanks.

Build error on Debian

Trying to build either 1.7.1beta or the latest git sources on Debian 8 (using either the system default Boost or v1.60.0 downloaded separately), the build stopped with the following error:

/usr/include/boost/assert.hpp:102:47: error: ‘noinline’ was not declared in this scope
           BOOST_NOINLINE void assertion_failed_msg(CharT const * expr, char const * msg, char const * function,
                                               ^
Makefile:290: recipe for target 'cuda/3d/mem3d.lo' failed
make: *** [cuda/3d/mem3d.lo] Error 1

I found that a workaround to enable the build to complete is to add -DBOOST_NOINLINE='__attribute__ ((noinline))' to the definition of NVCCFLAGS in the Makefile at line 41, but I do not know if this is likely to cause any other issues.

Parallel 2d vector geometry

You currently have vec style geometries for 2d fan beam, 3d parallel and 3d cone beam. However, you do not have it for 2d parallel beam.

While it is easy to emulate, it would be nice to have for purposes of symmetry.

Projection and backprojection with squared weights

Typically in tomography, projection and backprojection are computed, i.e. sum_j a_ij I_j and sum_i a_ij s_i and astra provides a nice implementation of these for the various geometries. Most algorithms only require FP and BP, but methods that approximate the Hessian of the cost function typically require the operator {a_ij^2} and its adjoint; for example ICD [1, Eq. 11] and Fessler&Booth's preconditioned gradient descent [2].

Currently, I only need these operators for 2D and 3D parallel beam geometry. I'm unsure how to implement such a thing when using texture memory, since in that case we don't have the interpolation weights, otherwise I'd be happy to contribute some code. I'm interested to hear if you guys have run into this before and if so what kind of approaches are available.

Thanks a lot

[1] Yu et al. 2011.
[2] Fessler & Booth 1998.

ValueError: Attempted relative import in non-package with Python examples

If I open an example from the Python samples (using PyCharm on Windows), and add the python/astra folder as content root (to make 'import astra' work), I get the following error:

C:\Python27\python.exe C:/astra-toolbox/samples/python/s001_sinogram_par2d.py
Traceback (most recent call last):
File "C:/astra-toolbox/samples/python/s001_sinogram_par2d.py", line 27, in
import astra
File "C:\astra-toolbox\python\astra\astra.py", line 27, in
from . import astra_c as a
ValueError: Attempted relative import in non-package
Process finished with exit code 1

Any suggestions on how to prevent this from occuring?

nvcc check does not pass

We use nvcc version 5.5.0 .
The configure check does not recognise that nvcc is working. From config.log:

configure:15205: checking if nvcc works
configure:15217: /usr/bin/nvcc -c -o conftest.o conftest.cu 
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct null not valid
Aborted
configure:15221: $? = 134
configure: failed program was:
| #include <iostream>
| int main() {
|   std::cout << "Test" << std::endl;
|   return 0;
| }
configure:15247: result: no

When compiling the test code as a .cpp file (nvcc conftest.cpp), it works fine, however, make will not work.

Astra with OpTomo using Python for 3D datasets

Dear All,

I am trying to use Astra with OpTomo operators to deal with 3D datasets using the Python back-end (v1.7.1beta). However, I am currently facing what might be a trivial problem, but I could not find a solution towards a correct behavior.

I am starting with the following typical cone-beam code :

import astra
import numpy as np
angles = np.linspace(0,2*np.pi,360)
proj_geom = astra.create_proj_geom('cone', 1.0, 1.0,50,50, angles,1,0)
vol_geom = astra.create_vol_geom((128,128,128))

And then I would like to recover the OpTomo operator W. But I could not find a way to define the proj_id from the previous piece of code.

W = astra.OpTomo(proj_id)
fp = W*image
bp = W.T*sinogram

I tried the astra.create_sino3d_gpu function but failed with a 'Algorithm not initialized' error.
I also tried the astra.creators.projector3d.create function but could not find what to include in the configuration structure. The astra.create_projector() sounds to be only for 2D geometries. And the matlab-like initialization "W = astra.opTomo('cuda', proj_geom, vol_geom);" does not seem to have a corresponding python implementation.

Any help would be very appreciated.

Installing ASTRA on Linux

Hello,
I try to install Astra on one of the LINUX HPC Clusters of my universitiy.

Since I don't have sudo rights and the directories for BOOST, CUDA, PYTHON are located rather arbitrarily over the system, I struggle compiling the libraries using the configure script. Especially linking to the BOOST libraries and libs.

Boost is installed here: setenv  BOOST_ROOT      /apps/boost/1.54.0-sysgcc
Cuda is installed here: setenv  CUDA_HOME       /apps/CUDA/5.0/cuda
Python is installed here: /usr/bin/python
GCC is installed here:   /apps/gcc/gcc-4.8.1-x86_64/

Running the configure script with the following input doesn't work:

./configure --with-cuda --with-python --prefix=/home/astra-toolbox/bin

I receive following error message:

checking for boost-unit-test-framework... no
checking boost/any.hpp usability... no
checking boost/any.hpp presence... no
checking for boost/any.hpp... no
checking boost/static_assert.hpp usability... no
checking boost/static_assert.hpp presence... no
checking for boost/static_assert.hpp... no
checking boost/throw_exception.hpp usability... no
checking boost/throw_exception.hpp presence... no
checking for boost/throw_exception.hpp... no
configure: error: boost not found

Do you have any idea how my .configure needs to look like to make it work?

Best,
Florian

Evaluate nvcc code generation options

We currently generate cubin for a subset of archictectures, and ptx for the latest architecture.

This may or may not be problematic for architectures which fall in between the architectures we build cubin for.

Specify CUDA host compiler during build

My problem is that I installed Fedora on my machine, where GCC 5.x is the standard since quite a while. Unfortunately, CUDA won't cooperate with it, and I have no idea of their plans to make it compatible.

Therefore, it would be nice if one could specify the compiler that should be used by nvcc as host compiler. The environment variable CC is happily ignored, so that doesn't help. However, nvcc takes an option --compiler-bindir where the location of a host compiler different from the default one can be specified. I guess that's how CMake solves this issue, there one can define a variable CUDA_HOST_COMPILER to work around this issue.

Would be cool if there was a config option like --cuda-host-compiler-bindir which would simply redefine $NVCC as $NVCC --compiler-bindir <bindir>. Way better than my current hacky solution to replace /usr/local/cuda/bin/nvcc by a script injecting that option with hard-coded path into the call to the real nvcc.

Problems with non GPU build of Astra in Ubuntu VM

Hi,

Sorry about this but I am having issues with getting my build up and running in ubuntu. I currently am using the following commands to get things going

>>> git clone https://github.com/astra-toolbox/astra-toolbox.git
>>> cd astra-toolbox/build/linux
>>> ./autogen.sh 
>>> ./configure --with-python --prefix=/home/mark/opt/astra
>>> make -j4

But I get the following error:

astra/astra_c.cpp: In function ‘PyObject* __pyx_pf_5astra_7astra_c_8set_gpu_index(PyObject*, PyObject*, PyObject*)’:
astra/astra_c.cpp:1173:3: error: ‘SGPUParams’ is not a member of ‘astra’
   astra::SGPUParams __pyx_v_params;
   ^

I also had a look at using the download of the stable release, 1.7.1, but when I build that, I get the error :

astra/experimental.cpp: In function ‘PyObject* __pyx_pf_5astra_12experimental_do_composite(PyObject*, PyObject*, PyObject*, PyObject*, PyObject*)’:
astra/experimental.cpp:884:3: error: ‘CCompositeGeometryManager’ is not a member of ‘astra’
   astra::CCompositeGeometryManager __pyx_v_m;
   ^

which seems to be the fixed problem #21

Any help would be really appreciated :)

Mark

Build of experimental.pyx fails when CUDA is disabled

I get the following compile error in the Cython part:

gcc [snip] ... [/snip] -c astra/experimental.cpp -o build/temp.linux-x86_64-3.4/astra/experimental.o
astra/experimental.cpp: In function ‘PyObject* __pyx_pf_5astra_12experimental_do_composite(PyObject*, PyObject*, PyObject*, PyObject*, PyObject*)’:
astra/experimental.cpp:884:3: error: ‘CCompositeGeometryManager’ is not a member of ‘astra’
   astra::CCompositeGeometryManager __pyx_v_m;
   ^
astra/experimental.cpp:1224:21: error: ‘__pyx_v_m’ was not declared in this scope
     __pyx_t_7 = ((!(__pyx_v_m.doFP(__pyx_v_projector, __pyx_v_vol, __pyx_v_proj) != 0)) != 0);
                     ^
astra/experimental.cpp:1267:21: error: ‘__pyx_v_m’ was not declared in this scope
     __pyx_t_7 = ((!(__pyx_v_m.doBP(__pyx_v_projector, __pyx_v_vol, __pyx_v_proj) != 0)) != 0);
                     ^
error: command 'gcc' failed with exit status 1

The interesting thing about this failure is that it did not occur before 12:30 today (Jan 18) since we have successful builds from then. I don't see any related commits on your side, though.

I'm using GCC 5.3, may that be a problem? My manually specified compiler is not used by Cython, btw 😉

Bug in combination with non-English locale

I observed a very strange behaviour when trying to create a figure with matplotlib and afterwards creating an ASTRA 2D sinogram:

Running the script below from the shell or the within the PyCharm IDE leaves the shell unresponsive. The corresponding python process starts to run at 100% CPU usage and needs to be killed explicitly. In the Spyder IDE this does not happen when using the IPython console (with inline backend 'module://IPython.kernel.zmq.pylab.backend_inline') but when using the python console it does. Also this does not happen when astra.data2d.create is called before plt.imshow, or when a volume '-vol' is created instead of a sinogram, or when only 1, 2, 3 or 5 (or maybe another number of) angels are used. Turning the interactive mode of pyplot off or on with plt.ioff() or plt.ion() has no effect.

#!/usr/bin/env python

import astra
import numpy as np
import matplotlib.pyplot as plt


plt.figure(1)
plt.imshow(np.ones((4, 4)))

astra.data2d.create('-sino',
    astra.create_proj_geom('parallel', 1.0, 2, np.linspace(0, 1, 4)), 0)

I tested it with various combination of

  • Python 2.7.6
  • Python 3.4.3
  • matplotlib 1.5.0
  • matplotlib 1.4.3
  • PyCharm 5.0.1
  • Spyder 2.3.7 with Python 2.7.6, IPython 3.2.2, matplotlib 1.4.3
  • numpy 1.10.1
  • scipy 0.16.1
  • latest ASTRA version from github
  • graphical backend: Qt4Agg, GTK3Agg, GTKAgg, GTKCairo, GTK3Cairo, WXAgg

Cppcheck errors

Hi,
I check astra/src directory with cppcheck static analyser.
it's seems that some bugs/warnings in astra/src
This results may be useful to fix future bugs.

➜  astra-toolbox git:(develop) ✗ cppcheck -q --enable=all src                                                                                                             [src/ConeProjectionGeometry3D.cpp:229] -> [src/ConeProjectionGeometry3D.cpp:229]: (style) Same expression on both sides of '-'.
[src/CudaDataOperationAlgorithm.cpp:80]: (performance) Prefer prefix ++/-- operators for non-primitive types.
[src/FilteredBackProjectionAlgorithm.cpp:136]: (error) Memory leak: sinogramData2D
[src/Float32Data2D.cpp:121]: (error) Null pointer dereference
[src/Float32VolumeData3DMemory.cpp:139]: (style) Variable 'iSliceCount' is assigned a value that is never used
[src/XMLNode.cpp:162]: (performance) Prefer prefix ++/-- operators for non-primitive types.
[src/XMLNode.cpp:310]: (performance) Prefer prefix ++/-- operators for non-primitive types.
(information) Cppcheck cannot find all the include files (use --check-config for details)

Link GPU memory

It is currently possible to link with numpy arrays. Would it be possible to pass an external GPU memory pointer to astra and use it with the astra algorithms? This would significantly reduce overhead when calling astra from e.g. python.

DART in Python

Hi!

I am trying to perform DART tomography in python. So far I've seen the examples in Matlab, which resort to a class called DARTalgorithm but don't know how to call it or how to proceed in python. Is it possible? What am I missing?

Exception safety pattern

Is there an accepted way to use ASTRA in python while remaining exception safe? For example, a user may run (in pseudocode)

volume = CreateVolume()
RunAlgorithm(volume)
Delete(volume)

If the user presses CTRL-C during the algorithm, the Delete(vol) step will not be performed properly.

Can we change voxel size when createing volume geometries

Dear all,
Sorry for asking something so trivial. I knew that when we create volume geometries using function astra_create_vol_geom, the voxel size is default 1X1X1mm.
I was wondering if we could change the voxel sizes?Just like function astra_create_proj_geom did.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.