------------------------------------------------------------------------------ Return-Path: Received: from GS77.SP.CS.CMU.EDU by ux3.sp.cs.cmu.edu id aa11690; 26 Jan 99 0:33 EST Received: from localhost by gs77.sp.cs.cmu.edu id aa12854; 26 Jan 99 0:33 EST From: Chuck Rosenberg To: mitchell+@cs.cmu.edu, danieln+@cs.cmu.edu cc: chuck+@cs.cmu.edu Subject: Voxel Plotter Date: Tue, 26 Jan 1999 00:33:00 -0500 Sender: chuck@gs77.sp.cs.cmu.edu X-UIDL: 0fa9b9911c40ce4636cc4d306dc45efd Hi, I've modifed the program "pff2ppm" to do the voxel plotting. The program is in the "code" directory. An example image "lb-pred_t00.ppm" can be found in the backprop directory. I'm afraid that it is not particularly impressive because of the small number of voxels we are predicting. An example call is: ../code/pff2ppm -po -0.8 -ps -3.0 -ds 10000 -cm 5 -pf lb-predictability.vox -zm 1 /afs/cs/project/theo-35/fmri/02882_34/detrend.dat lb-pred 0 0 0 6 When this call is made from the "backprop" directory it generates the image "lb-pred_t000.ppm" which is a plot of the NRMSE data in lb-predictability.vox. An explanation of the command line options: (you can also just type pff2ppm) -pf lb-predictability.vox = specifies the plot data file -cm 5 = specifies the color map for plotted data, in this case spectrum (-cm 4) specifies the red / green map that Tom suggested -zm 1 = a flag which indicates that all 7 z slices should be combined into a single montage -po -0.8 = the plotted data offset, this specifes that first the value -0.8 should be subtracted from the value before plotting -ps -3.0 = the plotted data scale, this indicates that after the offset is added to the data, the result should be scaled by this factor in this case a negative value is used so "good" values (small NRMSE) will appear as positive numbers after being offset -ds 10000 = antennuation factor for the background brain image, the larger this number, the darker it will be The numbers "0 0 0 6" tell the program to use time slices 0-0 and z slices 0-6 as the background brain image. If you have any questions, please e-mail. Thanks, Chuck ------------------------------------------------------------------------------ Convert data from a PFF format file to a series of PGM images. Usage: pff2ppm Arguments = input data file = output image file Note that using the filename stdout for the output image will cause it to be dumped to stdout. Options -ds = set data scale, default = 4000 -do = set data offset, default = 0 -id = invert pff data in image, default = 0 -t = set threshold value, default = don't threshold -b = set scale factor for thresholded background, default = 0.5 -zm = merge all of the z images into a single, default = 0 -bf = background fill value when in merge mode, default = 0 -pf = name of plot file, default = none -po = plot file data offset, default = 0 desired plot data range is -1 -> +1 the offset is added to the data before any other operation -ps = plot file data scale, default = 1 desired plot data range is -1 -> +1 the data is multiplied by the scale after the offset is added -pa = auto scale and offset data, default = 0 0 = do not auto scale +1 = auto scale -1 = auto scale and multiply scale factor by -1 to reverse order -cm = color map (default = 5) 0 - 0 = white, + = red, - = blue 1 - 0 = black, + = yellow, - = cyan 2 - 0 = blue, + = yellow, - = cyan 3 - spectrum (varying brightness) 0 = blue, +=magenta,red, -=cyan,green 4 - 0 = black, + = green, - = red 5 - spectrum (full brightness) 0 = blue, +=magenta,red, -=cyan,green -xs = x start for cropping (default = 0) -xe = x end for cropping (default = 63) -ys = y start for cropping (default = 0) -ye = y end for cropping (default = 63) -sc = output image scaling factor (default = 1) ------------------------------------------------------------------------------ Pretty voxel plotting of LB MSE data - full brain version - straight to gif: rm -f lb-pred_t000.gif pff2ppm -sc 2 -pa -1 -ds 10000 -cm 5 -pf lb-predictability.vox -zm 1 /afs/cs/project/theo-35/fmri/02882_34/stats/02882_mean.pff stdout 0 0 0 6 | ppmquant 256 | ppmtogif > lb-pred_t000.gif ------------------------------------------------------------------------------ Pretty voxel plotting of LB MSE data - cropped version - staright to gif: rm -f lb-pred-crop_t000.gif pff2ppm -sc 4 -xs 35 -xe 55 -ys 10 -ye 30 -pa -1 -ds 10000 -cm 5 -pf lb-predictability.vox -zm 1 /afs/cs/project/theo-35/fmri/02882_34/stats/02882_mean.pff stdout 0 0 0 6 | ppmquant 256 | ppmtogif > lb-pred-crop_t000.gif ------------------------------------------------------------------------------