Skip to content.
CCB > CCBSIGS > ShapeToolLibraryProgram > ShapeViewer > ShapeViewerExternalInterface

Shape Viewer External Interface

The ShapeViewer supports an interface that enables it to be used as a graphics display system by an application program able to use Java classes.

A Java program can use the the ShapeViewer via the following public static methods ShapeViewer:

ShapeViewer.main(String [] args)
uses command line arguments to instantiate a ShapeViewer.
ShapeViewer.abort(String msg)
terminates the ShapeViewer action, displaying 'msg' to the user.
ShapeViewer.display(Shape shape)
returns an IShape. Displays a Shape in the viewer.
ShapeViewer.remove(IShape shape)
remove an Ishape returned from a prior display() command.
ShapeVeiwer.command(String command)
Execute a script command in the ShapeViewer.

Various applications and toolkits allow access to Java classes. Matlab, in particular has an easily used java interface. Instructions on using the ShapeTools library from within matlab may be found here.


Data Structure definitions

Ishape class edu.ucla.loni.ccb.shapeviewer.IShape
used by the ShapeViewer to hold shape geometry and data.
Shape class edu.ucla.loni.ccb.shape.Shape
A ShapeTools data structure containing points, edges, face and related data attributes. Full details on using the ShapeTools library may be found in the loni ShapeTools software download package, and at this web site http://www.loni.ucla.edu/twiki/bin/view/CCB/ShapeToolsLibrary .