The scientific graphics toolkit a technical overview
Download
1 / 34

The - PowerPoint PPT Presentation


  • 346 Views
  • Updated On :

The Scientific Graphics Toolkit (A Technical Overview) Donald Denbo UW-JISAO/NOAA-PMEL http://www.epic.noaa.gov/java/sgt Introduction The Scientific Graphics Toolkit (SGT) is a collection of Java classes and interfaces to create graphical applications.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'The' - jacob


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
The scientific graphics toolkit a technical overview l.jpg

TheScientific Graphics Toolkit(A Technical Overview)

Donald Denbo

UW-JISAO/NOAA-PMEL

http://www.epic.noaa.gov/java/sgt


Introduction l.jpg
Introduction

  • The Scientific Graphics Toolkit (SGT) is a collection of Java classes and interfaces to create graphical applications.

  • SGT is a toolkit, not an application. Using SGT requires moderate Java programming skills.

  • SGT does have several classes that make creating a graphical application easier, but using SGT does require producing code.

  • With a modicum of effort a Java programmer can, using SGT, create graphical Java applications that are easy to use.

  • SGT has had 5588 downloads to 2393 unique sites in 60 countries since March 2000 (as of Jan 7, 2002).

NVODS/DODS Technical Workshop


History l.jpg
History

  • Sgt was developed to allow a NOAAServer user to interactively preview data and overlay plots.

  • Originally developed using jdk 1.0.3, now uses jdk 1.1.x. Next release will require jdk 1.2 or newer.

  • Tutorial made available October 25, 2001.

  • SGT release dates

    • 1.0 – March 20, 2000

    • 2.0 – March 14, 2001

    • 2.1 – December 14, 2001

NVODS/DODS Technical Workshop


Sgt applications l.jpg
SGT Applications

  • OceanShare

    • a collaborative tool for distributed in situ data visualization

    • Being customized for Fisheries-Oceanography use

      • http://www.epic.noaa.gov/collab/ (pdf paper)

  • ncBrowse

    • a netCDF file browser for local and remote netCDF files

      • http://www.epic.noaa.gov/java/ncBrowse/(power point presentation)

    • 3452 downloads to 1680 unique sites in 48 countries since February 2000 (as of Jan 7, 2002).

  • Climate Data Portal client

    • A distributed in-situ data application

      • http://www.epic.noaa.gov/cdp/(power point presentation)

    • Although the CDPclient has not been publicly released, it has had 125 downloads to 51 unique sites in 6 countries.

NVODS/DODS Technical Workshop


Outline l.jpg
Outline

  • Demos and Examples

  • Technical Issues

    • Design philosophy & Goals

    • Using standard Java idioms

    • Design Patterns

  • Architecture

  • Real world applications using SGT

NVODS/DODS Technical Workshop


Outline6 l.jpg
Outline

  • Demos and Examples (applet demo)

  • Technical Issues

    • Design philosophy & Goals

    • Using standard Java idioms

    • Design Patterns

  • Architecture

  • Real world applications using SGT

NVODS/DODS Technical Workshop


Taomap l.jpg
TAOMap

  • Plot built from basic sgt components

  • Uses ValueIcon, which implements Draggable

  • Uses a Point Key, which implementsMoveable andSelectable

http://www.epic.noaa.gov/java/sgt/sgt_demos.shtml

NVODS/DODS Technical Workshop


Jrealtimedemo l.jpg
JRealTimeDemo

  • Built from basic sgt components.

  • Data class uses PropertyChangeEvents to notify sgt.

  • Sgt then updates plot.

NVODS/DODS Technical Workshop


Jvectordemo l.jpg
JVectorDemo

  • Uses JPlotLayoutwhich provides:

    • Zoom

    • LayerChildselection

  • Vector head style is HEAD, where vector head is unscaled.

http://www.epic.noaa.gov/java/sgt/sgt_demos.shtml

NVODS/DODS Technical Workshop


Jgriddemo l.jpg
JGridDemo

  • Uses JPlotLayoutwhich provides:

    • Zoom

    • LayerChildselection

  • GridAttributeis initially set to RASTER_CONTOUR style.

