uk.ac.essex.ia.imageview
Class ImageFile

java.lang.Object
  extended by uk.ac.essex.common.gui.ApplicationFileImpl<ImageData>
      extended by uk.ac.essex.ia.imageview.ImageFile
All Implemented Interfaces:
ApplicationFile<ImageData>

public class ImageFile
extends ApplicationFileImpl<ImageData>

An Image file wraps all the data about an open image in ImageViewer.

See Also:
You should have received a copy of GNU public license with this code. If not please visit this site

Field Summary
 
Fields inherited from class uk.ac.essex.common.gui.ApplicationFileImpl
data, DEFAULT_NAME, file, isModified, name
 
Constructor Summary
ImageFile(java.awt.image.RenderedImage renderedImage)
          This takes a rendered image and (WILL) consult the pref manager as to whether to load the statistics and the histogram.
ImageFile(java.awt.image.RenderedImage renderedImage, java.io.File file)
           
ImageFile(java.awt.image.RenderedImage renderedImage, javax.media.jai.Histogram histogram, java.io.File file)
          Initialise the data
 
Method Summary
 javax.media.jai.Histogram getHistogram()
           
 java.awt.image.RenderedImage getImage()
           
 java.lang.String getStatistics()
           
 boolean hasHistogram()
           
 void setHistogram(javax.media.jai.Histogram histogram)
           
 
Methods inherited from class uk.ac.essex.common.gui.ApplicationFileImpl
equals, getData, getFile, getName, hasFile, isModified, setData, setFile, setModified, setUseFullPathForName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageFile

public ImageFile(java.awt.image.RenderedImage renderedImage)
This takes a rendered image and (WILL) consult the pref manager as to whether to load the statistics and the histogram.


ImageFile

public ImageFile(java.awt.image.RenderedImage renderedImage,
                 java.io.File file)

ImageFile

public ImageFile(java.awt.image.RenderedImage renderedImage,
                 javax.media.jai.Histogram histogram,
                 java.io.File file)
Initialise the data

Parameters:
renderedImage - - The source image data
histogram - - The images histogram
file - - The file associated with the image
See Also:
ApplicationFileImpl.setFile(java.io.File), setHistogram(javax.media.jai.Histogram)
Method Detail

setHistogram

public void setHistogram(javax.media.jai.Histogram histogram)
Parameters:
histogram - - The images histogram

getImage

public java.awt.image.RenderedImage getImage()
Returns:
the image data

getHistogram

public javax.media.jai.Histogram getHistogram()
Returns:
the images histogram

hasHistogram

public boolean hasHistogram()

getStatistics

public java.lang.String getStatistics()