Class 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 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_LabelKey

        protected String m_LabelKey
        the meta-data key with the label.
    • Constructor Detail

      • PascalVOCObjectLocationsWriter

        public PascalVOCObjectLocationsWriter()
    • Method Detail

      • 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:
        writeData in class AbstractReportWriter<Report>
        Parameters:
        data - the data to write
        Returns:
        true if successfully written