http://www.epic.noaa.gov/java/sgt/sgt_demos.shtml

NVODS/DODS Technical Workshop


Outline11 l.jpg
Outline

  • Demos and Examples

  • Technical Issues

    • Design philosophy & Goals

    • Using standard Java idioms

    • Design Patterns

  • Architecture

  • Real world applications using SGT

NVODS/DODS Technical Workshop


Design philosophy goals l.jpg
Design Philosophy & Goals

  • Don’t provide too much functionality in the toolkit

    • Require developer to disambiguate zoom request (which layer)

    • Use interfaces for data model specification

    • Hide as much of the internal machinery as possible

  • Provide utility classes to support developer

    • Dialogs to set/edit graphics properties

    • Plot layout class to support simple graphics

    • Basic implementations of data model interfaces

  • Keep toolkit flexible and extensible

  • GIS style layer approach

  • Support several display types

    • Time series/Time axes

    • X-Y plot

    • 2-D contour and “pixel” plots

    • Vector plot

    • Point-Value plot

NVODS/DODS Technical Workshop


Using standard java idioms don t reinvent the wheel l.jpg
Using standard Java idioms(don’t reinvent the wheel)

  • Basic graphics toolkits

    • AWT support (now being deprecated)

      • Pane is a container

      • Printing

    • Swing support

      • Scrolling

      • Printing

      • Repaint (refresh)

      • Minimum, maximum, and preferred size

      • JPane is a container

    • JavaBeans idiom

      • Use set/get for parameters

      • Use add/remove for event listeners

      • Use set/is for boolean parameters

NVODS/DODS Technical Workshop


Don t reinvent the wheel cont l.jpg
Don’t reinvent the wheel (cont…)

  • Events

    • Mouse events

      • Trapped by SGT

        • Object selection

        • Object move/drag operations

        • Zoom rectangle handling

      • Passed on by SGT

        • All others…

    • SGT internal events (not really events!)

      • Add/remove SGT components

      • Modify component appearance (eg. Label, axis)

    • Property change events

      • When a property changes value (eg. LineAttribute)

      • When a value changes in a data object

      • When the range of a data object changes

NVODS/DODS Technical Workshop


Design patterns l.jpg
Design Patterns

  • Strategy. Define a family of algorithms, encapsulate each one, and make them interchangeable.

    • Transform, TimeAxisStyle, CartesianRenderer

  • Proxy. Provide a surrogate or placeholder for another object to control access to it.

    • Pane, JPane

  • Abstract Factory. Provide an interface for creating families of related or dependent objects without specifying their concrete classes.

    • CartesianRenderer, GridCartesianRenderer, LineCartesianRenderer, VectorCartesianRenderer, PointCartesianRenderer

NVODS/DODS Technical Workshop


More design patterns l.jpg
More Design Patterns

  • Interface. Keep a class that uses data and services provided by instances of other classes independent of those classes by having it access those instances through an interface.

    • SGTData, SGTGrid, SGTLine, etc

    • IndexedColor, TransformColor, TransformAccess

    • LayerChild, Moveable, Selectable, Draggable

  • Façade. Provide a unified interface to a set of interfaces in a subsystem.

    • JPlotLayout

NVODS/DODS Technical Workshop


Outline17 l.jpg
Outline

  • Demos and Examples

  • Technical Issues

    • Design philosophy & Goals

    • Using standard Java idioms

    • Design Patterns

  • Architecture

  • Real world applications using SGT

NVODS/DODS Technical Workshop


Core architecture l.jpg
Core Architecture

  • Three coordinate systems

    • Device – lowest level in pixels

    • Physical – lower-left origin

    • User – user defined

  • Three main components

    • Pane/JPane – extends Container/JLayeredPane

    • Layer – physical units, used to build plot

    • Graph – user units, axes, renders data (presently only CartesianGraph is implemented)

NVODS/DODS Technical Workshop


Core structure l.jpg
Core structure

NVODS/DODS Technical Workshop


Layers l.jpg
Layers

  • Contain a single Graph object and many LayerChild objects.

  • Many Layers can be associated with a single Pane

  • Layers can share AxisTransforms via their CartesianGraph objects

  • LayerChild objects use physical coordinates

