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

Home » Public Forums » archive » Re: Expanding IDL's list of approved image formats
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Expanding IDL's list of approved image formats [message #19937 is a reply to message #19934] Tue, 09 May 2000 00:00 Go to previous messageGo to previous message
Ben Tupper is currently offline  Ben Tupper
Messages: 186
Registered: August 1999
Senior Member
Hello,

You might incorporate the built in DIALOG_PICKFILE function into your own reader.
Something like the following might do it.

;-----------
FUNCTION READ_ThisData, File, Group = Group, Cancel = Cancel

Cancel = 0
If N_Elements(File) EQ 0 Then Begin
File = Dialog_PickFile(Group = Group)
; if user cancels then return -1 and set the cancel flag
If File[0] EQ '' Then Begin
Cancel = 1
Return, -1
EndIf
EndIf

.... Your other stuff here to read in the data ...

Return, ThisData

END
;-----------------

The other way to work around this is don't use DIALOG_READ_IMAGE function. Use
the DIALOG_PICKFILE function, then read in the data based upon which type of
format the user chooses. You can use the result of QUERY_IMAGE to determine if
the image is a 'standard' image format according to IDL's definitions.

Good luck,

Ben


Michael Cugley wrote:

>
>
> Well, yes. To rephrase what I meant [which may not be what I *wrote* :)], I've
> written a routine to load ACR/NEMA files, but it sure would be convenient to be
> able to tell IDL about my nice new READ_ACRNEMA function so that, say, the
> DIALOG_READ_IMAGE popup will show ACR/NEMA files as "images". As it stands it
> looks like I'm going to have to add my own cludgy routine after the fact, or
>

--
Ben Tupper

Bigelow Laboratory for Ocean Science
tupper@seadas.bigelow.org

pemaquidriver@tidewater.net
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Objects and Widgets
Next Topic: Re: POLY_FIT gives wrong answer !

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

Current Time: Sat Oct 11 02:16:28 PDT 2025

Total time taken to generate the page: 0.64785 seconds