comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Reading 256x256x16bit images
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Reading 256x256x16bit images [message #6402] Sun, 16 June 1996 00:00
Chris Penland is currently offline  Chris Penland
Messages: 1
Registered: June 1996
Junior Member
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
============================================================
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: polar surfaces
Next Topic: Extracting vertices from an ROI (region of interest)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:40:45 PDT 2025

Total time taken to generate the page: 0.00625 seconds