Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: viewer - Tool Up: viewer - Module Previous: Resources


Tools in this module



Example

Here is a trivial example to give you the flavour of using a Viewer tool. Suppose we have an AIPS++ image on disk and wish to view it on the screen then generate a "quick" PostScript file of the image, with axis labels:

- include 'viewer.g';                                                 # 1
- mdd := dv.loaddata('myaips++image', 'raster');                      # 2
- mdd.setoptions([axislabelswitch=T]);                                # 3
- mdp := dv.newdisplaypanel();                                        # 4
- mdp.register(mdd);                                                  # 5
- mdp.canvasprintmanager().writeps('mydiskimage.ps', dpi=300);        # 6
- mdd.done();                                                         # 7
- mdp.done();                                                         # 8

1.
This gives us access to the Viewer tool code, and in particular, the defaultviewer tool.
2.
Create a Viewerdisplaydata tool which is a raster representation of the AIPS++ Image with the given name.
3.
Turn axis labelling on.
4.
Create a Viewerdisplaypanel tool for rendering.
5.
Register the mdd Viewerdisplaydata tool on the mdp Viewerdisplaypanel tool. At this point, the raster should now be visible somewhere on your screen.
6.
Print a copy of the raster on the screen to the named PostScript file, at a nice high resolution of 300 dots per inch.
7.
Destroy the Viewerdisplaydata tool.
8.
Destroy the Viewerdisplaypanel tool.

Tools
skycatalog Tool to create and manipulate Viewer tool readable skycatalog tables
viewer Tool for viewing AIPS++ images and arrays
viewerannotations Tool for drawing annotations onto a displaypanel.
viewercanvasmanager Tool for managing the canvases of Viewerdisplaypanel tools
viewercanvasprintmanager Tool for managing the printing of canvases of Viewerdisplaypanel tools
viewercolormapmanager Tool for managing colormaps used by the Viewer tool
viewerdatamanager Tool for importing data into the Viewer
viewerdisplaydata Tool for managing the drawing of AIPS++ data
viewerdisplaypanel Tool for providing drawing windows (canvases)
viewerslicedp Tool for providing 3D slice canvases
viewerstandardgui Interface for operating Viewer tool graphical user interfaces

Functions
is_viewer Is the argument a viewer tool?


next up previous contents index
Next: viewer - Tool Up: viewer - Module Previous: Resources   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15