    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Interface ncsa.horizon.viewable.Viewable

public interface Viewable
extends Object

Defines the interface for accessing 2 dimensional views into data

##

getCoordSys()
  Returns a CoordinateSystem object associated with the Viewable.
getData()
  Returns an N-dimensional chunk of the image data in its native format.
getData(Volume)
  Returns an N-dimensional chunk of the image data in its native format.
getMetadata()
  Return a copy of the metadata associated with this data set
getNaxes()
  Returns the dimension of the data.
getSize()
  Returns an array containing the extent of the data.
getView()
  Creates a (2-D) view into the image data.
getView(Slice)
  Create a (2-D) view from a slice into the image data.
getView(Slice, ColorModel, boolean)
  Create a (2-D) view from a slice into the image data and a given color model.

##

getView

      public abstract Image getView()

  Creates a (2-D) view into the image data. This no-argument version should return a reasonable default view of the image data, e.g., a subsampled version of a very large image, or representative plane from an animation sequence. Versions with other parameters specific to the type of image data used should be defined, e.g., specifying arbitrary slices from volume data.

  Returns:
    A java.awt.Image object (null on failure)

getView

      public abstract Image getView(Slice slice)

  Create a (2-D) view from a slice into the image data.
  Parameters:
    Slice - region of data to make into an image
  Returns:
    A java.awt.Image object (null on failure)

getView

      public abstract Image getView(Slice slice,
                                    ColorModel colorModel,
                                    boolean makeDefault)

  Create a (2-D) view from a slice into the image data and a given color model.
  Parameters:
    Slice - region of data to make into an image
    colorModel - a java.awt.image.ColorModel to apply to the returned Image object, if possible. If this is null, use the Viewable's default colormodel
    makeDefault - if true make this slice be the viewable's default view, if possible

  Returns:
    A java.awt.Image object (null on failure)

getData

      public abstract Object getData()

  Returns an N-dimensional chunk of the image data in its native format. This no-argument version should return all the data in the image. Versions with other parameters specific to the type of image data used may be defined, e.g., specifying alternate return value types for the data.

  Returns:
    An object; generally an N-dimensional array (null on failure)

getData

      public abstract Object getData(Volume vol)

  Returns an N-dimensional chunk of the image data in its native format. This is the very general, everything-specified version. The minima and maxima arrays should have a number of elements equal to the dimension of the image data, and should define an N-dimensional subregion of the data. Array indexing is zero-based.

  Parameters:
    vol - region of data desired

  Returns:
    An object; generally an N-dimensional array (null on failure)

  Throws: IllegalArgumentException
    An illegal argument was passes in

getNaxes

      public abstract int getNaxes()

  Returns the dimension of the data.

  Returns:
    An integer representing the dimensionality of (i.e. the number of axes) the data.

getSize

      public abstract int[] getSize()

  Returns an array containing the extent of the data. The length of the array will be equal to the dimension of the data.

  Returns:
    An integer array specifying the size of the data in each dimension.

getMetadata

      public abstract Metadata getMetadata()

  Return a copy of the metadata associated with this data set

getCoordSys

      public abstract CoordinateSystem getCoordSys()

  Returns a CoordinateSystem object associated with the Viewable.

  Returns:
    A CoordinateSystem object (null if none present)

    All Packages  Class Hierarchy  This Package  Previous  Next  Index