Class AbstractImagePreparation

    • Field Detail

      • m_Errors

        protected List<String> m_Errors
        for storing errors.
      • m_Warnings

        protected List<String> m_Warnings
        for storing warnings.
      • m_Stopped

        protected boolean m_Stopped
        whether the preparation was stopped.
    • Constructor Detail

      • AbstractImagePreparation

        public AbstractImagePreparation()
    • Method Detail

      • hasErrors

        public boolean hasErrors()
        Checks whether there are any errors recorded;
        Returns:
        true if at least one error recorded
      • getErrors

        public List<String> getErrors()
        Returns the errors.
        Returns:
        the errors
      • addError

        protected void addError​(String msg)
        Adds the error to its internal list of errors.
        Parameters:
        msg - the error message to add
      • hasWarnings

        public boolean hasWarnings()
        Checks whether there are any warnings recorded;
        Returns:
        true if at least one error recorded
      • getWarnings

        public List<String> getWarnings()
        Returns the warnings.
        Returns:
        the warnings
      • addWarning

        protected void addWarning​(String msg)
        Adds the warning to its internal list of warnings.
        Parameters:
        msg - the warnings message to add
      • check

        protected void check​(BufferedImage image)
        Checks whether the input can be used.

        Default implementation only checks whether image is not null.
        Parameters:
        image - the image to check
      • doProcess

        protected abstract BufferedImage doProcess​(BufferedImage image)
        Performs the actual processing of the image.
        Parameters:
        image - the image with the seedlings
        Returns:
        the processed image
      • process

        public BufferedImage process​(BufferedImage image)
        Processes the image.
        Parameters:
        image - the image with the seedlings
        Returns:
        the process image
      • stopExecution

        public void stopExecution()
        Stops the execution.
        Specified by:
        stopExecution in interface Stoppable