Package adams.data.image
Class BufferedImageBitmaskContainer
- java.lang.Object
-
- adams.data.container.AbstractSimpleContainer<T>
-
- adams.data.image.AbstractImageContainer<BufferedImage>
-
- adams.data.image.BufferedImageContainer
-
- adams.data.image.BufferedImageBitmaskContainer
-
- All Implemented Interfaces:
CloneHandler<AbstractSimpleContainer<BufferedImage>>,UniqueIDHandler,BitmaskContainer<BufferedImage>,BufferedImageSupporter,MutableNotesHandler,NotesHandler,MutableReportHandler<Report>,ReportHandler<Report>,Serializable
public class BufferedImageBitmaskContainer extends BufferedImageContainer implements BitmaskContainer<BufferedImage>
Container for storing a BufferedImage and its associated bitmask image.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BufferedImage[]m_Bitmasksthe bitmasks.-
Fields inherited from class adams.data.image.AbstractImageContainer
FIELD_FILENAME, FIELD_NAME, FIELD_PATH
-
Fields inherited from class adams.data.container.AbstractSimpleContainer
m_Content, m_Notes, m_Report, m_UUID
-
-
Constructor Summary
Constructors Constructor Description BufferedImageBitmaskContainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BufferedImage[]getBitmasks()Returns the stored bitmasks.intgetNumBitmasks()Returns the number of bitmasks stored.booleanhasBitmasks()Checks whether a bitmask is present.protected voidinitialize()Initializes the members.voidsetBitmasks(BufferedImage[] value)Stores the bitmasks.StringtoString()Returns a string representation of the container.-
Methods inherited from class adams.data.image.BufferedImageContainer
cloneContent, getHeight, getWidth, toBufferedImage
-
Methods inherited from class adams.data.image.AbstractImageContainer
getImage, setImage
-
Methods inherited from class adams.data.container.AbstractSimpleContainer
getClone, getContent, getHeader, getNotes, getReport, getUniqueID, hasReport, setContent, setNotes, setReport
-
-
-
-
Field Detail
-
m_Bitmasks
protected BufferedImage[] m_Bitmasks
the bitmasks.
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classAbstractSimpleContainer<BufferedImage>
-
hasBitmasks
public boolean hasBitmasks()
Checks whether a bitmask is present.- Specified by:
hasBitmasksin interfaceBitmaskContainer<BufferedImage>- Returns:
- true if present
-
getNumBitmasks
public int getNumBitmasks()
Returns the number of bitmasks stored.- Specified by:
getNumBitmasksin interfaceBitmaskContainer<BufferedImage>- Returns:
- the number of masks
-
setBitmasks
public void setBitmasks(BufferedImage[] value)
Stores the bitmasks.- Specified by:
setBitmasksin interfaceBitmaskContainer<BufferedImage>- Parameters:
value- the bitmasks to store, null to remove
-
getBitmasks
public BufferedImage[] getBitmasks()
Returns the stored bitmasks.- Specified by:
getBitmasksin interfaceBitmaskContainer<BufferedImage>- Returns:
- the bitmasks, null if none store
-
toString
public String toString()
Returns a string representation of the container.- Overrides:
toStringin classBufferedImageContainer- Returns:
- the string representation
-
-