Path: utzoo!utgpu!news-server.csri.toronto.edu!eecg.toronto.edu!drb Newsgroups: comp.sys.sgi From: drb@eecg.toronto.edu (David R. Blythe) Subject: Re: iopen arguments Message-ID: <1991Mar30.020245.24084@jarvis.csri.toronto.edu> Organization: EECG, University of Toronto References: <9103290405.AA06047@karron.med.nyu.edu> Date: 30 Mar 91 07:02:45 GMT Lines: 30 In article <9103290405.AA06047@karron.med.nyu.edu> karron@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@clsc.utoronto.ca