ucar.nc2.dt.image
Class ImageDatasetFactory

java.lang.Object
  extended by ucar.nc2.dt.image.ImageDatasetFactory

public class ImageDatasetFactory
extends Object

A factory for buffered images

Author:
caron

Constructor Summary
ImageDatasetFactory()
           
 
Method Summary
 String getErrorMessages()
           
 BufferedImage getNextImage(boolean forward)
          This assumes you have opened a file.
 BufferedImage open(String location)
          Open from a URL: adde: use AddeImage.factory() http: use javax.imageio.ImageIO.read() file: javax.imageio.ImageIO.read()
 BufferedImage openDataset(GridDatatype grid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageDatasetFactory

public ImageDatasetFactory()
Method Detail

getErrorMessages

public String getErrorMessages()

openDataset

public BufferedImage openDataset(GridDatatype grid)
                          throws IOException
Throws:
IOException

open

public BufferedImage open(String location)
                   throws IOException
Open from a URL: adde: use AddeImage.factory() http: use javax.imageio.ImageIO.read() file: javax.imageio.ImageIO.read()

Parameters:
location - open from this location
Returns:
a BufferedImage
Throws:
IOException - on read error

getNextImage

public BufferedImage getNextImage(boolean forward)
This assumes you have opened a file. looks in the parent directory.

Parameters:
forward - if true got to next, else previous
Returns:
next file in the directory, as a BufferedImage.


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.