The fw deid Command
To avoid uploading personally identifiable information (PII), use the Flywheel Command-Line Interface to test your de-ID profile on your computer before you upload it.
This article explains how to use the fw deid test command to test your de-ID profile.
Prerequisites
You will need a de-ID profile before continuing. Learn more about creating a de-ID profile.
Instructions
- Open a plain text editor such as TextEdit, Notepad, or Sublime.
-
Copy and paste the following command into the editor:
fw deid test <SRC> <PROFILE> <PATH> [optional flags] -
Replace the placeholders with your information:
SRC: The path to the folder to test. This data should be the same or similar to the data you want to upload to Flywheel.PROFILE: The path to file containing the de-ID profilePATH: The path to save test results to on the current machine- Optional flags:
[--session LABEL][--subject LABEL]
Example:
fw deid test ~/Documents/TestData ~/Documents/deid_profile.yaml ~/Documents/DeIDLogs --subject deidTest -
Open the Terminal or Windows Command Prompt
-
Copy and paste your command into Terminal or Windows Command Prompt and hit enter.
-
The Flywheel CLI scans your files.

-
Once complete, review the log file named
deid_log.csv. This gives you a preview of how the DICOM fields would change after de-identification.Example:

-
Adjust your de-ID profile until the log file shows that your data will be sufficiently de-identified on upload.
Next Steps
Add your de-ID profile to a Flywheel project to automatically de-identify new data or use the CLI to upload data.
Common Errors
Common CLI Errors
For authentication, network issues, and other errors common to all CLI commands, see the CLI Troubleshooting Guide.
"The profile file path does not exist"
Cause: The specified de-ID profile YAML file cannot be found at the provided path.
Solution:
- Verify the profile file path is correct
- Use absolute paths or ensure relative paths are correct from your current directory
- Check for typos in the filename or path
- Ensure the file has a
.yamlor.ymlextension
"The path does not exist" (destination path)
Cause: The specified destination directory for test results does not exist.
Solution:
- Create the destination directory first:
mkdir -p /path/to/destination - Verify the path is correct
- Ensure you have write permissions for the parent directory
"Invalid deid profile"
Cause: The de-ID profile YAML file has syntax errors or invalid configuration.
Solution:
- Validate YAML syntax with an online validator
- Review de-ID profile documentation for correct structure
- Check for proper indentation (use spaces, not tabs)
- Verify all DICOM field names are valid keywords
- Ensure transformation rules (
remove,replace-with,hash, etc.) are correctly formatted
"Invalid DICOM - missing UID tag" (SC02)
Cause: DICOM files in the test data are missing required UID tags (StudyInstanceUID, SeriesInstanceUID, or SOPInstanceUID).
Solution:
- Verify files are valid DICOM format using a DICOM viewer
- Check if files were properly exported from imaging equipment
- Use different sample data for testing if files are consistently invalid
- Consider using the
--force-scanflag (though this may not resolve UID issues)