User Tools

Site Tools


visual3d:documentation:pipeline:plugins:optotrak

Optotrak


Import_Optotrak_Files

This plugin imports the motion capture data (C# file) and one of the 2 types of analog data (O1#, V1#) files.


Import_Optotrak_Files The name of the C# file containing the motion capture data. If left blank, a dialog box appears to browse for the selected file.
/File_Name= The type of Analog file to be merged with the C# file. Choose only one of the following files V1#, O1#.
/Analog_File_Character=The name of the converted file. If left blank the resulting c3d file will contain the same prefix as the original file.
/Converted_File_Name= Specifies the Point Label names.
/Point_Label=
/Analog_Label= Specifies the Analog Label names.
/Analog_Offset= Specifies the Analog Offset. For the V1# and O1# files this is usually zero.
/Analog_Scale= Specifies the Analog Scale. This is multiplied by the signal value to convert the signal to volts.
/NDO_Filename= Specifies the NDO filename. The translater searches the NDO file for the names of the ANALOG and POINT labels

Importing from C# and V1# Files

Importing c# and v1# optotrak files. The c# files contain the motion capture data. The v1# files contain synchronized ANALOG data in which the data are stored in units of VOLTS. The following Pipeline Command prompts the user for the c# file; the associated v1# files is loaded automatically and should not be selected by the user.

Import_Optotrak_Files

/File_Name=

/Analog_File_Character=


Download the example files

Launch Visual3D, select the command pipeline dialog, and add the “Import_Optotrak_Files” to the Pipeline


Edit the command and change the ANALOG file type to import the synchronized v1# files by setting the ANALOG_FILE_CHARACTER to V. The v1# files contain the ANALOG data stored in units of volts

Visual3D expects the v1# file to have a similar name to the c# file. e.g. c#001.dat and v1#001.dat.


Execute the pipeline


A dialog will appear prompting you for the C# file. By default Visual3D has a filter to select files that end in the extensions .dat. If your files have a different extension, select a different filter option in the dialog combo. Do not select the V1# file as well, or you will get one C3D file containing the C# and V1# data, and another C3D file containing the V1# data alone.


The resulting c3d file will be loaded into the Visual3D Workspace automatically. The .dat files can be backed up because from this point forward, only the c3d files will be needed.

The default scale factors for the ANALOG Data

For NDI's ODAU there are two ways of storing the ANALOG data. The O1# files store the data in computer units; a scale factor must be specified that scales the data to units of volts. The V1# files store the data in volts and the scale factors should therefore be 1.

Prior to December 22, 2005, if no SCALE factors were included in the Visual3D Command, a fairly strange (at least to us now) default SCALE factor was used. In retrospect, it appears that we were saving one of our early customers some effort by selecting a default SCALE factor that suited his O1# data.

For example, ANALOG:SCALE for scaling A/D data to volts.




The Scaling parameter stored in the C3D file for a Type 2 force platform would be:


This customer had 16 bit ANALOG data, An Amplifier Gain of 4000, and an Excitation Voltage of 10. The resulting SCALE factor for converting from computer units to volts is:
0.007629395

Using this value makes sense for this customer.

If, however, a customer elects to use the default scale factor (e.g. by not entering the scale factors) the resulting scale is probably wrong.

Therefore, on December 22, 2005, we modified the Import_Optotrak plugin to set the default scale factors

  • for the V1# files to 1
  • for the O1# files to 0.000305175.

Frequently Asked Questions

File extensions

Importing OptoTrak files only allows me to import files with the extension *.dat. I have different file extensions for every subject, such as *.f01, *.f02, etc.

There isn't actually a restriction on the extensions. By default the Browse Dialog displays .dat files. A second option for .trl files also exists in the dialog. For other extensions simple select files of type *.*.

Note that if your file extensions are different between subjects, but the prefix to the files names is the same (e.g. trial1.f01, trial1.f02) you will need to make sure that data from different subjects is saved to different folders because the import command strips off the extension and replaces it with .c3d.

File Size

I can import my shorter optotrak files (collected for 10s at 100Hz for Optotrak). However, the larger trials (collected for 50s at 100Hz for Optotrak) the program either crashes or comes up with an error. Is there a limit on the file size?

The C3D File format has a limit of 32K frames of data because the POINT:FRAMES parameter is traditionally a SIGNED INTEGER. Visual3D was modified in Version 3.0 to treat the POINT:FRAMES parameter as a UNSIGNED INTEGER, which increases the number of frames to 64K.

In Visual3D Beta version 3.0 we modified the C3D reader to accept a new parameter


POINT:LONG_FRAMES The parameter is a FLOAT that contains the number of frames. If this parameter exists, it takes precedence over the POINT:FRAMES parameter.

Changing the default TARGET names.

The C# and V# files created by Northern Digital software do not contain names for the signals stored. Data that are collecting in NDI's Toolbench software use a .ndo file (an ASCII file in a standard .ini format) to store information.

Signal information is usually stored in the .ndo file. For example, a typical .ndo file should contain lines similar to the following.

[Marker 1]

MarkerName=3020_Strober_Adapter_M001
FOR=-1
Visible=TRUE
RawView=0

The .ndo file can be modified by the user without disturbing the Toolbench software. The following modification to this section will cause Visual3D to use the MarkerLabel parameter to name the signal in the c3d file during the import of the data.

[Marker 1]

MarkerName=3020_Strober_Adapter_M001
MarkerLabel=R.THIGH1
FOR=-1
Visible=TRUE
RawView=0

A typical Visual3D optotrak import command would look like the following:

Import_Optotrak_Files
! /FILE_NAME=
! /ANALOG_FILE_CHARACTER=O
! /CONVERTED_FILE_NAME=
! /POINT_LABEL=
! /ANALOG_LABEL=
! /ANALOG_OFFSET=
! /ANALOG_SCALE=
/NDO_FILENAME=c:Visual3DExampleoptotrak.ndo ;

This command will prompt the user for the C# files, will use the default parameters, and will use the optotrak.ndo file for specifying the signal names.

Note that the full filename (including path) for the .ndo file must be used.

visual3d/documentation/pipeline/plugins/optotrak.txt · Last modified: 2024/07/17 11:46 by sgranger