Package adams.data.io.output
Class PascalVOCObjectLocationsWriter
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.io.output.AbstractReportWriter<Report>
-
- adams.data.io.output.PascalVOCObjectLocationsWriter
-
- All Implemented Interfaces:
CleanUpHandler,Destroyable,GlobalInfoSupporter,FileFormatHandler,LoggingLevelHandler,LoggingSupporter,OptionHandler,ShallowCopySupporter<AbstractReportWriter>,SizeOfHandler,ReportWriter<Report>,Serializable,Comparable
public class PascalVOCObjectLocationsWriter extends AbstractReportWriter<Report>
Writes the annotations in Pascal VOC format.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING min-user-mode: Expert
-output <adams.core.io.PlaceholderFile> (property: output) The file to write the report to. default: ${TMP}/out.xml-finder <adams.data.objectfinder.ObjectFinder> (property: finder) The object finder to use for selecting a subset of objects before generating the output. default: adams.data.objectfinder.AllFinder
-width <int> (property: width) The width of the image to use when reading normalized coordinates/dimensions. default: 640 minimum: 1
-height <int> (property: height) The height of the image to use when reading normalized coordinates/dimensions. default: 480 minimum: 1
-image <adams.core.io.PlaceholderFile> (property: image) The corresponding image. If pointing to a directory, path and name will be guessed. default: ${CWD}-label-key <java.lang.String> (property: labelKey) The key in the meta-data containing the label, ignored if empty. default: type
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ObjectFinderm_Finderthe row finder to apply before extracting the objects.protected intm_Heightthe image height to use as basis for normalized coordinates/dimensions.protected PlaceholderFilem_Imagethe corresponding image.protected Stringm_LabelKeythe meta-data key with the label.protected intm_Widththe image width to use as basis for normalized coordinates/dimensions.-
Fields inherited from class adams.data.io.output.AbstractReportWriter
m_Output
-
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 PascalVOCObjectLocationsWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.StringfinderTipText()Returns the tip text for this property.ObjectFindergetFinder()Returns the object finder to use.StringgetFormatDescription()Returns a string describing the format (used in the file chooser).String[]getFormatExtensions()Returns the extension of the format.intgetHeight()Returns the height of the image to use when reading normalized coordinates/dimensions.PlaceholderFilegetImage()Returns the corresponding image.StringgetLabelKey()Returns the key in the meta-data containing the label.intgetWidth()Returns the width of the image to use when reading normalized coordinates/dimensions.StringglobalInfo()Returns a string describing the object.StringheightTipText()Returns the tip text for this property.StringimageTipText()Returns the tip text for this property.StringlabelKeyTipText()Returns the tip text for this property.voidsetFinder(ObjectFinder value)Sets the object finder to use.voidsetHeight(int value)Sets the height of the image to use when reading normalized coordinates/dimensions.voidsetImage(PlaceholderFile value)Sets the corresponding image.voidsetLabelKey(String value)Sets the key in the meta-data containing the label.voidsetWidth(int value)Sets the width of the image to use when reading normalized coordinates/dimensions.StringwidthTipText()Returns the tip text for this property.protected booleanwriteData(Report data)Performs the actual writing.-
Methods inherited from class adams.data.io.output.AbstractReportWriter
checkData, cleanUp, compareTo, destroy, equals, forCommandLine, forName, getDefaultFormatExtension, getOutput, getWriters, outputTipText, reset, setOutput, shallowCopy, shallowCopy, write
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, toCommandLine, toString
-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Finder
protected ObjectFinder m_Finder
the row finder to apply before extracting the objects.
-
m_Width
protected int m_Width
the image width to use as basis for normalized coordinates/dimensions.
-
m_Height
protected int m_Height
the image height to use as basis for normalized coordinates/dimensions.
-
m_Image
protected PlaceholderFile m_Image
the corresponding image.
-
m_LabelKey
protected String m_LabelKey
the meta-data key with the label.
-
-
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 classAbstractReportWriter<Report>
-
getFormatDescription
public String getFormatDescription()
Returns a string describing the format (used in the file chooser).- Specified by:
getFormatDescriptionin interfaceFileFormatHandler- Specified by:
getFormatDescriptionin classAbstractReportWriter<Report>- Returns:
- a description suitable for displaying in the file chooser
-
getFormatExtensions
public String[] getFormatExtensions()
Returns the extension of the format.- Specified by:
getFormatExtensionsin interfaceFileFormatHandler- Specified by:
getFormatExtensionsin classAbstractReportWriter<Report>- Returns:
- the extension (without the dot!)
-
setFinder
public void setFinder(ObjectFinder value)
Sets the object finder to use.- Parameters:
value- the finder
-
getFinder
public ObjectFinder getFinder()
Returns the object finder to use.- Returns:
- the finder
-
finderTipText
public String finderTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setWidth
public void setWidth(int value)
Sets the width of the image to use when reading normalized coordinates/dimensions.- Parameters:
value- the image width
-
getWidth
public int getWidth()
Returns the width of the image to use when reading normalized coordinates/dimensions.- Returns:
- the image width
-
widthTipText
public String widthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setHeight
public void setHeight(int value)
Sets the height of the image to use when reading normalized coordinates/dimensions.- Parameters:
value- the image height
-
getHeight
public int getHeight()
Returns the height of the image to use when reading normalized coordinates/dimensions.- Returns:
- the image height
-
heightTipText
public String heightTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setImage
public void setImage(PlaceholderFile value)
Sets the corresponding image.- Parameters:
value- the corresponding image.
-
getImage
public PlaceholderFile getImage()
Returns the corresponding image.- Returns:
- the corresponding image
-
imageTipText
public String imageTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setLabelKey
public void setLabelKey(String value)
Sets the key in the meta-data containing the label.- Parameters:
value- the key
-
getLabelKey
public String getLabelKey()
Returns the key in the meta-data containing the label.- Returns:
- the key
-
labelKeyTipText
public String labelKeyTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
writeData
protected boolean writeData(Report data)
Performs the actual writing.- Specified by:
writeDatain classAbstractReportWriter<Report>- Parameters:
data- the data to write- Returns:
- true if successfully written
-
-