This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>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.