comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Reading 256x256x16bit images

Reading 256x256x16bit images
type: item
description: Hi, I have a series of MRI slices, each in its own file, that I would like to read into IDL. Each file is a binary file that holds the 256x256 array of 16-bit integers. I can read these files into other, image specific packages like NIH-Image and Osiris. In each case, it doesn't matter if I use 16-bit signed or unsigned. I get the same image. The file size matches 256x256x16/8=131072bytes. I have been using the following commands on IDL for PowerMac: openr, 1, 'silce214.dat' a=assoc(1,intarr(256,256)) b=a(1) then I get an "Encountered end of file" error. If I reduce the size of the intarr by only one unit in either direction, I don't get the end of file error but when I do tv, b then I get something that looks nothing like my image. I have tried using a bytarr(256,256) and I don;t run out of file but the image looks like it has been checkerboarded and moved around. Also has a shadow to it due to the additional bytes being read. Has anyone had this problem.... We want to use IDL to read in the image, process it, contour the tissue in the image based on thresholds, then produce a grid that can be read by our simulation codes. Right now we use 2 different pieces of software for this and would like to trim it down to one good piece of software. Thanks in advance, Chris -- ============================================================ Chris Penland <chris@erc-sparc.mc.duke.edu> Room 268 Engineering Annex (919) 660 - 5162 Biomedical Engineering / NSF Engineering Research Center Dept. of Energy Computational Science Graduate Fellow /\ "Do not be clever... / \ _ Clever kills." _____/\__ / \ ___/ \____ \/ \/ -Steve Oualline, 1993 Practical C Programming ============================================================
creator: Chris Penland
date: 1996-06-16T07:00:00-00:00