Table of Contents
Export 3D Animation To Image
Overview
The Export_3D_Animation_To_Image command is used to capture and export static images from the 3D viewer in Visual3D.
- Command supports exporting one or more frames to multiple image formats for documentation and presentation.
- Multiple files in the workspace can be selected, and images can be exported for single or multiple frames within specific event sequences.
Pipeline Command
The command below is as seen on the Visual3D application, it has many parameters as there are many options to manipulate this command.
Export_3D_Animation_To_Image ! /FILE_NAME= ! /IMAGE_FILE_NAME= ! /APPEND_FRAME_TO_FILENAME=FALSE ! /APPEND_C3DNAME_TO_FILENAME=FALSE ! /IMAGE_FORMAT=png ! /START_FRAME=1 ! /END_FRAME= ! /EVENT_SEQUENCE= ! /EXCLUDE_EVENTS= ! /OUTPUT_WIDTH=640 ! /OUTPUT_HEIGHT=480 ;
Command Parameters
The following table shows the command parameters and descriptions:
Parameter | Description |
! /FILE_NAME= | Motion file(s) to export frames from. Can use wildcards (e.g., '*.c3d) or specify a specific file. |
! /IMAGE_FILE_NAME= | Path and name (or folder) where image will be saved. |
! /APPEND_FRAME_TO_FILENAME= | If 'TRUE', appends source file name (C3D) to the image file name when batch exporting. |
! /APPEND_C3DNAME_TO_FILENAME= | If 'TRUE', appends source file name (C3D) to the image file name when batch exporting. |
! /IMAGE_FORMAT= | Output format (e.g., .png, .bmp, .jpg). Defaults to .png. |
! /START_FRAME= | First frame to export. Use a specific number (e.g.m 10) or combine with event sequences. |
! /END_FRAME= | Final frame to export. Leave blank to export only the start frame. |
! /EVENT_SEQUENCE= | Optional event sequence (e.g., 'LHS+LTO) to restrict frame export to specific gait phases. |
! /EXCLUDE_EVENTS= | Events that, if present, will exclude the sequence from being exported. |
! /OUTPUT_WIDTH= | Width of the output image in pixels. Default is '640'. |
! /OUTPUT_HEIGHT= | Height of the output image in pixels. Default is '480'. |
Dialog
The command can be edited in a text editor or opened as a dialog. The dialog allows user to select export parameters using visual options.
- Motion File: Drop-down to select the motion file currently loaded in the workspace.
- Export File as Filename plus Frame Number: Appends frame number to image name (e.g., 'Frame_001.png')
- Exported Image File: Specify the base name or folder where the image(s) will be saved.
- Output Width/Height: Dimensions of the exported image in pixels.
- Start Frame/End Frame: Set the frame range to export. Leave 'End Frame' blank to export just one.
- Event Sequence & Exclusion: Limit frame export to within specified gait phases and exclude sequences with specific events.
Examples
The following examples will go through the use of the Export_3D_Animation_To_Image command in the Visual3D.
Example 1: Exporting a single image
This example exports one snapshot from a trial matching '*2.c3d', at frame 10. The file is saved for a specific location using a fixed filename.
Export_3D_Animation_To_Image /FILE_NAME=*2.c3d /IMAGE_FILE_NAME=Z:\temp\outImage.png /APPEND_FRAME_TO_FILENAME=FALSE /APPEND_C3DNAME_TO_FILENAME=FALSE /IMAGE_FORMAT=.png /START_FRAME=10 /END_FRAME= ! /EVENT_SEQUENCE= ! /EVENT_EVENTS= /OUTPUT_WIDTH=640 /OUTPUT_HEIGHT=480 ;
Example 2: Exporting multiple images from gait phase
This example exports frame 1 and 2 from all trials (*.c3d) in the workspace. The frame range is restricted to 'LHS' and 'LTO“ sequences.
Each output file will include both the C3D name and the frame number.
Export_3D_Animation_To_Image /FILE_NAME=*.c3d /IMAGE_FILE_NAME=Z:\temp\ /APPEND_FRAME_TO_FILENAME=TRUE /APPEND_C3DNAME_TO_FILENAME=TRUE /IMAGE_FORMAT=.png /START_FRAME=1 /END_FRAME=2 /EVENT_SEQUENCE=LHS+LTO ! /EXCLUDE_EVENTS= /OUTPUT_WIDTH=640 /OUTPUT_HEIGHT=480 ;
This example helps automate capturing consistent gait-phase images across multiple subjects.
Notes
Version 4 Implementation
Export a snapshot of the 3D viewer and save the file to disk.
In Version 4:
- only one file in the workspace can be selected
- only one frame of data can be exported
- only one exported filename can be specified.
Export_3D_Animation_To_Image ! /FILE_NAME= ! /IMAGE_FILE_NAME= ! /FRAME=1 ! /OUTPUT_WIDTH=640 ! /OUTPUT_HEIGHT=480 ;
This is consistent with the export option under the File Menu Item