History of AFNI updates  

|
February 28, 2003 02:44PM
The problem is that the mritopgm program is (a) very old and (b) very simple. You are probably trying to convert SPGR or MPRAGE images. The problem with them is that there are a few very bright pixels from the skull lipids and arterial inflow, and these cause the simple image conversion in mritopgm to be crummy. The AFNI image viewer is a little more sophisticated - instead of mapping the absolutely brightest pixel to white and then linearly on down from there, it takes the 98%-th brightest pixel as white.

Since you are at FMLH, I assume you are dealing with GE I.* formatted files - or do you now use DICOM files? In any case, I've modified mritopgm to have an option to do the kind of clipping described above. The command line you'd likely want to use is now
mritopgm -99 image_name| cjpeg -quality 90 > image_name.jpg
which indicates to say the 99%-th brightest voxel is white. Visually, this looks decent on some SPGR images I perused. You may have to play with this, and use "-98" instead of "-99".

This change is in the AFNI source code directory now, and I'm recompiling the linux_glibc22 and solaris28_gcc binaries now.

bob cox
Subject Author Posted

script to convert/print images

Stephanie Runke February 28, 2003 11:49AM

Re: script to convert/print images

bob cox February 28, 2003 02:44PM