Class ImageSequenceGrabber

java.lang.Object
ucar.unidata.idv.ui.ImageSequenceGrabber
All Implemented Interfaces:
ActionListener, Runnable, EventListener

public class ImageSequenceGrabber extends Object implements Runnable, ActionListener
Class ImageSequenceGrabber. Manages the movie capture dialog, capturing a series of jpegs from a ViewManager, writing them out to disk, previewing them and generating quicktime movies.
Author:
IDV Development Team
  • Field Details

  • Constructor Details

    • ImageSequenceGrabber

      public ImageSequenceGrabber(ViewManager viewManager)
      Create me with the given ViewManager
      Parameters:
      viewManager - The view manager we are capturing images from
    • ImageSequenceGrabber

      public ImageSequenceGrabber(ViewManager viewManager, JComponent alternateComponent)
      Create me with the given ViewManager
      Parameters:
      viewManager - The view manager we are capturing images from
      alternateComponent - If non null then use this component as the source of the image
    • ImageSequenceGrabber

      public ImageSequenceGrabber(ViewManager viewManager, JComponent alternateComponent, boolean justCaptureAnimation)
      Create a new ImageSequenceGrabber
      Parameters:
      viewManager - associated ViewManager
      alternateComponent - alternate component
      justCaptureAnimation - true to just capture the animation
    • ImageSequenceGrabber

      public ImageSequenceGrabber(ViewManager viewManager, String filename, IntegratedDataViewer idv)
      This gets called when we automatically create a movie. It will not show the dialog window and will start up the animation capture
      Parameters:
      viewManager - The view manager we are capturing images from
      filename - The file we are writing to
      idv - The IDV
    • ImageSequenceGrabber

      public ImageSequenceGrabber(ViewManager viewManager, String filename, IntegratedDataViewer idv, ImageGenerator imageGenerator, Element scriptingNode)
      This gets called when we automatically create a movie. It will not show the dialog window and will start up the animation capture
      Parameters:
      viewManager - The view manager we are capturing images from
      filename - The file we are writing to
      idv - The IDV
      imageGenerator - imageGenerator
      scriptingNode - The igml node
    • ImageSequenceGrabber

      public ImageSequenceGrabber(String filename, IntegratedDataViewer idv, ImageGenerator imageGenerator, Element scriptingNode, List<ImageWrapper> imageFiles, Dimension size, double displayRate)
      This gets called when we automatically create a movie. It will not show the dialog window and will start up the animation capture
      Parameters:
      filename - The file we are writing to
      idv - The IDV
      imageGenerator - imageGenerator
      scriptingNode - The igml node
      imageFiles - List of files to write
      size - Size of image
      displayRate - Display rate
    • ImageSequenceGrabber

      public ImageSequenceGrabber(String filename, IntegratedDataViewer idv, ImageGenerator imageGenerator, Element scriptingNode, List<ImageWrapper> imageFiles, Dimension size, double displayRate, double endPause)
      This gets called when we automatically create a movie. It will not show the dialog window and will start up the animation capture
      Parameters:
      filename - The file we are writing to
      idv - The IDV
      imageGenerator - imageGenerator
      scriptingNode - The igml node
      imageFiles - List of files to write
      size - Size of image
      displayRate - Display rate
      endPause - end pause (seconds)
  • Method Details

    • show

      public void show()
      Show the main window
    • actionPerformed

      public void actionPerformed(ActionEvent ae)
      Handle gui actions
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      ae - The ActionEvent
    • convertColorSpace

      public static org.jcodec.common.model.Picture convertColorSpace(org.jcodec.common.model.Picture pic, org.jcodec.common.model.ColorSpace tgtColor)
    • run

      public void run()
      Run in a thread.
      Specified by:
      run in interface Runnable
    • captureImages

      public Image captureImages(List<? extends Component> components, int cols) throws AWTException
      Capture images.
      Parameters:
      components - the components
      cols - number of columns
      Returns:
      the image
      Throws:
      AWTException - the aWT exception
    • captureImage

      public Image captureImage(Component comp) throws AWTException
      Capture image.
      Parameters:
      comp - the comp
      Returns:
      the image
      Throws:
      AWTException - the aWT exception
    • subsetBounds

      public static void subsetBounds(GeoLocationInfo bounds, Hashtable returnProps)
      Subset bounds
      Parameters:
      bounds - the bounds
      returnProps - the return properties
    • getFileSuffix

      protected String getFileSuffix()
      What file suffix should we use for the images. For now better by jpg
      Returns:
      File suffix
    • decodeJPG

      public org.jcodec.common.model.Picture decodeJPG(File f, org.jcodec.common.model.ColorSpace tgtColor) throws IOException
      Throws:
      IOException
    • decodeJPG0

      public org.jcodec.common.model.Picture decodeJPG0(File f) throws IOException
      Throws:
      IOException
    • decodePNG

      public org.jcodec.common.model.Picture decodePNG(File f, org.jcodec.common.model.ColorSpace tgtColor) throws IOException
      Throws:
      IOException
    • decodePNG0

      public org.jcodec.common.model.Picture decodePNG0(File f) throws IOException
      Throws:
      IOException
    • createKmz

      public void createKmz(String movieFile, List<ImageWrapper> images, Element scriptingNode)
      create the kmz
      Parameters:
      movieFile - file name
      images - list of images
      scriptingNode - isl node
    • createZip

      public void createZip(String movieFile, List<ImageWrapper> images, Element scriptingNode)
      create the kmz
      Parameters:
      movieFile - file name
      images - list of images
      scriptingNode - isl node
    • main

      public static void main(String[] args)
      main
      Parameters:
      args - args