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 AbstractBufferedImageTransformerm_LayerTransformerfor processing the layers.-
Fields inherited from class adams.data.io.input.AbstractImageSegmentationAnnotationReader
m_AlternativeAnnotationDir, m_UseAlternativeAnnotationDir
-
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 voiddefineOptions()Adds options to the internal list of options.protected ImageSegmentationContainerdoRead(PlaceholderFile file)Reads the image segmentation annotations.ImageSegmentationAnnotationWritergetCorrespondingWriter()Returns, if available, the corresponding writer.StringgetDefaultFormatExtension()Returns the default extension of the format.StringgetFormatDescription()Returns a string describing the format (used in the file chooser).String[]getFormatExtensions()Returns the extension(s) of the format.AbstractBufferedImageTransformergetLayerTransformer()Returns the image transformer to apply to the layer images.StringglobalInfo()Returns a string describing the object.StringlayerTransformerTipText()Returns the tip text for this property.voidsetLayerTransformer(AbstractBufferedImageTransformer value)Sets the image transformer to apply to the layer images.-
Methods inherited from class adams.data.io.input.AbstractImageSegmentationAnnotationReader
alternativeAnnotationDirTipText, check, getAlternativeAnnotationDir, getUseAlternativeAnnotationDir, read, setAlternativeAnnotationDir, setUseAlternativeAnnotationDir, useAlternativeAnnotationDirTipText
-
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:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractImageSegmentationAnnotationReader
-
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:
getCorrespondingWriterin interfaceImageSegmentationAnnotationReader- Specified by:
getCorrespondingWriterin classAbstractImageSegmentationAnnotationReader- Returns:
- the writer, null if none available
-
doRead
protected ImageSegmentationContainer doRead(PlaceholderFile file)
Reads the image segmentation annotations.- Specified by:
doReadin classAbstractImageSegmentationAnnotationReader- Parameters:
file- the file to read from- Returns:
- the annotations
-
-