Class AbstractSubImagesGenerator

    • Field Detail

      • m_Prefix

        protected String m_Prefix
        the prefix to use when generating a report.
      • m_Partial

        protected boolean m_Partial
        whether to include partial hits.
      • m_FixInvalid

        protected boolean m_FixInvalid
        whether to fix the shapes of partial hits.
    • Constructor Detail

      • AbstractSubImagesGenerator

        public AbstractSubImagesGenerator()
    • Method Detail

      • setPrefix

        public void setPrefix​(String value)
        Sets the field prefix used in the report.
        Specified by:
        setPrefix in interface ObjectPrefixHandler
        Parameters:
        value - the field prefix
      • prefixTipText

        public String prefixTipText()
        Returns the tip text for this property.
        Specified by:
        prefixTipText in interface ObjectPrefixHandler
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setPartial

        public void setPartial​(boolean value)
        Sets whether to include partial hits.
        Parameters:
        value - true if to include partial hits
      • getPartial

        public boolean getPartial()
        Returns whether to include partial hits.
        Returns:
        true if to include partial hits
      • partialTipText

        public String partialTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setFixInvalid

        public void setFixInvalid​(boolean value)
        Sets whether to fix invalid shapes.
        Parameters:
        value - true if to fix invalid shapes
      • getFixInvalid

        public boolean getFixInvalid()
        Returns whether to fix invalid shapes.
        Returns:
        true if to fix invalid shapes
      • fixInvalidTipText

        public String fixInvalidTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the object, which can be displayed in the GUI.
        Specified by:
        getQuickInfo in interface QuickInfoSupporter
        Returns:
        null if no info available, otherwise short string
      • check

        protected void check​(BufferedImageContainer image)
        Checks whether the image can be processed.

        Default implementation only ensures that an image is present.
        Parameters:
        image - the image to check
      • transferObjects

        protected Report transferObjects​(Report oldReport,
                                         int x,
                                         int y,
                                         int width,
                                         int height)
        Generates a new report with only the objects that fall within the region.
        Parameters:
        oldReport - the old report to use as basis
        x - the left position of the region
        y - the top position of the region
        width - the width of the region
        height - the height of the region
        Returns:
        the new report with the subset of objects in the region
      • transferObjects

        protected Report transferObjects​(Report oldReport,
                                         Rectangle region)
        Generates a new report with only the objects that fall within the region.
        Parameters:
        oldReport - the old report to use as basis
        region - the region in which to locate objects
        Returns:
        the new report with the subset of objects in the region