Just a fun project to learn about particle simulations. Developed for applying particle physics to magnetic resonance images (nifti file format).
Package | Tested version |
---|---|
NumPy | 1.17.2 |
Matplotlib | 3.1.1 |
Nibabel | 2.2.1 |
pip install slowest_particle_simulator_on_earth
Type the following command on your command line:
slowest_particle_simulator_on_earth /path/to/image.nii.gz --slice_number 3 --thr_min 200 --thr_max 500
Note: You can select different slice numbers. For now the slices can only be chosen on one axis. I am going to make this more flexible later.
slowest_particle_simulator_on_earth creates individual pictures which can be compiled into an animated gif. I use the following command (on linux) to convert the frames into animated gifs:
convert -delay 1 -loop 0 /path/to/export/*.png out.gif
You can change -delay
parameter to make your gif faster or slower.
Alternatively, you can also create a movie rather than a gif:
ffmpeg -r 30 -i /path/to/export/frame_%03d.png -pix_fmt yuv420p -r 30 out.mp4
Please use GitHub issues for questions, bug reports or feature requests.
This project is licensed under BSD-3-Clause.