I am using GATE/Geant4 for simulating photon beams interacting with matter. For 3D dose distributions, GATE outputs the data into an Analyze 7.5 format [1]. I was wondering whether there exists a function in Mathematica that could read files in this format and display the data. For what is worth, Matlab has analyze75read [2] for this purpose.

[1] http://eeg.sourceforge.net/ANALYZE75.pdf

[2] http://www.mathworks.com/help/images/ref/analyze75read.html

( This comment will soon be deleted: I don't have access at the moment to my Mathematica installation, but here is a file in case anyone would like to play with it: http://leaf.dragonflybsd.org/~beket/geant4/Config-gamma-Dose.hdr and http://leaf.dragonflybsd.org/~beket/geant4/Config-gamma-Dose.img ).


If you have both Mathematica and MATLAB (with the Image Processing Toolbox, of course) installed on the same computer, an easy way would be to use MATLAB to read the file, and then pass the data to Mathematica using MATLink. This would avoid the need for you (or someone else) to write C code as a LibraryLink program, which (judging from the description of the file format) would be the only other reasonably straightforward and/or performant approach.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.