visual3d:documentation:definitions:file_formats:ascii_format
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| visual3d:documentation:definitions:file_formats:ascii_format [2024/06/19 12:47] – sgranger | visual3d:documentation:definitions:file_formats:ascii_format [2026/03/09 07:41] (current) – Reorganized page and removed references to hidden commands. wikisysop | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | {{{{{{visual3d reads and writes the c3d data file format developed by andrew dainis and doug mcguire in 1987. the c3d formatted file is a compact binary data file used as a convenient and efficient means for storing 3d coordinate and analog data, with all associated parameters, for a single measurement trial. the [[visual3d: | + | ====== ASCII Format ====== |
| - | data file stored | + | Visual3D reads and writes the [[visual3d: |
| - | there are a wide variety of ascii formatted | + | Data file stored in formats other than the C3D format must be translated, either by the user or internally by Visual3D, into the C3D Format. One popular alternative format is ASCII-formatted text files. There are a wide variety of these ASCII-formatted files and Visual3D |
| - | it is quite a challenge to read all varieties of ascii formatted files, but we do our best to accommodate data that our users collect. if visual3d does not import your formatted files, contact support@c-motion.com and request that we implement your format. we recognize that the first task to analyze your data is to be able to load the files, so we try hard to make sure that users have their data. | + | ===== Supported Formats ===== |
| - | ascii files that can be imported. | + | There a number of ASCII file formats |
| - | users that create their own custom file formats may be able to adapt their own file format fairly simply. if a user has an ascii file format that visual3d does not currently import, please contact support@c-motion.com and we will either create a file importer for you, or provide you with an sdk to create your own visual3d plugin. | + | ==== Visual3D ASCII Format ==== |
| - | a universal ascii file converter may be downloaded from the [[https:// | + | The [[visual3d:documentation: |
| - | ==== p2d_format ==== | + | This data file can be exported from Visual3D using [[Visual3D: |
| - | the p2d file format was part of the origin move3d software written by tom kepple in dr. steven stanhope’s laboratory at the united states national institutes of health (nih) (http:// | + | ==== P2D Format ==== |
| - | ==== visual3d_ascii_format ==== | + | The [[visual3d: |
| - | visual3d ascii file format for importing and exporting signals | + | ==== JSON Format ==== |
| - | visual3d exports | + | Signal |
| - | this data file can be exported from visual3d using the pipeline command [[visual3d: | + | ==== FSV Format ==== |
| - | this data file can be imported | + | The **Import_Fsv_Files** Visual3D plugin is a fairly general ASCII file format translator |
| - | report data can be exported from the report tab [[# | + | ===== Opening an ASCII File ===== |
| - | ==== fsv_format ==== | + | A Visual3D ASCII file can be opened in the Visual3D workspace directly using the FILE OPEN menu option or the FILE_OPEN command. In order for Visual3D to interpret this standalone file correctly, it is important that a signal be included specifying the time. |
| - | the **import_fsv_files** visual3d plugin | + | One of the constraints on the file import |
| - | ==== json_format ==== | + | |- |C:\ExampleData\ExampleWalk.c3d|C:\ExampleData\ExampleWalk.c3d|Filename |
| - | + | |- |ANALOGTIME | |
| - | signal data can be exported to json format (javascript object notation) using the [[index.php? | + | |- |FRAME_NUMBERS |
| - | + | |- |ORIGINAL | |
| - | ==== kinemetrix ==== | + | |ITEM|0 |X |Component. (ANALOG |
| - | + | ||
| - | the import_kinemetrix_files visual3d plugin is an ascii file format translator to c3d. these files are produced by kinemetrics. this is a preliminary importer because we had only one example file to work with. ; | + | |
| - | + | ||
| - | ===== opening a text file ===== | + | |
| - | + | ||
| - | a visual3d ascii file can be opened in the visual3d workspace directly using the file open menu option or the file_open command. | + | |
| - | + | ||
| - | in order for visual3d to interpret this standalone file correctly, it is important that a signal be included specifying the time. | + | |
| - | + | ||
| - | |- |c:\exampledata\examplewalk.c3d|c:\exampledata\examplewalk.c3d|filename | + | |
| - | |- |analogtime | + | |
| - | |- |frame_numbers | + | |
| - | |- |original | + | |
| - | |item|0 |x |component. (analog | + | |
| |1 | |1 | ||
| |2 | |2 | ||
| Line 58: | Line 44: | ||
| |5 | |5 | ||
| - | ===== importing data from an ascii file ===== | + | ==== Working with DERIVED Data ==== |
| - | visual3d currently imports | + | For DERIVED |
| - | [[visual3d: | + | ===== Exporting Signals to an ASCII File ===== |
| - | **/ | + | |
| - | **;** | + | There are several methods for exporting |
| - | visual3d allows the importing of data to a c3d file from an ascii file. see the description of the default ascii file format for visual3d. | + | |
| - | one of the constraints on the file import is that the first line of the signal column must match an open c3d file. this allows visual3d to recognize which file to add the data to. for analog and target (point) data the following rules apply: if there are more frames of data in the ascii file than there are in the c3d file, the ascii signal is truncated. if there are fewer frames of data in the ascii file than there are in the c3d file, the signal is padded with frames of data containing data_not_found. note: for derived signals all rows are added to the data file within visual3d without truncation or padding. this is partly because derived signals cannot be exported to the c3d file at this point, so there is no conflict with the c3d file format. | + | ==== Via the Data Tree ==== |
| - | ==== import ascii signals adds the signals to the derived folder in the data tree ==== | + | {{: |
| - | i would like these signals | + | - Select one of the signals |
| + | - A dialog appears that contains | ||
| + | - Selecting | ||
| - | ===== export signals to an ascii file using data tree ===== | + | ==== Via Pipeline Command |
| - | datatreeexportascii.gif\\ | + | The Visual3D pipeline command [[Visual3D: |
| - | select one of the signals in the data tree using a click of the left mouse button. a dialog appears that contains two tabs. one tab is a graph of the signal, the other tab is a list of the data values. | + | - Visual3D ASCII; and |
| + | - P2D. | ||
| - | selecting | + | The following dialog appears when the Export_Data_To_ASCII_File command is edited within |
| - | === pipeline command for exporting signals to an ascii file === | + | {{: |
| - | the visual3d pipeline command exports ascii data to one of 2 formatted data files (visual3d default and p2d). | ||
| - | for example: | + | ==== From a Report Dialog ==== |
| - | |**[[visual3d: | + | Data can be exported directly from a [[visual3d: |
| - | |/ | + | - Select one of the graphs in the edit report dialog. A button will appear below the graph list box titled ”Export Selected”. |
| - | |! / | + | - Select |
| - | |/ | + | |
| - | |/ | + | - a P2D formatted file. |
| - | |! / | + | - The options exist to save the raw data (e.g. frame by frame) or to save time normalized |
| - | |/ | + | |
| - | |! / | + | |
| - | |! / | + | |
| - | |! / | + | |
| - | |! / | + | |
| - | |! / | + | |
| - | |! / | + | |
| - | |! / | + | |
| - | |! / | + | |
| - | |! / | + | |
| - | |! / | + | |
| - | |! / | + | |
| - | |! / | + | |
| - | |! / | + | |
| - | |! / | + | |
| - | |! / | + | |
| - | |**; | + | |
| - | the following dialog appears when the export_data_to_ascii_file command has been added to the pipeline | + | The picture below shows a highlighted graph and selecting a [[Visual3D: |
| - | exportascii.png | + | {{: |
| - | \\ | + | ===== Exporting 6 Degree of Freedom Data ===== |
| + | It is possible to export [[visual3d: | ||
| - | ===== export | + | This example file contains the ORIGIN and ROTATION matrix for the [[Visual3D: |
| - | select one of the graphs in the edit report dialog. a button will appear below the graph list box titled ”export selected”. selecting this button will pop up a dialog for exporting the data from the graph to an ascii file; either a visual3d ascii formatted file or a p2d formatted file. the options exist to save the raw data (e.g. frame by frame) or to save time normalized data (e.g. a specified number of frames) using the properties of the graph template (e.g. start frame and end frame). | + | | |c:\Data\mvc002.c3d|c: |
| - | + | | |ORIGIN | |
| - | the picture below shows a highlighted graph and selecting a [[visual3d: | + | | |KINETIC_KINEMATIC |
| - | + | | |LSK |LSK |LSK |LSK |LSK |LSK |LSK |LSK |LSK |LSK |LSK |LSK | | |
| - | exportreport.png | + | |ITEM|X |Y |Z |0 |
| - | + | ||
| - | ===== export 6 degree of freedom data ===== | + | |
| - | + | ||
| - | it is possible to export 6 degree of freedom data to an ascii format as either an origin and quaternion or as an origin and 3x3 rotation matrix. | + | |
| - | + | ||
| - | exporting the position and orientation of segment rft as an origin and quaternion | + | |
| - | + | ||
| - | \\ | + | |
| - | + | ||
| - | + | ||
| - | [[visual3d: | + | |
| - | ! / | + | |
| - | / | + | |
| - | / | + | |
| - | / | + | |
| - | ! / | + | |
| - | ! / | + | |
| - | ! / | + | |
| - | ! / | + | |
| - | ! / | + | |
| - | ! / | + | |
| - | ! / | + | |
| - | ; | + | |
| - | + | ||
| - | \\ | + | |
| - | exporting the position and orientation of segment rft as an origin and rotation matrix. visual3d exports the following rotation matrix | + | |
| - | + | ||
| - | [[visual3d: | + | |
| - | + | ||
| - | \\ | + | |
| - | + | ||
| - | + | ||
| - | [[visual3d: | + | |
| - | ! / | + | |
| - | / | + | |
| - | / | + | |
| - | / | + | |
| - | ! / | + | |
| - | ! / | + | |
| - | ! / | + | |
| - | ! / | + | |
| - | ! / | + | |
| - | ! / | + | |
| - | ! / | + | |
| - | ; | + | |
| - | + | ||
| - | ==== 6 dof ascii format ==== | + | |
| - | + | ||
| - | this example file contains the origin and rotation matrix for the [[visual3d: | + | |
| - | + | ||
| - | | |c:\data\mvc002.c3d|c: | + | |
| - | | |origin | + | |
| - | | |kinetic_kinematic | + | |
| - | | |lsk |lsk |lsk |lsk |lsk |lsk |lsk |lsk |lsk |lsk |lsk |lsk | | + | |
| - | |item|x |y |z |0 | + | |
| |1 | |1 | ||
| |2 | |2 | ||
| Line 186: | Line 101: | ||
| |5 | |5 | ||
| - | or in the following format | + | Or in the following format |
| > | > | ||
| - | | |c:\data\mvc002.c3d|c: | + | | |c:\Data\mvc002.c3d|c: |
| - | | |origin | + | | |ORIGIN |
| - | | |link_model_based | + | | |LINK_MODEL_BASED |
| - | | |lsk |lsk |lsk |lsk |lsk |lsk |lsk |lsk |lsk |lsk |lsk |lsk | | + | | |LSK |LSK |LSK |LSK |LSK |LSK |LSK |LSK |LSK |LSK |LSK |LSK | |
| - | |item|x |y |z |0 | + | |ITEM|X |Y |Z |0 |
| |1 | |1 | ||
| |2 | |2 | ||
| Line 201: | Line 116: | ||
| |5 | |5 | ||
| - | ===== other ascii formats ===== | + | ==== Example: Export as ORIGIN and QUATERNION |
| - | the following ascii commands read slightly different flavors | + | The command below will export |
| - | \\ | + | < |
| - | **import_frappier_analog_signals**\\ | + | Export_Data_To_ASCII_File |
| - | **import_ntnu_analogsignals**\\ | + | ! /FILE_NAME= |
| - | **import_cresswell_analogsignals**\\ | + | / |
| - | **import_natick_analogsignals** | + | / |
| + | / | ||
| + | ! / | ||
| + | ! / | ||
| + | ! / | ||
| + | ! / | ||
| + | ! / | ||
| + | ! / | ||
| + | ! / | ||
| + | ; | ||
| + | </ | ||
| - | \\ | + | ==== Example: Export |
| - | this command was written for frappier acceleration products but has been modified to accomodate many different flavors of ascii files from our customers. the command has several aliases | + | |
| - | the name of the ascii file containing the analog signals is expected to have the same name as the c3d file; eg. trial1.c3d | + | The command below will export |
| - | the basic format of the file is: | + | < |
| - | + | Export_Data_To_ASCII_File | |
| - | \\ | + | ! /FILE_NAME= |
| - | + | / | |
| - | + | / | |
| - | |file_type: |analog | + | / |
| - | |board_type: | + | ! / |
| - | |trial_name: | + | ! /END_LABEL= |
| - | |name | + | ! / |
| - | |rate | + | ! / |
| - | |0.000 | + | ! / |
| - | |0.001 | + | ! / |
| - | + | ! / | |
| - | [[ | + | ; |
| + | </ | ||
| - | ===== example ===== | + | **NOTE**: Visual3D exports the following rotation matrix: |
| - | specifying a root folder and a list of subject folders. each subject folder contains a set of c3d files. for example, | + | < |
| - | subject1 | + | [ XYZ local ] = [R2] [XYZ global] |
| - | trial16.c3d | + | </ |
| - | subject2 | + | |
| - | trial16.c3d | + | |
| - | subject3 | + | |
| - | trial16.c3d | + | |
| - | and so on ... | + | |
| - | open each c3d file and export a signal to a filename whose prefix is the same as the c3d file. | + | |
| - | }}}}}} | ||
visual3d/documentation/definitions/file_formats/ascii_format.1718801248.txt.gz · Last modified: by sgranger
