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

Re: Beginners question on widgets

Christian Haas wrote:
> Hi!
> I would like to write a larger widget application for medical imaging
> purposes. Since I have no experience with IDL widgets yet I need to
> know if there is an easy way of hiding and showing text and draw
> widgets that all belong to one widget base without destroying and
> realizing them each time.
> Please excuse for the simple question but I am really a beginner.
> Thank you in advance.
> Regards,
> Christian

Christian -

Actually this isn't necessarily an easy question. If you just want
to hide and show widgets at various times, you can use

	widget_control, wid_id, map=[0|1]

to map and unmap them. However, if you would like to have a way
to use the same space in your widget program for several "menus",
which are overlaid so you can map them one at a time, this is more
difficult, and
I have yet to see the method documented anywhere (if anyone knows
where please let me know!).

I wrote up a simple example program that demonstrates this method,
and may help you as an example of widget programming techniques.
You can get EXAMPLE.PRO from:


The IDL routine SLICER3.PRO also serves as an example, but it's much
more complicated!

EXAMPLE() uses my GRAYSCALE() and POS_WIDGET() routines,
which you can get from:


Since you're working with medical imaging, you may want to check out
the other routines here as well, as our work here is in medical
imaging. The SHOW_IMG program in particular may be useful for
display of a wide variety of medical images (MR,CT,SPECT,PET).
The README file lists the available routines.

Here is a collection of net resources for IDL that I have collected.
Probably more than you want to look at right now, but this might come
in handy sometime:

IDL Sources (FTP and Web)
    http://ds2iss.gsf.de:8081/Privat/IDL/idl_www_sites.html  :  IDL WWW
    ftp.rsinc.com  :  Research Systems (IDL) ftp site  (IP:
            User-contributed routines : pub/user_contrib
            Documentation:   "Building IDL Applications":
    http://www.iagusp.usp.br/~morisset/idl/index.html  :  IDL Cookbook
            Ray Sterner's "Basic IDL Cookbook" Reference
    ftp://sohoftp.nascom.nasa.gov/solarsoft/gen/idl/  :  Bill Thompson's
            Lots of routines! Categorized.
    http://www.mpae.gwdg.de/mpae_RZ/software/idl/  :  EMACS IDL mode
    http://fermi.jhuapl.edu/s1r/idl/idl.html  :  Ray Sterner's Libraries
    http://www.va.ucsf.edu/mrs/IDL/idl_docs.htm  :  Advanced IDL
    http://www.dfanning.com  :  IDL Programming Web Page (David Fanning)
        http://www.dfanning.com/documents/idl5_info.html#toc : IDL
	ftp.frii.com  :  pub/dfanning/outgoing  :  IDL Software (David Fanning)
    http://www.irc.chmcc.org/idl/philsIDL.html  :  Phil William's Page
    http://www.niwa.cri.nz/~hadfield/gust/software/idl/  : Mark
Hadfield's Page
    http://www.bell-labs.com/user/windt/idl/windt.html  :  David Windt's
    http://astrog.physics.wisc.edu/~craigm/idl/idl.html  :  Craig
    http://cimss.ssec.wisc.edu/~gumley/frame.html  :  Liam Gumley's Page
            (Frame Tools (multi-plot))
    http://www-as.harvard.edu/people/staff/mgs/idl/index.html  :  Martin
    ftp.sr.bham.ac.uk/pub/sjt/graffer-1.05.tar.gz  :  IDL Plot Tool
    http://www.ivsoftware.com/pub/idl_faq.html  :  IDL FAQ
    http://www.astro.washington.edu/deutsch/idl/htmlhelp/  :  Eric
            Browser Page (Links/resources/search capabilities!)
    http://www.sljus.lu.se/stm/IDL/Surf_Tips/  :  Surface Plot Tutorial
            Struan Gray "Extending IDL's Surface Plotting Routines"
    http://ednet.gsfc.nasa.gov/Mathews/misc/idl-www.html  :  IDL on the
            Using IDL on the Web. Contains Perl scripts for using IDL to
            generate GIFs which are then displayed on the web.
    http://www.grupoatlas.com/atlas/nn.htm  :  Neural Network IDL
    http://sag-www.ssl.berkeley.edu/~korpela/mmap/  :  VARRAY Utility
            Memory mapped files for IDL!
            korpela@islay.ssl.berkeley.edu (Eric J. Korpela)
    http://www.floating.co.uk/idl/dicom.html  :  DICOM File
    http://nw.demon.co.uk/floating/idl/idl_medical.html  :  Medical
    Basics of IDL:

Hope this helps. Good luck!


    David S. Foster         Univ. of California, San Diego
     Programmer/Analyst     Brain Image Analysis Laboratory
     foster@bial1.ucsd.edu  Department of Psychiatry
     (619) 622-5892         8950 Via La Jolla Drive, Suite 2240
                            La Jolla, CA  92037