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

Re: Expanding IDL's list of approved image formats


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

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

Return, ThisData


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,


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