Package adams.data.image
Class AbstractImageContainer<T>
- java.lang.Object
-
- adams.data.container.AbstractSimpleContainer<T>
-
- adams.data.image.AbstractImageContainer<T>
-
- Type Parameters:
T- the type of image to handle
- All Implemented Interfaces:
CloneHandler<AbstractSimpleContainer<T>>,UniqueIDHandler,BufferedImageSupporter,MutableNotesHandler,NotesHandler,MutableReportHandler<Report>,ReportHandler<Report>,Serializable
- Direct Known Subclasses:
BoofCVImageContainer,BufferedImageContainer,OpenCVImageContainer
public abstract class AbstractImageContainer<T> extends AbstractSimpleContainer<T> implements BufferedImageSupporter
Ancestor for various image format containers.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringFIELD_FILENAMEthe field for the filename.static StringFIELD_NAMEthe field for the name.static StringFIELD_PATHthe field for the path.-
Fields inherited from class adams.data.container.AbstractSimpleContainer
m_Content, m_Notes, m_Report, m_UUID
-
-
Constructor Summary
Constructors Constructor Description AbstractImageContainer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract intgetHeight()Returns the height of the image.TgetImage()Returns the store image.abstract intgetWidth()Returns the width of the image.voidsetImage(T value)Sets the image to use.abstract BufferedImagetoBufferedImage()Turns the image into a buffered image.-
Methods inherited from class adams.data.container.AbstractSimpleContainer
cloneContent, getClone, getContent, getHeader, getNotes, getReport, getUniqueID, hasReport, initialize, setContent, setNotes, setReport, toString
-
-
-
-
Field Detail
-
FIELD_FILENAME
public static final String FIELD_FILENAME
the field for the filename.- See Also:
- Constant Field Values
-
FIELD_PATH
public static final String FIELD_PATH
the field for the path.- See Also:
- Constant Field Values
-
FIELD_NAME
public static final String FIELD_NAME
the field for the name.- See Also:
- Constant Field Values
-
-
Method Detail
-
setImage
public void setImage(T value)
Sets the image to use.- Parameters:
value- the image
-
getImage
public T getImage()
Returns the store image.- Returns:
- the image
-
getWidth
public abstract int getWidth()
Returns the width of the image.- Returns:
- the width
-
getHeight
public abstract int getHeight()
Returns the height of the image.- Returns:
- the height
-
toBufferedImage
public abstract BufferedImage toBufferedImage()
Turns the image into a buffered image.- Specified by:
toBufferedImagein interfaceBufferedImageSupporter- Returns:
- the buffered image
-
-