Skip to content

Commit 69dc171

Browse files
authored
Refactor: Reorganize statistical model workflows and standardize experiment naming (#24)
* Moves heart statistical model creation notebooks from data/KCL-Heart-Model to experiments/Heart-Create_Statistical_Model with sequential numbering. * Renames experiment folders to use Title-Case with hyphens for consistency - Heart-Model_To_Patient → Heart-Statistical_Model_To_Patient - convert_vtk_to_usd_lib → Convert_VTK_To_USD. * Removes outdated SlicerSALT documentation files and adds input_meshes directory structure.
1 parent 66b8fbe commit 69dc171

68 files changed

Lines changed: 7815 additions & 3873 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursor/rules/project-standards.mdc

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,24 @@ git mv old_name.py new_name.py
2525

2626
## Documentation
2727

28-
**Do NOT create extra documentation files** describing what was done:
28+
**NEVER create .md files unless explicitly requested by the user or unless creating a new module in a directory that does not already have a README.md, then a README.md may be created if appropriate.**
2929

3030
❌ **Don't create**:
3131
- `MIGRATION.md`
3232
- `CHANGES.md`
3333
- `UPDATE_SUMMARY.md`
3434
- `MODERNIZATION_*.md`
35-
- Similar meta-documentation files
35+
- `*_GUIDE.md`
36+
- `*_EXAMPLE.md`
37+
- `*_SUMMARY.md`
38+
- Any other .md files without explicit user request except README.md files for new modules.
3639

3740
✅ **Do document**:
3841
- In-code docstrings
3942
- README files for new modules
4043
- Inline comments for complex logic
41-
- API documentation in existing docs
44+
- Update existing README.md files when needed
45+
- API documentation in existing docs structure
4246

4347
## Backward Compatibility
4448

@@ -57,6 +61,24 @@ git mv old_name.py new_name.py
5761
- Use `logging` module instead of `print` statements
5862
- Follow PEP 8 for Python code
5963

64+
## Python Commands
65+
66+
**Use `py` for running Python on this Windows system:**
67+
68+
```bash
69+
# Running Python
70+
py script.py
71+
72+
# Running modules
73+
py -m pytest tests/
74+
75+
# Python version
76+
py --version
77+
```
78+
79+
❌ **Don't use**: `python` (not available in PATH)
80+
✅ **Do use**: `py` (Python launcher for Windows)
81+
6082
## Testing
6183

6284
- Test new functionality with Jupyter notebooks in `experiments/`

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,17 +413,30 @@ Direct VTK time series to USD conversion for cardiac data:
413413
- **`0-download_and_convert_4d_to_3d.ipynb`**: Data preparation
414414
- **`1-heart_vtkseries_to_usd.ipynb`**: VTK series to USD conversion
415415

416-
### 🧠 Heart Model to Patient (`experiments/Heart-Model_To_Patient/`)
416+
### 🧠 Heart Create Statistical Model (`experiments/Heart-Create_Statistical_Model/`)
417417

418-
Advanced registration between generic anatomical models and patient-specific data:
418+
Create PCA statistical shape models from population meshes using the KCL Heart Model dataset:
419419

420-
- **`heart_model_to_patient.ipynb`**: Complete model-to-patient registration workflow
420+
- **`1-input_meshes_to_input_surfaces.ipynb`**: Convert meshes to surfaces
421+
- **`2-input_surfaces_to_surfaces_aligned.ipynb`**: Align population meshes
422+
- **`3-registration_based_correspondence.ipynb`**: Compute point correspondences
423+
- **`4-surfaces_aligned_correspond_to_pca_inputs.ipynb`**: Prepare PCA inputs
424+
- **`5-compute_pca_model.ipynb`**: Compute PCA model using sklearn
425+
426+
**⚠️ Complete this experiment FIRST** before attempting `Heart-Statistical_Model_To_Patient`.
427+
428+
### 🧠 Heart Statistical Model to Patient (`experiments/Heart-Statistical_Model_To_Patient/`)
429+
430+
Advanced registration between generic anatomical models and patient-specific data using PCA:
431+
432+
- **`heart_model_to_model_icp_itk.ipynb`**: ICP registration for initial alignment
421433
- **`heart_model_to_model_registration_pca.ipynb`**: PCA-based statistical shape model registration
434+
- **`heart_model_to_patient.ipynb`**: Complete model-to-patient registration workflow
422435

423436
Uses the `WorkflowRegisterHeartModelToPatient` class for three-stage registration:
424437
1. ICP-based rough alignment
425438
2. Mask-to-mask deformable registration
426-
3. Optional mask-to-image refinement
439+
3. Optional PCA-constrained shape fitting
427440

428441
### 🔬 4D CT Reconstruction (`experiments/Reconstruct4DCT/`)
429442

data/CHOP-Valve4D/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
Alterra*
22
TPV*
3+
CT

data/KCL-Heart-Model/1-input_meshes_to_input_surfaces.ipynb

Lines changed: 0 additions & 131 deletions
This file was deleted.

0 commit comments

Comments
 (0)