Login  Register

Re: shot in the dark: image library for freepascal/xcode?

Posted by Adrian Daerr on Oct 25, 2007; 5:23pm
URL: http://imagej.273.s1.nabble.com/3D-reconstruction-of-volume-tp3698102p3698109.html

>    the problem for me is trying to generate image snapshots (tiff, jpeg,
> png, whatever, i dont care!) of the state of my diffusion simulation at
> different time points.

Why not write images in portable pixmap format:

http://en.wikipedia.org/wiki/Netpbm_format

This needs only some PRINT statement in your favorite language, and is
*very easy* to figure out and implement (no need to install anything in
particular). ImageJ reads PPM-files out of the box (like all other image
processing/editing software, e.g. GIMP). Or use ImageMagick or
similar to convert to PNG/JPEG/TIFF/...

Just to give a quick impression of how simple and intuitive this format
is, here is an example of a small graymap (try to copy/paste & save this
using your favorite text editor, and open it using ImageJ):

-------------------- cut here -----------------------
P2
# feep.pgm
24 7
15
0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
0  3  3  3  3  0  0  7  7  7  7  0  0 11 11 11 11  0  0 15 15 15 15  0
0  3  0  0  0  0  0  7  0  0  0  0  0 11  0  0  0  0  0 15  0  0 15  0
0  3  3  3  0  0  0  7  7  7  0  0  0 11 11 11  0  0  0 15 15 15 15  0
0  3  0  0  0  0  0  7  0  0  0  0  0 11  0  0  0  0  0 15  0  0  0  0
0  3  0  0  0  0  0  7  7  7  7  0  0 11 11 11 11  0  0 15  0  0  0  0
0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
-------------------- cut here -----------------------

regards,
Adrian