Package adams.data.io.input
Class IndividualImageSegmentationLayerReader
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.io.input.AbstractImageSegmentationAnnotationReader
-
- adams.data.io.input.IndividualImageSegmentationLayerReader
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,FileFormatHandler
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,ImageSegmentationAnnotationReader
,Serializable
public class IndividualImageSegmentationLayerReader extends AbstractImageSegmentationAnnotationReader
Uses a JPG as base image and indexed PNG files for the individual layers (0 = background, 1 = annotation).- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractBufferedImageTransformer
m_LayerTransformer
for processing the layers.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description IndividualImageSegmentationLayerReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected ImageSegmentationContainer
doRead(PlaceholderFile file)
Reads the image segmentation annotations.ImageSegmentationAnnotationWriter
getCorrespondingWriter()
Returns, if available, the corresponding writer.String
getDefaultFormatExtension()
Returns the default extension of the format.String
getFormatDescription()
Returns a string describing the format (used in the file chooser).String[]
getFormatExtensions()
Returns the extension(s) of the format.AbstractBufferedImageTransformer
getLayerTransformer()
Returns the image transformer to apply to the layer images.String
globalInfo()
Returns a string describing the object.String
layerTransformerTipText()
Returns the tip text for this property.void
setLayerTransformer(AbstractBufferedImageTransformer value)
Sets the image transformer to apply to the layer images.-
Methods inherited from class adams.data.io.input.AbstractImageSegmentationAnnotationReader
check, read
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_LayerTransformer
protected AbstractBufferedImageTransformer m_LayerTransformer
for processing the layers.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setLayerTransformer
public void setLayerTransformer(AbstractBufferedImageTransformer value)
Sets the image transformer to apply to the layer images.- Parameters:
value
- the image width
-
getLayerTransformer
public AbstractBufferedImageTransformer getLayerTransformer()
Returns the image transformer to apply to the layer images.- Returns:
- the transformer
-
layerTransformerTipText
public String layerTransformerTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getFormatDescription
public String getFormatDescription()
Returns a string describing the format (used in the file chooser).- Returns:
- a description suitable for displaying in the file chooser
-
getFormatExtensions
public String[] getFormatExtensions()
Returns the extension(s) of the format.- Returns:
- the extension (without the dot!)
-
getDefaultFormatExtension
public String getDefaultFormatExtension()
Returns the default extension of the format.- Returns:
- the default extension (without the dot!)
-
getCorrespondingWriter
public ImageSegmentationAnnotationWriter getCorrespondingWriter()
Returns, if available, the corresponding writer.- Specified by:
getCorrespondingWriter
in interfaceImageSegmentationAnnotationReader
- Specified by:
getCorrespondingWriter
in classAbstractImageSegmentationAnnotationReader
- Returns:
- the writer, null if none available
-
doRead
protected ImageSegmentationContainer doRead(PlaceholderFile file)
Reads the image segmentation annotations.- Specified by:
doRead
in classAbstractImageSegmentationAnnotationReader
- Parameters:
file
- the file to read from- Returns:
- the annotations
-
-