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_Bitmasks
the 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.int
getNumBitmasks()
Returns the number of bitmasks stored.boolean
hasBitmasks()
Checks whether a bitmask is present.protected void
initialize()
Initializes the members.void
setBitmasks(BufferedImage[] value)
Stores the bitmasks.String
toString()
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:
initialize
in classAbstractSimpleContainer<BufferedImage>
-
hasBitmasks
public boolean hasBitmasks()
Checks whether a bitmask is present.- Specified by:
hasBitmasks
in interfaceBitmaskContainer<BufferedImage>
- Returns:
- true if present
-
getNumBitmasks
public int getNumBitmasks()
Returns the number of bitmasks stored.- Specified by:
getNumBitmasks
in interfaceBitmaskContainer<BufferedImage>
- Returns:
- the number of masks
-
setBitmasks
public void setBitmasks(BufferedImage[] value)
Stores the bitmasks.- Specified by:
setBitmasks
in interfaceBitmaskContainer<BufferedImage>
- Parameters:
value
- the bitmasks to store, null to remove
-
getBitmasks
public BufferedImage[] getBitmasks()
Returns the stored bitmasks.- Specified by:
getBitmasks
in interfaceBitmaskContainer<BufferedImage>
- Returns:
- the bitmasks, null if none store
-
toString
public String toString()
Returns a string representation of the container.- Overrides:
toString
in classBufferedImageContainer
- Returns:
- the string representation
-
-