Class AnnotateImage

    • Field Detail

      • m_AlternativeFileSuffix

        protected String m_AlternativeFileSuffix
        the alternative file suffix to use.
      • m_Prefix

        protected String m_Prefix
        the prefix to use in the report.
      • m_Suffix

        protected String m_Suffix
        the suffix to use for the labels.
      • m_Labels

        protected BaseString[] m_Labels
        the labels.
      • m_SelectionProcessor

        protected SelectionProcessor m_SelectionProcessor
        the selection processor to apply.
      • m_SelectionShapePainter

        protected SelectionShapePainter m_SelectionShapePainter
        the painter for the selection shape.
      • m_Overlay

        protected ImageOverlay m_Overlay
        the overlay to use for highlighting the objects.
      • m_Zoom

        protected double m_Zoom
        the zoom level.
    • Constructor Detail

      • AnnotateImage

        public AnnotateImage()
    • Method Detail

      • setReader

        public void setReader​(AbstractReportReader value)
        Sets the reader setup to use for reading the object locations from the spreadsheet.
        Parameters:
        value - the reader
      • getReader

        public AbstractReportReader getReader()
        Returns the reader setup to use for reading the object locations from the spreadsheet.
        Returns:
        the reader
      • readerTipText

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

        public void setAlternativeFileSuffix​(String value)
        Sets the alternative file suffix to use for locating the associated spreadsheet (eg '-rois').
        Parameters:
        value - the suffix
      • getAlternativeFileSuffix

        public String getAlternativeFileSuffix()
        Returns the alternative file suffix to use for locating the associated spreadsheet (eg '-rois').
        Returns:
        the suffix
      • alternativeFileSuffixTipText

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

        public void setPrefix​(String value)
        Sets the field prefix to use for the located objects.
        Specified by:
        setPrefix in interface ObjectPrefixHandler
        Parameters:
        value - the field prefix
      • getPrefix

        public String getPrefix()
        Returns the field prefix to use for the located objects.
        Specified by:
        getPrefix in interface ObjectPrefixHandler
        Returns:
        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.
      • setSuffix

        public void setSuffix​(String value)
        Sets the field suffix to use for the labels.
        Parameters:
        value - the field suffix
      • getSuffix

        public String getSuffix()
        Returns the field suffix to use for the labels.
        Returns:
        the field suffix
      • suffixTipText

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

        public void setLabels​(BaseString[] value)
        Sets the labels to use.
        Parameters:
        value - the labels
      • getLabels

        public BaseString[] getLabels()
        Returns the labels to use.
        Returns:
        the labels
      • labelsTipText

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

        public void setSelectionProcessor​(SelectionProcessor value)
        Sets the selection processor to use.
        Parameters:
        value - the processor
      • getSelectionProcessor

        public SelectionProcessor getSelectionProcessor()
        Returns the selection processor in use.
        Returns:
        the processor
      • selectionProcessorTipText

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

        public void setSelectionShapePainter​(SelectionShapePainter value)
        Sets the painter for the selection shape.
        Parameters:
        value - the painter
      • getSelectionShapePainter

        public SelectionShapePainter getSelectionShapePainter()
        Returns the painter for the selection shape.
        Returns:
        the painter
      • selectionShapePainterTipText

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

        public void setOverlay​(ImageOverlay value)
        Sets the overlay to use for highlighting the objects.
        Parameters:
        value - the overlay
      • getOverlay

        public ImageOverlay getOverlay()
        Returns the overlay to use for highlighting the objects.
        Returns:
        the overlay
      • overlayTipText

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

        public void setZoom​(double value)
        Sets the zoom level in percent (0-1600).
        Parameters:
        value - the zoom, -1 to fit window, or 0-1600
      • getZoom

        public double getZoom()
        Returns the zoom level in percent.
        Returns:
        the zoom
      • zoomTipText

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

        public void setWriter​(AbstractReportWriter value)
        Sets the report writer to use for updating the report on disk.
        Parameters:
        value - the writer
      • getWriter

        public AbstractReportWriter getWriter()
        Returns the report writer to use for updating the report on disk.
        Returns:
        the writer
      • writerTipText

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

        public String[] getExtensions()
        Returns the list of extensions (without dot) that this handler can take care of.
        Specified by:
        getExtensions in interface ContentHandler
        Returns:
        the list of extensions (no dot)
      • determineReportFile

        protected File determineReportFile​(File file,
                                           boolean mustExist,
                                           boolean reader)
        Determines the report file file for the image.
        Parameters:
        file - the image file
        mustExist - whether the report must exist
        Returns:
        the report file, null if not available
      • loadReport

        protected Report loadReport​(File file)
        Loads the report associated with the image file.
        Parameters:
        file - the image file
        Returns:
        the report, null if not present or failed to load
      • loadContainer

        protected BufferedImageContainer loadContainer​(File file)
        Reads the image and any associated report.
        Parameters:
        file - the image to read
        Returns:
        the generated container
      • saveReport

        protected void saveReport​(ImageAnnotator.AnnotatorPanel panel,
                                  File file)
        Saves the report of the panel to disk.
        Parameters:
        file - the image file for determining the report file