The core of freeart has been developed in cpp. If you want to skip the python binding you can use cmake or cmake gui in order to generate the library and the executable given in examples/ It can also be useful for debugging using valgrind or other..
If we set the oversampling value to one then we will evaluate one point of the ray each VOXEL WIDTH. If we have n as oversampling value then we will estimate the a point of the ray each \(\frac{VOXEL WIDTH}{n}\).
Warning
For the fluorescence in the case you are using the CREATE_ONE_RAY_PER_SAMPLE_POINT as we are creating the ‘real’ outfoing ray we will generate n time more rays (one outgoing rays for each sample point)
FreeART has bright new unit tests, easily launchable :
python run_tests.py
It is strongly recommended to launch the unit test before each commit. Is also be nice to associate each new development with an adapted unit tests.
We actually have two methods to compute the points sampled for a ray :
Note
Due to the algorithm we have to keep in memory the voxel used to sample each point and the weight (distace to the voxel center). So the withinterpolation method is about four time more memory consuming.
In the case of a fluorescence (or compton) reconstruction or projection we have to estimate the outgoing ray. We have three algorithm to do this :
Has you might saw, the structure of the diffraction is in the FreeART source code. But none of ot has been tested (and has unit tests.). So it is has been removed from the python interface for now.
you can run your unit tests locally
python run_tests.py -i
You can debug using valgrind for example
Analysing function call
valgrind --tool=callgrind python
>>> execfile("my_script.py")
Checking for memory leaks
valgrind --tool=memcheck python
>>> execfile("my_script.py")
Debian 8 - 64 bits
Final points - direction of the ray is also inverted - rays are now storing all the point sampled. - some ‘normalization’ work have been started in the ‘new binding’ branch. Also including a python binding for the sampling algorithm. This is not ended.