User Tools

Site Tools


alexvisual

This is an old revision of the document!


Processing Data in Visual3D

All of the work in this tutorial can be done using a pipeline in Visual3D (V3D). The final pipeline is quite complicated, so it is broken up into a variety of steps, but everything should be run in one pipeline at the very end.

Converting Between .json and .cmz

1. Open up the Pipeline Workshop
2. Use 'Set_Pipeline_Parameter_To_Folder_Path' by clicking on the '»' in the workshop. This command is there to select the right folder on the computer.

Set_Pipeline_Parameter_To_Folder_Path
/PARAMETER_NAME=FOLDER
/PARAMETER_VALUE=C:\...\Introductory_Project_August_2025\SPL-Open-Data-main\basketball\freethrow\data\P0001\
! /FROM_MOTION_FILE_IN_WORKSPACE=
! /PARAMETER_VALUE_SEARCH_FOR=
! /PARAMETER_VALUE_REPLACE_WITH=
! /PARAMETER_VALUE_APPEND=
! /SET_PROMPT=Select a directory
! /ALPHABETIZE=TRUE
;

3. Use 'Set_Pipeline_Parameter_To_List_Of_Files' by clicking on the '»' in the workshop. This command selects all the files in this folder which have the file type .json. In this case, that is every file in the folder.

Set_Pipeline_Parameter_To_List_Of_Files
/PARAMETER_NAME= FILES
/FOLDER= ::FOLDER
! /SEARCH_SUBFOLDERS=FALSE
/FILE_MASK=*.json
! /ALPHABETIZE=TRUE
! /RETURN_FOLDER_NAMES=FALSE
! /RETURN_RELATIVE_FILENAMES=FALSE
;

4. With all the files loaded into the pipeline, the next step is to run the for-loop that converts all the .json to .cmz files. This requires 5 commands: For_Each, File_New, File_Open, File_Save_As, End_For_Each.

For_Each
/ITERATION_PARAMETER_NAME= INDEX
/ITERATION_PARAMETER_COUNT_NAME=COUNT
/ITEMS= ::FILES
;

File_New
;

File_Open
/FILE_NAME= ::INDEX
! /FILE_PATH=
! /SEARCH_SUBFOLDERS=FALSE
! /SUFFIX=
! /SET_PROMPT=File_Open
! /ON_FILE_NOT_FOUND=PROMPT
! /FILE_TYPES_ON_PROMPT=
;

File_Save_As
/FILE_NAME=TRIAL&::COUNT
/FOLDER=C:\HAS_Motion\Introductory_Project_August_2025\SPL-Open-Data-main\basketball\freethrow\data\CMZ_Trials\
! /SET_PROMPT=Save CMZ file as
! /SAVE_EMBEDDED_GRAPHICS=FALSE
! /CREATE_FOLDER_PATH=FALSE
;

End_For_Each
/ITERATION_PARAMETER_NAME= INDEX
;

This pipeline itself will convert all the .json files to workspaces(.cmz) and can be run individually. But for consistency, the following commands will all be added to the for-loop, after 'File_Open' and before 'File_Save_As'

Assigning Tags

In this dataset, the variables that are analyzed more in depth are whether or not the subject made or missed the shot and during which quarter of the experiment did the free throw trial take place. Tags are placed on each subject that will allow each trial to be easier identified when analyzed in Sift.

Many of the Tag commands are run multiple times in this pipeline, so each different command will be shown here once and the order of the pipeline will be provided so that it can be built manually. If you are having difficulty recreating the pipeline, the complete pipeline can be downloaded at the end of this V3D section.

1. 'Select_Active_File' command. This command is run first to select the file to be tagged.

Select_Active_File
/FILE_NAME=ALL_FILES
! /QUERY=
! /SUBJECT_TAGS=NO_SUBJECT
;

2. To assign a tag the 'Assign_Tags_To_Files' command is used.

Assign_Tags_To_Files
/MOTION_FILE_NAMES =ALL_FILES
/QUERY= PARAMETERS::MLSE::RESULTS="missed"
/TAGS= missed
;
alexvisual.1755107002.txt.gz · Last modified: 2025/08/13 17:43 by wikisysop