Package ucar.unidata.idv.ui
Class ImageSequenceGrabber
java.lang.Object
ucar.unidata.idv.ui.ImageSequenceGrabber
- All Implemented Interfaces:
ActionListener
,Runnable
,EventListener
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final String
xml tag or attr namestatic final String
xml tag or attr namestatic final String
xml tag or attr namestatic final String
xml tag or attr namestatic final String
xml tag or attr namestatic final String
igml xml attributesstatic final String
igml xml attributesstatic final String
igml xml attributesstatic final String
igml xml attributesstatic final String
igml xml attributesstatic final String
xml tag or attr namestatic final String
xml tag or attr namestatic final String
xml tag or attr namestatic final String
xml tag or attr namestatic final String
xml tag or attr namestatic final String
igml xml attributesstatic final String
the viewpoint filestatic final String
Action commands for gui buttonsstatic final String
Action commands for gui buttonsstatic final String
Action commands for gui buttonsstatic final String
Action commands for gui buttonsstatic final String
Action commands for gui buttonsstatic final String
Action commands for gui buttonsstatic final String
Action commands for gui buttonsstatic final String
Action commands for gui buttonsstatic final String
Action commands for gui buttonsstatic final String
Action commands for gui buttonsstatic final PatternFileFilter
Filter for HTML filesstatic final String
Tooltip text for global palette checkbox.static final String
"Global" GIF palette preference ID.static final String
Property for the image file templatestatic final String
Property for the image file templatestatic final String
xml tag or attr namestatic final String
xml tag or attr name -
Constructor Summary
ConstructorsConstructorDescriptionImageSequenceGrabber
(String filename, IntegratedDataViewer idv, ImageGenerator imageGenerator, Element scriptingNode, List<ImageWrapper> imageFiles, Dimension size, double displayRate) This gets called when we automatically create a movie.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.ImageSequenceGrabber
(ViewManager viewManager) Create me with the givenViewManager
ImageSequenceGrabber
(ViewManager viewManager, String filename, IntegratedDataViewer idv) This gets called when we automatically create a movie.ImageSequenceGrabber
(ViewManager viewManager, String filename, IntegratedDataViewer idv, ImageGenerator imageGenerator, Element scriptingNode) This gets called when we automatically create a movie.ImageSequenceGrabber
(ViewManager viewManager, JComponent alternateComponent) Create me with the givenViewManager
ImageSequenceGrabber
(ViewManager viewManager, JComponent alternateComponent, boolean justCaptureAnimation) Create a new ImageSequenceGrabber -
Method Summary
Modifier and TypeMethodDescriptionvoid
Handle gui actionscaptureImage
(Component comp) Capture image.captureImages
(List<? extends Component> components, int cols) Capture images.static org.jcodec.common.model.Picture
convertColorSpace
(org.jcodec.common.model.Picture pic, org.jcodec.common.model.ColorSpace tgtColor) void
createKmz
(String movieFile, List<ImageWrapper> images, Element scriptingNode) create the kmzvoid
createZip
(String movieFile, List<ImageWrapper> images, Element scriptingNode) create the kmzorg.jcodec.common.model.Picture
org.jcodec.common.model.Picture
decodeJPG0
(File f) org.jcodec.common.model.Picture
org.jcodec.common.model.Picture
decodePNG0
(File f) protected String
What file suffix should we use for the images.static void
mainvoid
run()
Run in a thread.void
show()
Show the main windowstatic void
subsetBounds
(GeoLocationInfo bounds, Hashtable returnProps) Subset bounds
-
Field Details
-
ATTR_ANIS_HEIGHT
xml tag or attr name- See Also:
-
ATTR_ANIS_POSTHTML
xml tag or attr name- See Also:
-
ATTR_ANIS_PREHTML
xml tag or attr name- See Also:
-
ATTR_ANIS_TYPE
xml tag or attr name- See Also:
-
ATTR_ANIS_WIDTH
xml tag or attr name- See Also:
-
ATTR_APPENDTIME
igml xml attributes- See Also:
-
ATTR_FILENAME
igml xml attributes- See Also:
-
ATTR_IMAGEDIR
igml xml attributes- See Also:
-
ATTR_IMAGEPREFIX
igml xml attributes- See Also:
-
ATTR_IMAGESUFFIX
igml xml attributes- See Also:
-
ATTR_IMAGETEMPLATE
xml tag or attr name- See Also:
-
ATTR_KML_DESC
xml tag or attr name- See Also:
-
ATTR_KML_NAME
xml tag or attr name- See Also:
-
ATTR_KML_OPEN
xml tag or attr name- See Also:
-
ATTR_KML_VISIBILITY
xml tag or attr name- See Also:
-
ATTR_STEPS
igml xml attributes- See Also:
-
ATTR_VIEWPOINTFILE
the viewpoint file- See Also:
-
CMD_CLEAR
Action commands for gui buttons- See Also:
-
CMD_GRAB
Action commands for gui buttons- See Also:
-
CMD_GRAB_ANIMATION
Action commands for gui buttons- See Also:
-
CMD_PREVIEW_CLOSE
Action commands for gui buttons- See Also:
-
CMD_PREVIEW_DELETE
Action commands for gui buttons- See Also:
-
CMD_PREVIEW_NEXT
Action commands for gui buttons- See Also:
-
CMD_PREVIEW_PLAY
Action commands for gui buttons- See Also:
-
CMD_PREVIEW_PREV
Action commands for gui buttons- See Also:
-
CMD_PREVIEW_SHOW
Action commands for gui buttons- See Also:
-
CMD_PUBLISH
Action commands for gui buttons- See Also:
-
PROP_IMAGEALTDIR
Property for the image file template- See Also:
-
PROP_IMAGETEMPLATE
Property for the image file template- See Also:
-
PREF_USE_GLOBAL_PALETTE
"Global" GIF palette preference ID.- See Also:
-
GLOBAL_PALETTE_TOOLTIP
Tooltip text for global palette checkbox.- See Also:
-
FILTER_ANIS
Filter for HTML files -
TAG_DESCRIPTION
xml tag or attr name- See Also:
-
TAG_VISIBILITY
xml tag or attr name- See Also:
-
-
Constructor Details
-
ImageSequenceGrabber
Create me with the givenViewManager
- Parameters:
viewManager
- The view manager we are capturing images from
-
ImageSequenceGrabber
Create me with the givenViewManager
- Parameters:
viewManager
- The view manager we are capturing images fromalternateComponent
- 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 ViewManageralternateComponent
- alternate componentjustCaptureAnimation
- true to just capture the animation
-
ImageSequenceGrabber
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 fromfilename
- The file we are writing toidv
- 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 fromfilename
- The file we are writing toidv
- The IDVimageGenerator
- imageGeneratorscriptingNode
- 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 toidv
- The IDVimageGenerator
- imageGeneratorscriptingNode
- The igml nodeimageFiles
- List of files to writesize
- Size of imagedisplayRate
- 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 toidv
- The IDVimageGenerator
- imageGeneratorscriptingNode
- The igml nodeimageFiles
- List of files to writesize
- Size of imagedisplayRate
- Display rateendPause
- end pause (seconds)
-
-
Method Details
-
show
public void show()Show the main window -
actionPerformed
Handle gui actions- Specified by:
actionPerformed
in interfaceActionListener
- Parameters:
ae
- TheActionEvent
-
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. -
captureImages
Capture images.- Parameters:
components
- the componentscols
- number of columns- Returns:
- the image
- Throws:
AWTException
- the aWT exception
-
captureImage
Capture image.- Parameters:
comp
- the comp- Returns:
- the image
- Throws:
AWTException
- the aWT exception
-
subsetBounds
Subset bounds- Parameters:
bounds
- the boundsreturnProps
- the return properties
-
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
- Throws:
IOException
-
decodePNG
public org.jcodec.common.model.Picture decodePNG(File f, org.jcodec.common.model.ColorSpace tgtColor) throws IOException - Throws:
IOException
-
decodePNG0
- Throws:
IOException
-
createKmz
create the kmz- Parameters:
movieFile
- file nameimages
- list of imagesscriptingNode
- isl node
-
createZip
create the kmz- Parameters:
movieFile
- file nameimages
- list of imagesscriptingNode
- isl node
-
main
main- Parameters:
args
- args
-