iopen arguments

David R. Blythe drb at eecg.toronto.edu
Sat Mar 30 17:02:45 AEST 1991


In article <9103290405.AA06047 at karron.med.nyu.edu> karron at cmcl2.nyu.edu writes:
>
>I am using ipaste format to store medical images, and I am getting
>core dumps when I use pixels with a color map index > 255. In medical pix
>processing, the images are 12 bits, and I have to rescale (histogram equ and
>divide) them to get them to fit in your image format.
>
>Now what is the meaning of the arguments to iopen, and why are short pixels
>with 16 bits of storage bombing out with more than 8 bits of value ?
>
>I am guessing now, but the BPP(value) is Bytes Per Pixel ?
>

I frequently use images with 12 bit pixels which are displayed using the colour
lookup table (aka cmode()).  This is what I pass to iopen() and I also call
setcolormap() afterwards to indicate it is a `SCREEN' image

    image = iopen(argv[2],"w",RLE(2),2,xsize,ysize,1);
    isetcolormap(image,CM_SCREEN);

I have seen other code with zsize set to 0, so I doubt it matters.  Most of the
imgtools work with SCREEN images (i.e. assemble,izoom,iflip,... but may not
set the output type to SCREEN properly (which you can fix in the source code
or use the command 'iset SCREEN file').  Some of the commands, however, do not
work with all SCREEN files e.g., hist ...

	david blythe
	ontario centre for large scale computation
	drb at clsc.utoronto.ca




More information about the Comp.sys.sgi mailing list