Class ncsa.horizon.viewable.BasicViewable
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.horizon.viewable.BasicViewable

java.lang.Object
   |
   +----ncsa.horizon.viewable.BasicViewable

public class BasicViewable
extends Object
implements Viewable, ImageObserver

Variable Index

 o coord
 o defaultview
 o dimension
 o image
 o source

Constructor Index

 o BasicViewable(Image)
Constructs a new instance of a BasicViewable that wraps around a already constructed java Image object;
 o BasicViewable(String)
Constructs a new instance of a BasicViewable given a filename string.
 o BasicViewable(URL)
Constructs a new instance of a BasicViewable given a URL.

Method Index

 o getCoordSys()
Implementation of a Viewable interface method.
 o getData()
Implementation of a ncsa.horizon.viewable.Viewable interface method.
 o getData(Volume)
Implementation of a ncsa.horizon.viewable.Viewable interface method.
 o getMetadata()
Return the metadata associated with this viewable.
 o getNaxes()
Returns the dimension of the data.
 o getSize()
return the size of the dataset.
 o getView()
Implementation of a Viewable interface method.
 o getView(Slice)
Implementation of a ncsa.horizon.viewable.Viewable interface method.
 o getView(Slice, ColorModel, boolean)
Implementation of a Viewable interface method.
 o imageUpdate(Image, int, int, int, int, int)

Variables

 o coord
  protected CoordinateSystem coord
 o dimension
  protected Dimension dimension
 o source
  protected Object source
 o image
  protected Image image
 o defaultview
  protected Image defaultview

Constructors

 o BasicViewable
  public BasicViewable(URL _url)
Constructs a new instance of a BasicViewable given a URL.
Parameters:
_url - The URL of an image from which to create the Viewable.
 o BasicViewable
  public BasicViewable(String _filename)
Constructs a new instance of a BasicViewable given a filename string.
Parameters:
_filename - The complete filename of an image from which to create the Viewable. This is not a string representation of a URL, but the name of a file using the conventions of the local filesystem.
 o BasicViewable
  public BasicViewable(Image _image) throws NullPointerException
Constructs a new instance of a BasicViewable that wraps around a already constructed java Image object;
Parameters:
_image - the input Image object to wrap around; should not be null
Throws: s
NullPointerException if _image is null

Methods

 o getData
  public Object getData()
Implementation of a ncsa.horizon.viewable.Viewable interface method. This generic getData() returns all the data in the image. It currently returns null.

Returns:
s java.awt.Object which is a multidimensional array
 o getData
  public Object getData(Volume volume)
Implementation of a ncsa.horizon.viewable.Viewable interface method. This specific getData() returns a subregion of the data that makes up the URL image. This implementation always returns null.

Parameters:
volume - Specifies the subset of data to return.
Returns:
s java.awt.Object which is a multidimensional array
 o getNaxes
  public int getNaxes()
Returns the dimension of the data. This currently always returns the value 2.
Returns:
The dimensionality of the data; -1 if not available.
 o getView
  public Image getView(Slice slice)
Implementation of a ncsa.horizon.viewable.Viewable interface method. This specific getView() returns a subregion and/or resampled version of the URL image, and optionally makes this new image the default view.

Parameters:
slice - The 2-dimensional area of the image to return.
colorModel - The cooro model to use for the image.
makeDefault - True to make this slice the default view.
Returns:
s java.awt.Image
 o getView
  public Image getView()
Implementation of a Viewable interface method. This generic getView() returns either a previously defined default view, or the whole image at nominal resolution if no default has been defined.

Returns:
s java.awt.Image
 o getView
  public Image getView(Slice slice,
                       ColorModel colorModel,
                       boolean makeDefault)
Implementation of a Viewable interface method. This specific getView() returns a subregion and/or resampled version of the URL image, and optionally makes this new image the default view. This implementation ignores the color model parameter.

Parameters:
slice - The 2-dimensional area of the image to return.
colorModel - The cooro model to use for the image.
makeDefault - True to make this slice the default view.
Returns:
s java.awt.Image
 o getCoordSys
  public CoordinateSystem getCoordSys()
Implementation of a Viewable interface method. This returns null.

Returns:
null
 o getMetadata
  public Metadata getMetadata()
Return the metadata associated with this viewable.
 o getSize
  public int[] getSize()
return the size of the dataset. If the data is not loaded yet, this method will wait until it is (this will is not always good, so this will get changed in the future).
 o imageUpdate
  public boolean imageUpdate(Image img,
                             int infoflags,
                             int x,
                             int y,
                             int width,
                             int height)

All Packages  Class Hierarchy  This Package  Previous  Next  Index