0

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

stathisk
  • 3,054
  • 20
  • 37
  • Just found a viewer that is able to read/display .hdr/.img files: http://www.creatis.insa-lyon.fr/rio/vv/ – stathisk Oct 06 '13 at 12:49

1 Answers1

3

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.

Oleksandr R.
  • 23,023
  • 4
  • 87
  • 125