[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20051019: IDV extract image time



>From: "Valentijn Venus" <address@hidden>
>Organization: ITC
>Keywords: 200510191613.j9JGDU7s010657

Hi Valentijn-

>So for example, when my image sequence holds 3 images I literally type
>in during the user input form: "2" to show the middle image in the
>sequence? When I do this I get this:

Actually, it's zero based, so you'd want 1 for the index.  You could
modify the procedure to subtract 1 from the user input if you wanted
them to be in "normal speak". ;-)


>java.lang.ClassCastException: visad.DateTime
>       at
>ucar.unidata.idv.control.ImageSequenceControl.loadDataInner(ImageSequenc
>eControl.java:444)
>       at
>ucar.unidata.idv.control.ImageSequenceControl.loadData(ImageSequenceCont
>rol.java:329)
>       at
>ucar.unidata.idv.control.ImageSequenceControl.access$000(ImageSequenceCo
>ntrol.java:96)
>       at
>ucar.unidata.idv.control.ImageSequenceControl$1.run(ImageSequenceControl
>.java:187)
>       at ucar.unidata.util.Misc$2.run(Misc.java:778)


The code I sent will return the time, not the image. If you want
to get just the image at a particular time, you just have to call
image.getSample(i).

Don Murray
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.