Class AbstractMovieImageSampler<T extends adams.data.image.AbstractImageContainer>

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, adams.core.Stoppable, Serializable
    Direct Known Subclasses:
    AbstractBufferedImageMovieImageSampler

    public abstract class AbstractMovieImageSampler<T extends adams.data.image.AbstractImageContainer>
    extends adams.core.option.AbstractOptionHandler
    implements adams.core.Stoppable
    Ancestor for classes that sample images from movies.
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean m_Stopped
      whether the sampler was stopped.
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void check​(File file)
      Performs some checks on the movie file.
      protected abstract T[] doSample​(File file)
      Samples images from a movie file.
      abstract Class generates()
      Returns the type of image container the sample generates.
      T[] sample​(File file)
      Samples images from a movie file.
      void stopExecution()
      Stops the execution.
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
    • Field Detail

      • m_Stopped

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

      • AbstractMovieImageSampler

        public AbstractMovieImageSampler()
    • Method Detail

      • generates

        public abstract Class generates()
        Returns the type of image container the sample generates.
        Returns:
        the image container class
      • check

        protected void check​(File file)
        Performs some checks on the movie file.

        Default implementation only ensures that the file exists and is not a directory.
        Parameters:
        file - the file to check
      • doSample

        protected abstract T[] doSample​(File file)
        Samples images from a movie file.
        Parameters:
        file - the movie to sample
        Returns:
        the samples, null if failed to sample
      • sample

        public T[] sample​(File file)
        Samples images from a movie file.
        Parameters:
        file - the movie to sample
        Returns:
        the samples, null if failed to sample
      • stopExecution

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