User Tools

Site Tools


visual3d:documentation:pipeline:file_commands:assign_tags_to_file

Assign Tags To File

Overview

The Assign_Tags_To_Files command in Visual3D is used to assign descriptive tags to files in the current workspace.

Tags are used to organize and filter files for downstream processing. A file may have multiple tags, and each tag can apply to multiple files.

More information on Tags and how they function within Visual3D can be found here.

Common Usage Example:

You may wish to assign the tag 'BAREFOOT' to all walking trials performed without shoes. If these trials are also from female subjects, you can also assign the tag 'FEMALE' to the same files. This allows later queries or commands to target specific conditions.

Pipeline Command

The command below is as seen in the Visual3D application. The parameters allows users to assign tags to specific files based on direct naming or logical queries.

Assign_Tags_To_Files
! /MOTION_FILE_NAMES=
! /QUERY=
! /TAGS=
;

Command Parameters

The following table explains the command parameters and descriptions:

ParameterDescription
! /MOTION_FILE_NAMES=Specifies the files to which tags should be applied. You may enter specific file names, use ALL_FILES, or use wildcards.
! /QUERY=Optional filter that allows for logical expressions based on parameters or metrics. Only files matching the query will be tagged.
! /TAGS=One or more tags to apply to the selected files. Tags are not case-sensitive and cannot include spaces. Multiple tags should be space-separated.

Dialog

The can be edited through the text editor, or in dialog form. For this command, if you leave all parameters blank, the tag selection dialog will be prompted to appear.

If you specify a tag name but no files, the dialog opens with the tag pre-selected, and you can manually assign it to one or more files.

  • Create New Tag: Allows user to define a new tag manuallu.
  • View by Tags/Files: Toggle between filtering by tags or files.
  • Select files to apply tags: Click to assign or remove tag associations for each file.

Note: Tags are deleted automatically if no files are associated with them when the dialog is closed.

Examples

The following examples will go through the use of the Assign_Tag_To_Files command in the Visual3D application.

Example 1: Wildcard Filename Matching

The following commands assigns the tag WALK to all files in the workspace with filenames containing the substring “walk”:

Assign_Tags_To_Files
/MOTION_FILE_NAMES=*walk*.c3d
! /QUERY=
/TAGS=WALK
;

Example 2: Assign Based on Trial Parameter

You can assign a tag based on participant metadata. For example, to tag all files where the subject's mass is greater than 5kg.

Assign_Tags_To_Files
/MOTION_FILE_NAMES=ALL_FILES
/QUERY=METRIC::PROCESSED::MASS>5
/TAGS=WALK
;

Example 3: Assign Based on Trial Parameter

Assign the tag TC2 to all files where the parameter TC_NUM (in the TRIAL group) equals 2:

Assign_Tags_To_Files
/MOTION_FILE_NAMES=ALL_FILES
/QUERY=PARAMETERS::TRIAL::TC_NUM=2
/TAGS=TC2
;

Example 4: Multiple Conditions with Logical Operators

Assign the tag TC23 to trials where TC_NUM is either 2 or 3 using the logical OR(|) operator.

Assign_Tags_To_Files
/MOTION_FILE_NAMES=ALL_FILES
/QUERY=(PARAMETERS::TRIAL::TC_NUM=2)|(PARAMETERS::TRIAL::TC_NUM=3)
/TAGS=TC23
;

Back to Pipeline Commands Reference

visual3d/documentation/pipeline/file_commands/assign_tags_to_file.txt · Last modified: 2025/07/25 18:38 by wikisysop