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
-
coord
-
-
defaultview
-
-
dimension
-
-
image
-
-
source
-
-
BasicViewable(Image)
- Constructs a new instance of a BasicViewable that wraps around a
already constructed java Image object;
-
BasicViewable(String)
- Constructs a new instance of a BasicViewable given a filename string.
-
BasicViewable(URL)
- Constructs a new instance of a BasicViewable given a URL.
-
getCoordSys()
- Implementation of a Viewable interface method.
-
getData()
- Implementation of a ncsa.horizon.viewable.Viewable interface method.
-
getData(Volume)
- Implementation of a ncsa.horizon.viewable.Viewable interface method.
-
getMetadata()
- Return the metadata associated with this viewable.
-
getNaxes()
- Returns the dimension of the data.
-
getSize()
- return the size of the dataset.
-
getView()
- Implementation of a Viewable interface method.
-
getView(Slice)
- Implementation of a ncsa.horizon.viewable.Viewable interface method.
-
getView(Slice, ColorModel, boolean)
- Implementation of a Viewable interface method.
-
imageUpdate(Image, int, int, int, int, int)
-
coord
protected CoordinateSystem coord
dimension
protected Dimension dimension
source
protected Object source
image
protected Image image
defaultview
protected Image defaultview
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.
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.
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
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
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
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.
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
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
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
getCoordSys
public CoordinateSystem getCoordSys()
- Implementation of a Viewable interface method.
This returns null.
- Returns:
- null
getMetadata
public Metadata getMetadata()
- Return the metadata associated with this viewable.
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).
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