ENH: Split VTK by type or connectivity. Greedy Registration#32
ENH: Split VTK by type or connectivity. Greedy Registration#32
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new Greedy-based image registration backend and expands the VTK→USD conversion pipeline with mesh splitting (by connectivity or cell type), a batch/workflow wrapper, and a CLI for running conversions and applying appearance post-processing.
Changes:
- Add
RegisterImagesGreedy(picsl-greedy) with test coverage and fixtures. - Add VTK→USD workflow + CLI, plus mesh splitting utilities and converter support.
- Enhance USD post-processing utilities (solid display color, colormap intensity range) and anatomy material application helpers.
Reviewed changes
Copilot reviewed 21 out of 24 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_register_images_greedy.py | New slow/data-backed test suite for Greedy registration. |
| tests/conftest.py | Adds a session-scoped registrar_greedy fixture and imports RegisterImagesGreedy. |
| src/physiomotion4d/workflow_convert_vtk_to_usd.py | New end-to-end workflow for converting VTK files (single/time series) to USD and applying appearance. |
| src/physiomotion4d/vtk_to_usd/mesh_utils.py | New utilities to split MeshData by cell type or connected components. |
| src/physiomotion4d/vtk_to_usd/data_structures.py | Adds split flags to ConversionSettings and validates mutual exclusivity. |
| src/physiomotion4d/vtk_to_usd/converter.py | Implements split-by-connectivity / split-by-cell-type for single and time-varying conversions. |
| src/physiomotion4d/vtk_to_usd/init.py | Exposes new mesh splitting utilities from the package. |
| src/physiomotion4d/usd_tools.py | Adds intensity_range to colormap application + new set_solid_display_color() and list_mesh_paths_under(). |
| src/physiomotion4d/usd_anatomy_tools.py | Adds anatomy-type mapping + apply_anatomy_material_to_mesh() convenience API. |
| src/physiomotion4d/register_models_pca.py | Broadens type hints to accept pv.PolyData in addition to pv.UnstructuredGrid. |
| src/physiomotion4d/register_images_greedy.py | New Greedy registrar implementation with affine/rigid/deformable support. |
| src/physiomotion4d/cli/convert_vtk_to_usd.py | New CLI entrypoint for VTK→USD workflow configuration and execution. |
| src/physiomotion4d/cli/init.py | Exposes the new CLI module in __all__. |
| src/physiomotion4d/init.py | Exports RegisterImagesGreedy and WorkflowConvertVTKToUSD. |
| pyproject.toml | Adds picsl-greedy dependency and installs the new CLI entrypoint. |
| experiments/Heart-GatedCT_To_USD/test_compare_registration_speed.ipynb | New notebook comparing registration speed across Greedy/ANTs/ICON. |
| experiments/Heart-GatedCT_To_USD/4-merge_dynamic_and_static_usd.ipynb | Minor formatting change in notebook JSON. |
| experiments/Heart-GatedCT_To_USD/2-generate_segmentation.ipynb | Minor formatting change in notebook JSON. |
| experiments/Heart-GatedCT_To_USD/1-register_images.ipynb | Switches notebook registration example from ICON to ANTs and updates loop stride. |
| experiments/Heart-GatedCT_To_USD/0-download_and_convert_4d_to_3d.ipynb | Minor formatting change in notebook JSON. |
| experiments/Convert_VTK_To_USD/convert_chop_valve_to_usd.ipynb | Updates experiment notebook to TPV25-only and demonstrates new splitting capabilities. |
| docs/testing.rst | Documents the new Greedy registration test module. |
| docs/developer/architecture.rst | Adds Greedy registrar to the architecture/module listing. |
| README.md | Adds Greedy registration tests to the testing command list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 26 out of 29 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 30 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 30 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 30 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 41 out of 41 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.