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

Home » Public Forums » archive » Re: file i/o help
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
Re: file i/o help [message #30355] Thu, 18 April 2002 11:03
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
vijay (yeluri@eng.fiu.edu) writes:

> i have like a 100 dicom files. I want to generate a single volume file
> consisting of the 100 dicom files. I mean, a single file which would
> contain the 100 individual dicom files next to each other pixel by
> pixel.

Let's assume your DICOM images are 600 by 400 integer arrays,
and that your files are named something sensible like image001.dcm,
image002.dcm, ..., image100.dcm. (Big assumption, but I
don't have much time.)

Then you would write a program something like this:

FUNCTION FillVolume

volume = IntArr(600, 400, 100)
FOR j=0,99 DO BEGIN
filename = 'image' + String(j, Format='(I3.3)') + '.dcm'
volume[0,0,j] = Read_Dicom(filename)
ENDFOR
RETURN, volume
END

Cheers,

David
--

David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: file i/o help
Next Topic: Re: off-white background in IDL-generated bitmaps

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

Current Time: Fri Oct 10 16:49:26 PDT 2025

Total time taken to generate the page: 0.80023 seconds