Module video

Class ImageSequence

java.lang.Object
java.util.Observable
de.grogra.video.model.ImageSequence

public class ImageSequence extends Observable
An ImageSequence is able to collect an ordered list of images. Read and write operations on this list are possible through ImageSequenceView and ImageSequenceControl interfaces. The sequence is observerable and can notify observers about ImageSequenceEvents, which are triggered by modifications of the sequence. The sequence manages a list of VideoImages and uses a LinkedList internally.
Author:
Dominick Leppich
  • Field Details

    • ALPHABET

      public static final char[] ALPHABET
  • Constructor Details

    • ImageSequence

      public ImageSequence()
  • Method Details

    • add

      public void add(VideoImage image)
      Add a VideoImage at the end of the sequence.
      Parameters:
      image - - VideoImage
    • add

      public void add(int index, VideoImage image)
      Add a VideoImage at a specified position in the sequence.
      Parameters:
      index - - Index to insert the image
      image - - VideoImage
    • clear

      public void clear()
      Clear the sequence of images.
    • contains

      public boolean contains(Object obj)
      Check, if a given Object is inside this sequence.
      Parameters:
      obj - - Object to check
      Returns:
      True, if this sequence contains the specified Object
    • get

      public VideoImage get(int index)
      Get the VideoImage at a given position.
      Parameters:
      index - - Index to get the image from
      Returns:
      The VideoImage at the given position
    • getList

      public List<VideoImage> getList()
      Get the whole sequence of VideoImages as a List.
      Returns:
      All VideoImages in a List
    • isEmpty

      public boolean isEmpty()
      Check, if the sequence is empty.
      Returns:
      True, if the sequence is empty
    • remove

      public VideoImage remove(int index)
      Remove the image at the specified position.
      Parameters:
      index - - Index of the image to remove
      Returns:
      The VideoImage which was removed
    • size

      public int size()
      Return the size of the sequence (the number of VideoImages saved in the sequence).
      Returns:
      The size of the sequence
    • getDimension

      public Dimension getDimension()
      Return the Dimension of the images in this sequence. This dimension is unique, because the sequence doesn't allow to add images with mismatching dimensions.
      Returns:
      VideoImage dimension of this sequence
    • reorder

      public void reorder()
      Renames all files and create a regular expression for all files.
    • getRegex

      public String getRegex()
      Get the regular expression describing all image files.
      Returns:
      Regular expression
    • view

      public ImageSequenceView view()
      Get an ImageSequenceView for this sequence. This method will only create one instance.
      Returns:
      An ImageSequenceView
    • control

      public ImageSequenceControl control()
      Get an ImageSequenceControl for this sequence. This method will only create one instance.
      Returns:
      An ImageSequenceControl