Mathieu Guay-Paquet
Mathieu Guay-Paquet
After some more investigation, the cause is not as expected. In fact, the specific error message about `UnboundLocalError: local variable 'approx_distance_to_next_disc' referenced before assignment` can only happen in the **first**...
Some initial observations, based on the files provided (thanks @valosekj for the comprehensive steps to reproduce!): * The two segmentation files `sub-001_T2star_seg.nii.gz` and `sub-001_T2star_gmseg.nii.gz` both correctly contain only 0 and...
Some more observations: * The provided `.nii.gz` files have almost the same header. The main difference is in the `scl_slope` and `scl_inter` header values (which nibabel doesn't show accurately, sadly)....
There are calls to `get_header()` in four files: - [ ] [registration/algorithms.py](https://github.com/spinalcordtoolbox/spinalcordtoolbox/blob/6c3a6c1244faadf2c597b21e7618a319d72076e7/spinalcordtoolbox/registration/algorithms.py#L1401) - [ ] [scripts/sct_create_mask.py](https://github.com/spinalcordtoolbox/spinalcordtoolbox/blob/6c3a6c1244faadf2c597b21e7618a319d72076e7/spinalcordtoolbox/scripts/sct_create_mask.py#L228) - [x] [scripts/sct_dmri_denoise_patch2self.py](https://github.com/spinalcordtoolbox/spinalcordtoolbox/blob/6c3a6c1244faadf2c597b21e7618a319d72076e7/spinalcordtoolbox/scripts/sct_dmri_denoise_patch2self.py#L103) - [ ] [scripts/sct_denoising_onlm.py](https://github.com/spinalcordtoolbox/spinalcordtoolbox/blob/6c3a6c1244faadf2c597b21e7618a319d72076e7/spinalcordtoolbox/scripts/sct_denoising_onlm.py#L117) A simple text search shows 42 calls...
That sounds great, thanks for the nice description! It should certainly be possible to integrate this into SCT. Looking at the existing SCT scripts, I see some related scripts: *...
Since the [sct-pipeline/bavaria-quebec](https://github.com/sct-pipeline/bavaria-quebec) repository is public, we can link to it. I guess the file [stitch.py](https://github.com/sct-pipeline/bavaria-quebec/blob/main/source/stitching/stitch.py) is what you're talking about (although that may be an older version than what...
Tagging @rohanbanerjee, just so that it's easy for you to find this page later.
+1 from me for linking each page to the other, rather than melding them together. An additional point against a "next steps" approach is that we encourage users in general...
Great investigation and summary, thanks!
New repository created: [manual-correction](https://github.com/spinalcordtoolbox/manual-correction). To do: * Collect the different versions of the script in various repositories, and put each one, as-is, in a separate branch of this repository *...