Class SimpleImageSegmentationAnnotationsHandler

    • Field Detail

      • m_Reader

        protected ImageReader m_Reader
        the image reader to use.
      • m_OverlayReader

        protected ImageReader m_OverlayReader
        the image reader to use for the overlay.
      • m_Colorizer

        protected ImageColorizer m_Colorizer
        the image colorizer to use.
      • m_Alpha

        protected int m_Alpha
        the alpha value to use for the overlay (0: transparent, 255: opaque).
    • Constructor Detail

      • SimpleImageSegmentationAnnotationsHandler

        public SimpleImageSegmentationAnnotationsHandler()
    • Method Detail

      • setReader

        public void setReader​(ImageReader value)
        Sets the image reader to use.
        Parameters:
        value - the image reader
      • getReader

        public ImageReader getReader()
        Returns the image reader to use.
        Returns:
        the image reader
      • readerTipText

        public String readerTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setOverlayReader

        public void setOverlayReader​(ImageReader value)
        Sets the image reader to use for the overlay.
        Parameters:
        value - the image reader
      • getOverlayReader

        public ImageReader getOverlayReader()
        Returns the image reader to use for the overlay.
        Returns:
        the image reader
      • overlayReaderTipText

        public String overlayReaderTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setColorizer

        public void setColorizer​(ImageColorizer value)
        Sets the image colorizer to use.
        Parameters:
        value - the image colorizer
      • getColorizer

        public ImageColorizer getColorizer()
        Returns the image colorizer to use.
        Returns:
        the colorizer
      • colorizerTipText

        public String colorizerTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setAlpha

        public void setAlpha​(int value)
        Sets the alpha value to use for the overlay: 0=transparent, 255=opaque.
        Parameters:
        value - the alphae value
      • getAlpha

        public int getAlpha()
        Returns the alpha value to use for the overlay: 0=transparent, 255=opaque.
        Returns:
        the alpha value
      • alphaTipText

        public String alphaTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • getExtensions

        public String[] getExtensions()
        Returns the list of extensions (without dot) that this handler can take care of.
        Returns:
        the list of extensions (no dot)
      • locateAnnotation

        protected File locateAnnotation​(File file)
        Locates the annotation PNG file.
        Parameters:
        file - the JPG file
        Returns:
        the annotation file or null if failed to locate
      • generateOverlay

        protected BufferedImage generateOverlay​(File file,
                                                MessageCollection errors)
        Generates the overlay image.
        Parameters:
        file - the file to generate the overlay for
        errors - for collecting errors
        Returns:
        the overlay, null in case of errors