Conversation
Remove '4d' suffix from module names, function names, and references throughout the codebase. Update documentation, examples, and notebooks to reflect simplified naming convention. The temporal dimension is implicit in the physiomotion4d package name, and most methods work on 3D as well as 4D data.
There was a problem hiding this comment.
Pull request overview
This PR systematically removes the '4d' suffix from module names, function names, and references throughout the codebase. The rationale is that the temporal dimension is already implicit in the package name (physiomotion4d), and the methods work on both 3D and 4D data.
Changes:
- Renamed all
convert_vtk_4d_to_usd*modules and classes toconvert_vtk_to_usd* - Updated imports and references in test files, source code, and workflows
- Updated documentation files including API docs, guides, and examples
Reviewed changes
Copilot reviewed 45 out of 45 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_convert_vtk_to_usd_polymesh.py | Renamed test file, updated all class imports from ConvertVTK4DToUSDPolyMesh to ConvertVTKToUSDPolyMesh |
| tests/TESTING_GUIDE.md | Updated test file reference in dependency diagram |
| tests/README.md | Updated test file reference in documentation |
| tests/GITHUB_WORKFLOWS.md | Updated pytest command to reference new test file name |
| statistics.md | Updated module names in statistics table |
| src/physiomotion4d/workflow_convert_heart_gated_ct_to_usd.py | Updated import from convert_vtk_4d_to_usd to convert_vtk_to_usd |
| src/physiomotion4d/convert_vtk_to_usd_tetmesh.py | Updated imports and class name from ConvertVTK4DToUSDTetMesh to ConvertVTKToUSDTetMesh |
| src/physiomotion4d/convert_vtk_to_usd_polymesh.py | Updated imports and class name from ConvertVTK4DToUSDPolyMesh to ConvertVTKToUSDPolyMesh |
| src/physiomotion4d/convert_vtk_to_usd_base.py | Updated class name from ConvertVTK4DToUSDBase to ConvertVTKToUSDBase |
| src/physiomotion4d/convert_vtk_to_usd.py | Updated all class names and references, including error messages |
| src/physiomotion4d/init.py | Updated all exports to use new class names |
| experiments/*/notebooks | Updated imports throughout all experiment notebooks |
| docs/**/*.rst | Updated all API documentation and examples with new class names |
| .github/workflows/ci.yml | Updated pytest command in CI workflow |
Comments suppressed due to low confidence (1)
experiments/Heart-GatedCT_To_USD/4-merge_dynamic_and_static_usd.ipynb:77
- This notebook now includes execution outputs and changes the execution_count from null to integer values (1, 2), and also changes file paths to include "results/" prefix. While adding execution outputs can be helpful for documentation, these changes are unrelated to the stated purpose of the PR (removing '4d' naming convention). Consider whether these changes should be in a separate commit or documented in the PR description.
"execution_count": 1,
"id": "3ce61753-11ad-4ade-9afe-6ad1bc748e25",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-26T17:16:51.961127Z",
"iopub.status.busy": "2026-01-26T17:16:51.960134Z",
"iopub.status.idle": "2026-01-26T17:17:25.063841Z",
"shell.execute_reply": "2026-01-26T17:17:25.062413Z"
}
},
"outputs": [],
"source": [
"import os\n",
"\n",
"from physiomotion4d.usd_tools import USDTools"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "4c0ece8e",
"metadata": {
"execution": {
"iopub.execute_input": "2026-01-26T17:17:25.068335Z",
"iopub.status.busy": "2026-01-26T17:17:25.067236Z",
"iopub.status.idle": "2026-01-26T17:18:11.504444Z",
"shell.execute_reply": "2026-01-26T17:18:11.503440Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2026-01-28 13:47:29 INFO USDTools Copying /World to /World\n",
"2026-01-28 13:47:31 INFO USDTools Copying /World to /World\n",
"2026-01-28 13:47:31 INFO USDTools Set stage time range: 0.0 to 20.0\n",
"2026-01-28 13:47:31 INFO USDTools Time codes per second: 1.0, Frames per second: 24.0\n",
"2026-01-28 13:47:45 INFO USDTools Referencing files: 1/2 (50.0%)\n",
"2026-01-28 13:47:45 INFO USDTools Referencing files: 2/2 (100.0%)\n",
"2026-01-28 13:47:45 INFO USDTools Time range: 0.0 to 20.0\n",
"2026-01-28 13:47:45 INFO USDTools Time codes per second: 1.0, Frames per second: 24.0\n",
"2026-01-28 13:47:45 INFO USDTools Flattening composed stage...\n",
"2026-01-28 13:47:46 INFO USDTools Set output TimeCodesPerSecond: 1.0\n",
"2026-01-28 13:47:46 INFO USDTools Set output FramesPerSecond: 24.0\n",
"2026-01-28 13:47:46 INFO USDTools Exporting to results/Slicer_CardiacGatedCT.flattened_merged_painted.usd\n"
]
}
],
"source": [
"usd_tools = USDTools()\n",
"\n",
"if os.path.exists(\"results/Slicer_CardiacGatedCT.merged_painted.usd\"):\n",
" os.remove(\"results/Slicer_CardiacGatedCT.merged_painted.usd\")\n",
"\n",
"usd_tools.merge_usd_files(\n",
" \"results/Slicer_CardiacGatedCT.merged_painted.usd\",\n",
" [\n",
" \"results/Slicer_CardiacGatedCT.dynamic_anatomy_painted.usd\",\n",
" \"results/Slicer_CardiacGatedCT.static_anatomy_painted.usd\",\n",
" ],\n",
")\n",
"\n",
"if os.path.exists(\"results/Slicer_CardiacGatedCT.flattened_merged_painted.usd\"):\n",
" os.remove(\"results/Slicer_CardiacGatedCT.flattened_merged_painted.usd\")\n",
"\n",
"usd_tools.merge_usd_files_flattened(\n",
" \"results/Slicer_CardiacGatedCT.flattened_merged_painted.usd\",\n",
" [\n",
" \"results/Slicer_CardiacGatedCT.dynamic_anatomy_painted.usd\",\n",
" \"results/Slicer_CardiacGatedCT.static_anatomy_painted.usd\",\n",
" ],\n",
")"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| " print(arr.shape)\n", | ||
| " arr = np.where(arr == 0, -1000, arr)\n", | ||
| " for i in range(1, 21):\n", | ||
| " for i in range(4, 21, 4): # Process every 4th to save time for testing\n", |
There was a problem hiding this comment.
This PR changes the loop range from range(1, 21) to range(4, 21, 4) to process every 4th slice for faster testing. While this may be useful for development, this change is unrelated to the stated purpose of the PR (removing '4d' naming convention) and changes the behavior of the notebook. Consider reverting this change or documenting it separately in the PR description.
| "source": [ | ||
| "# When re-running, you can bypass certain long-running steps\n", | ||
| "re_run_image_max = False\n", | ||
| "re_run_image_max = True\n", |
There was a problem hiding this comment.
The configuration flag re_run_image_max is changed from False to True. This behavioral change is unrelated to the stated purpose of the PR (removing '4d' naming convention) and should either be reverted or documented in the PR description.
| "outputs": [], | ||
| "source": [ | ||
| "for i in range(21):\n", | ||
| "for i in range(0, 21, 4): # Process every 4th slice to save time testing\n", |
There was a problem hiding this comment.
This PR changes the loop range from range(21) to range(0, 21, 4) to process every 4th slice. This behavioral change is unrelated to the stated purpose of the PR (removing '4d' naming convention) and changes how the notebook executes. Consider reverting this change or documenting it separately in the PR description.
Remove '4d' suffix from module names, function names, and references throughout the codebase. Update documentation, examples, and notebooks to reflect simplified naming convention. The temporal dimension is implicit in the physiomotion4d package name, and most methods work on 3D as well as 4D data.