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

Home » Public Forums » archive » Beginners question on widgets
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Beginners question on widgets [message #14281] Tue, 16 February 1999 00:00 Go to next message
ch.haas is currently offline  ch.haas
Messages: 1
Registered: February 1999
Junior Member
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 Haas
Physicist

Department of Medical Physics
Landeskrankenhaus Feldkirch
Carinagasse 47
A-6800 Feldkirch, Austria
e-mail: ch.haas@gmx.net
Re: Beginners question on widgets [message #14344 is a reply to message #14281] Thu, 18 February 1999 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
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:

ftp://bial8.ucsd.edu/pub/software/idl/examples/

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:

ftp://bial8.ucsd.edu/pub/software/idl/share/idl_share.tar.gz

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
Sites!!

ftp.rsinc.com : Research Systems (IDL) ftp site (IP:
192.5.156.21)

User-contributed routines : pub/user_contrib
Documentation: "Building IDL Applications":
ftp://ftp.rsinc.com/pub/idl_5.1.1/info/docs/building.pdf

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
Page
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
Programming

http://www.dfanning.com : IDL Programming Web Page (David Fanning)
http://www.dfanning.com/documents/idl5_info.html#toc : IDL
Anomolies
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
stuff

http://astrog.physics.wisc.edu/~craigm/idl/idl.html : Craig
Markwardt

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
Schultz

ftp.sr.bham.ac.uk/pub/sjt/graffer-1.05.tar.gz : IDL Plot Tool
(graffer)

http://www.ivsoftware.com/pub/idl_faq.html : IDL FAQ

http://www.astro.washington.edu/deutsch/idl/htmlhelp/ : Eric
Deutsch's
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
Web
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
Freeware

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
Reader/Viewer!

http://nw.demon.co.uk/floating/idl/idl_medical.html : Medical
Imaging

Basics of IDL:
ftp://ftp.rsinc.com/pub/idl_5.1/info/docs/basics.pdf
http://scv.bu.edu/SCV/Tutorials/IDL/idl_webtut.html
http://zonker.ncsa.uiuc.edu/docs/viz/Idl/Training


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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
Re: Beginners question on widgets [message #14374 is a reply to message #14281] Tue, 16 February 1999 00:00 Go to previous message
T Bowers is currently offline  T Bowers
Messages: 56
Registered: May 1998
Member
> 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.


No problem.
Use the map keyword in the call to the widget creation function
(e.g. widget_base()) and/or the widget_control procedure.
map=0 means don't show it
map=1 means show it.

;Create a base, but don't show any widget created off of this base yet.
baseWidget = widget_base(title=baseWidgetTitle, map=0)

;Add a draw widget to the base.
mainDrawWidget= widget_draw(baseWidget, xsize=imageSizeX, ysize=imageSizeY)

;Realize the widget, but it's still not shown to the user 'cause map still
set to 0.
widget_control, baseWidget, /realize

;OK, show it to 'em by setting map=1
widget_control, baseWidget, map=1

;Now go ahead and hand off to xmanager
xmanager, "mainForm", baseWidget, /no_block

Wow, looky here! Now *I'm* posting answers to questions. I must be finally
gettin'
the hang of this stuff.

Good luck
T Bowers
Re: Beginners question on widgets [message #14375 is a reply to message #14281] Tue, 16 February 1999 00:00 Go to previous message
Mark Buckley is currently offline  Mark Buckley
Messages: 7
Registered: December 1998
Junior Member
Nigel Wade wrote in message <36C94EDB.FE5CEC92@ion.le.ac.uk>...
> 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.
>>
> It is possible, but only for a widget base. Look at the IDL help for
> WIDGET_CONTROL and the keyword MAP.
>
> Basically, you can call WIDGET_CONTROL, id, MAP=0 for any widget, but
> all widgets in the same base will be unmapped. Just create a new base
> which only contains the widgets you want to be able to map and un-map.


A couple of suggestions:

1/ If you create a base without specifying row or column, you can 'stack'
widgets
on top of each other. As long as you only map one of them at any given
time,
you can make controls specific for the current state of the GUI appear
and
disappear as necessary.

2/ If you use a draw widget, you can look for mouse click events. Using the
same
method as in 1/ you can map your controls when the user clicks on the
draw
widget. Of course, you then need a button to 'diasappear' them again.

cheers,

Mark
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: breakpoint error
Next Topic: Re: CONVOL2D

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

Current Time: Wed Oct 08 11:27:31 PDT 2025

Total time taken to generate the page: 0.00742 seconds