Class LoadFileImageSequence2<T extends ImageBase<T>>

java.lang.Object
boofcv.io.wrapper.images.LoadFileImageSequence2<T>
All Implemented Interfaces:
SimpleImageSequence<T>

public class LoadFileImageSequence2<T extends ImageBase<T>>
extends Object
implements SimpleImageSequence<T>
Loads and optionally scales all the images in a list.
  • Constructor Details

    • LoadFileImageSequence2

      public LoadFileImageSequence2​(List<String> paths, ImageType<T> type)
      Will load an image sequence with no modification.
  • Method Details

    • setLoop

      public void setLoop​(boolean loop)
      Description copied from interface: SimpleImageSequence
      Sets if the video should loop or not
      Specified by:
      setLoop in interface SimpleImageSequence<T extends ImageBase<T>>
      Parameters:
      loop - true for looping forever, false for once
    • isLoop

      public boolean isLoop()
    • getWidth

      public int getWidth()
      Description copied from interface: SimpleImageSequence
      Returns the width of the current image
      Specified by:
      getWidth in interface SimpleImageSequence<T extends ImageBase<T>>
    • getHeight

      public int getHeight()
      Description copied from interface: SimpleImageSequence
      Returns the height of the current image
      Specified by:
      getHeight in interface SimpleImageSequence<T extends ImageBase<T>>
    • hasNext

      public boolean hasNext()
      True if there is another image to read and false if there are no more.
      Specified by:
      hasNext in interface SimpleImageSequence<T extends ImageBase<T>>
      Returns:
      true if a new image is available.
    • next

      public T next()
      Loads the next image into a BufferedImage and returns it. The same instance or a new instance of a BufferedImage might be returned each time. Don't rely on either behavior being consistent.
      Specified by:
      next in interface SimpleImageSequence<T extends ImageBase<T>>
      Returns:
      The next image in the sequence, which is now the current image.
    • loadImage

      public T loadImage​(String path)
    • seek

      public void seek​(int index)
    • getImage

      public T getImage()
      Description copied from interface: SimpleImageSequence
      Returns the currently loaded image in the sequence
      Specified by:
      getImage in interface SimpleImageSequence<T extends ImageBase<T>>
    • getGuiImage

      public BufferedImage getGuiImage()
      Description copied from interface: SimpleImageSequence
      Returns the image in the original format that it was read in as. When dealing with swing or any standard Java SE environment this will almost always be BufferedImage. The type has been abstracted out to provide better Android support.
      Specified by:
      getGuiImage in interface SimpleImageSequence<T extends ImageBase<T>>
    • getImageType

      public ImageType<T> getImageType()
      Description copied from interface: SimpleImageSequence
      Returns the type of class used to store the output image
      Specified by:
      getImageType in interface SimpleImageSequence<T extends ImageBase<T>>
    • getFrameNumber

      public int getFrameNumber()
      Description copied from interface: SimpleImageSequence
      Returns the number of the current frame in the sequence.
      Specified by:
      getFrameNumber in interface SimpleImageSequence<T extends ImageBase<T>>
      Returns:
      Frame ID number.
    • close

      public void close()
      Description copied from interface: SimpleImageSequence
      Call when done reading the image sequence.
      Specified by:
      close in interface SimpleImageSequence<T extends ImageBase<T>>
    • reset

      public void reset()
      Description copied from interface: SimpleImageSequence
      Start reading the sequence from the start
      Specified by:
      reset in interface SimpleImageSequence<T extends ImageBase<T>>
    • getTotalImages

      public int getTotalImages()
    • getIndex

      public int getIndex()
    • setIndex

      public void setIndex​(int index)