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

Home » Public Forums » archive » Re: structures, driving me crazy
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: structures, driving me crazy [message #22576] Fri, 24 November 2000 00:00
Alex Schuster is currently offline  Alex Schuster
Messages: 124
Registered: February 1997
Senior Member
Luis Alonso wrote:

> I have a dataset of images with corresponding header files.
> The header files (which i want to read) consist of three float numbers, and
> then 9 rows of data with 8 elements each. Each row corresponds to a spectal
> band of the image.
> i've got 138 images all related, so i want to have all the headers open and
> related.
> I thought about creating a structure for each band:
> att={roll:0.0,pitch:0.0,head:0.0,utme:0L,utmn:0L,alt:0.0,vel :0.0}
> and then create an array of structures
> band=replicate(att,9)
> then create a header structure
> header={date:'',sunazi:0.0,sunzen:0.0,bias:0.0,band:???}
...
> of course i found several problems. First, i didn't know how to initialize
> the tag band as a structure array of the type band in the structure
> definition of header.

Isn't
header={date:'',sunazi:0.0,sunzen:0.0,bias:0.0,band:band}
what you are looking for? The whole array of arr-structs now becomes a
tag of your header structure.


> i know there are workarounds, as using separate structures for bands and the
> rest of the header... but i thought there MUST be a way of putting it all
> together, and being able to access data as:
>
> image[102].date
> as well as
> image[102].band[3].utme

Sure, no problem.

> So, what am i missing?

I don't know, this should just work fine. Tell me if I misunderstood
you.

Alex
--
Alex Schuster Wonko@weird.cologne.de PGP Key available
alex@pet.mpin-koeln.mpg.de
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Link IDL to Oracle (VMS Case)
Next Topic: structures, driving me crazy

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

Current Time: Thu Oct 09 10:10:29 PDT 2025

Total time taken to generate the page: 1.51901 seconds