ITT Rule IDL Version 7.0 User Manual Page 140

  • Download
  • Add to my manuals
  • Print
  • Page
    / 430
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 139
140 Chapter 6: Creating a Visualization
Example: Image-Contour Visualization iTool Developers Guide
Example: Image-Contour Visualization
This example creates a visualization type named example1_visImageContour
that displays an image and overlays it with a contour based on the image data.
Example Code
The code for this example visualization type is included in the file
example1_visimagecontour__define.pro in the examples/doc/itools
subdirectory of the IDL distribution. Run the example procedure by entering
example1_visimagecontour__define at the IDL command prompt or view
the file in an IDL Editor window by entering
.EDIT
example1_visimagecontour__define.pro.
Class Definition File
The class definition for example1_visImageContour consists of an Init method,
an OnDataChangeUpdate method, and a class structure definition routine. Other
important methods — Cleanup, GetProperty, and SetProperty — are handled by the
superclass (
IDLitVisualization).
As with all object class definition files, the class structure definition routine is the last
routine in the file, and the file is given the same name as the class definition routine
(with the suffix
.pro appended).
Class Definition
PRO example1_visImageContour__define
struct = { example1_visImageContour, $
inherits IDLitVisualization, $
_oContour: OBJ_NEW(), $
_oImage: OBJ_NEW() $
}
END
Discussion
Our class definition routine creates an IDL structure variable with the name
example1_visImageContour, specifying that the structure inherits from the
IDLitVisualization class. The structure has two instance data fields named
_oContour and _oImage, which will contain object references to the
IDLitVisImage and IDLitVisContour objects that make up the
example1_visImageContour visualization.
Page view 139
1 2 ... 135 136 137 138 139 140 141 142 143 144 145 ... 429 430

Comments to this Manuals

No comments