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

Home » Public Forums » archive » Re: End of Array - like - End Of File
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: End of Array - like - End Of File [message #25945] Fri, 27 July 2001 13:19
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
Ummm....???

for i=0, n_elements(text)-1 do ???????

On Fri, 27 Jul 2001 17:59:09 +0200, "Emmler, Oliver" <oemmler@ix.urz.uni-heidelberg.de> wrote:
> Hi all,
> i have a directory with different numbers of files. I read the filenames by
>
> text = FINDFILE('H:/radiologie/*.dcm')
>
> in my testdirectory there are 14 files so it's defined when to stop
>
> FOR i=0,14 DO file[*,*,i] = READ_DICOM(text[i])
>
> QUESTION:
> How can i get the size of the array TEXT to stop by FOR i=0,stop DO ...
> Is there something like EOA (EndOfArray) like EOF ?
>
> Thanks,
> Oliver Emmler
>
> --
> Oliver Emmler
> University of Heidelberg
> Departement of Radiology
> Phone: +49-6221-7963059 E-Mail: Oliver.Emmler@med.uni-heidelberg.de
>
>
Re: End of Array - like - End Of File [message #25949 is a reply to message #25945] Fri, 27 July 2001 11:18 Go to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
"Emmler, Oliver" wrote:
>
> Hi all,
> i have a directory with different numbers of files. I read the filenames by
>
> text = FINDFILE('H:/radiologie/*.dcm')
>
> in my testdirectory there are 14 files so it's defined when to stop
>
> FOR i=0,14 DO file[*,*,i] = READ_DICOM(text[i])
>
> QUESTION:
> How can i get the size of the array TEXT to stop by FOR i=0,stop DO ...
> Is there something like EOA (EndOfArray) like EOF ?

How about:

n_files = N_ELEMENTS( text )
FOR i=0,n_files-1 DO file[*,*,i] = READ_DICOM(text[i])

?

paulv

--
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
Fax:(301)763-8545 And drinking largely sobers us again.
Alexander Pope.
Re: End of Array - like - End Of File [message #25950 is a reply to message #25949] Fri, 27 July 2001 11:32 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
"Emmler, Oliver" <oemmler@ix.urz.uni-heidelberg.de> writes:

> Hi all,
> i have a directory with different numbers of files. I read the filenames by

> text = FINDFILE('H:/radiologie/*.dcm')

> in my testdirectory there are 14 files so it's defined when to stop

> FOR i=0,14 DO file[*,*,i] = READ_DICOM(text[i])

> QUESTION:
> How can i get the size of the array TEXT to stop by FOR i=0,stop DO ...
> Is there something like EOA (EndOfArray) like EOF ?

Is this what you mean?

FOR i=0,N_ELEMENTS(file)-1 DO file[*,*,i] = READ_DICOM(text[i])

William Thompson
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Good IDL GUIBuilder Tutorial???
Next Topic: Re: closing widget window

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

Current Time: Wed Oct 08 19:04:39 PDT 2025

Total time taken to generate the page: 0.00536 seconds