NVODS/DODS Technical Workshop



Rendering data l.jpg
Rendering data

  • A CartesianGraph object aggregates:

    • Zero or more X or Y axes

    • A renderer appropriate for the data type and attribute (e.g., PointCartesianRenderer, LineCartesianRenderer, or GridCartesianRenderer)

    • One X AxisTransform

    • One Y AxisTransform

  • AxisTransforms provide a user to physical coordinate transformation for space or time

NVODS/DODS Technical Workshop



Space and time axes l.jpg
Space and Time Axes

  • SpaceAxis provides a visual scale for the spatial user to physical coordinate transform

  • TimeAxis creates a visual scale for the GeoDate to physical coordinate transform

  • TimeAxis has several “styles” that can be used depending on the temporal span

    • Minute-Hour

    • Hour-Day

    • Day-Month

    • Month-Year

    • Year-Decade

NVODS/DODS Technical Workshop



Sgt data model l.jpg
Sgt Data Model

  • Data model needs to

    • Support X-Y, contour, raster, vector, and point plots

    • Be compact and “light-weight”

    • Throw events to notify applications of data and/or range changes.

  • Accomplished the above by

    • Supporting “plottable” objects

      • One- and two-dimensional arrays

      • Coordinate information

      • Units and titles

    • Data model implemented using java interfaces

NVODS/DODS Technical Workshop



Mouse events l.jpg
Mouse Events

  • Mouse events are pre-processed by Pane

  • Events passed to the user are

    • Object selection

    • Zoom rectangle selected

  • PropertyChangeEvents thrown are

    • objectSelected

    • zoomRectangle

  • Events processed by sgt are

    • Object move

    • Object drag

NVODS/DODS Technical Workshop


Outline29 l.jpg
Outline

  • Demos and Examples

  • Technical Issues

    • Design philosophy & Goals

    • Using standard Java idioms

    • Design Patterns

  • Architecture

  • Real world applications using SGT

NVODS/DODS Technical Workshop


Ncbrowse l.jpg
ncBrowse

  • ncBrowse was developed to browse netCDF files.

  • Uses JPlotLayout which provides:

    • Zoom

    • LayerChild selection

http://www.epic.noaa.gov/java/ncBrowse

NVODS/DODS Technical Workshop


Climate data portal client l.jpg
Climate Data Portal Client

  • Client developed to plot data from distributed data servers.

  • Data from multiple servers can be combined on a single plot.

  • Uses JPlotLayout

    • Line Plots

    • Area Plots

http://www.epic.noaa.gov/cdp/

NVODS/DODS Technical Workshop


Oceanshare l.jpg
OceanShare

  • OceanShare provides

    • Collaborative work environment

    • Local and network access of data sets

    • Access to Habanero tools (whiteboard, chat, etc.)

  • Implemented using LineProfileLayout

    • Line style (highlight, mark, or solid)

    • Line color

    • Interactive zoom

    • UserIcon and ValueIcon(implements LayerChild interface)

http://www.epic.noaa.gov/collab/

NVODS/DODS Technical Workshop


What next l.jpg
What next?

  • Finish GridAttributeDialog. (enables GridAttribute, contour, and ColorMap editing.)

  • Next version (2.2) will

    • use Java2D to provide native support of physical to device coordinate transformation

    • Remove deprecated classes and drop jdk1.1 support

NVODS/DODS Technical Workshop


Real world applications using sgt l.jpg
Real World Applications using SGT

  • SGT – Java graphics toolkit

    • A Tutorial of the Scientific Graphics Toolkit, NOAATech 2002.

    • “Interactive Graphics Toolkit for Java Applications and Web Applets”, American Meteorological Society paper, January 2001.

    • SGT home page.

  • ncBrowse – netCDF file browser

    • ncBrowse home page.

  • OceanShare – collaborative tool for distributed in-situ data “OceanShare: Interactive Access to Distributed In Situ Data in a Collaborative Tool Environment”, American Meteorological Society paper, January 2000.

    • GOIN 99 Presentation.

  • Climate Data Portal – distributed in-situ data access

    • Climate Data Portal home page.

NVODS/DODS Technical Workshop


ad