Comments (1)
Based on the IndexError, we can infer that the issues begin appearing immediately after cropping.
Working backwards from cropping:
- The user is supplying >2 landmarks, so cropping is based on labels.
- However, for some reason, the coordinates of the labels differ:
- Initial RPI seg: Label coords are
[32,127,118,1, 30,122,119,2, 28,118,121,3, 25,113,124,4, 22,113,126,5, 19,113,129,6, 17,118,132,7, 14,109,137,8, 11,104,146,9]
- Initial ASR seg: Label coords are
[22,137,184,1, 23,136,173,2, 24,123,97,7, 24,133,158,3, 25,126,110,6, 25,129,125,5, 25,131,141,4, 26,117,82,8, 27,109,65,9]
- Initial RPI seg: Label coords are
- It turns out that the label coords start out the same, but diverge after the resampling step.
- This is because of two factors:
- Resampling for labels is done in a special way, involving both the label image and the anat image.
- Resampling occurs before reorientation to RPI.
- The end result being that the resampling function fetches the dimensions from two differently-oriented images, causing the resampling factors to be computed incorrectly.
To fix this, all we have to do is reorient to RPI before performing resampling, and everything turns out as expected.
from spinalcordtoolbox.
Related Issues (20)
- Angle correction is performed incorrectly when segmentation does not begin at `z=0`, causing `nan` lengths HOT 4
- Prototype sub-commands for the `sct_deepseg` CLI
- `dipy==1.8.0` causes `trx-python` dependency conflict with `ivadomed`, resulting in failing SCT installations HOT 11
- Discussing strategies to backup IDE-related config files HOT 1
- Add check to ensure image and mask are in the same space
- Create labeled segmentation from disc labels HOT 3
- `isct_spine_detect` call fails if the filepath to the binary contains a space HOT 1
- Straightening fails during PAM50 registration when using 3+ disc labels without labels 1/2 HOT 5
- Extend `sct_compute_compression` to MCC HOT 2
- Train model to detect cord compression HOT 4
- Train a model to perform segmentation of gray matter from the OGrady dataset from Vanderbilt
- Fetch VENC from DICOM and/or JSON
- Correction for phase wraps
- Use of a mask to compute flow
- Output QC report of velocity
- Background removal
- RTD build failing HOT 1
- Document better the need for Rosetta 2 on Apple Silicon (M1, M2, M3)
- Update `sct_compute_compression` and `sct_process_segmentation` refs
- Averaging of motion parameters should use unsigned displacement HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spinalcordtoolbox.