Comments (6)
Works with testing/data/errsm_23
from spinalcordtoolbox.
Tried with labels: C2-T2 (2-9) (instead of C2-T3: 2-10).
sct_register_to_template.py -i t2_crop.nii.gz -l landmarks_rpi_crop__C2-T2.nii.gz -m segmentation_binary_crop.nii.gz -s superfast -r 0
--> that worked!
from spinalcordtoolbox.
Tried with labels: C2-T4 (2-11)
sct_register_to_template.py -i t2_crop.nii.gz -l landmarks_rpi_crop__C2-T4.nii.gz -m segmentation_binary_crop.nii.gz -s superfast -r 0
--> that crashed!
ERROR!!!
fix-label 21 movlabel 21
labels do not match -- exiting
Exit program.
So it looks like it is not possible to input labels bigger than 9. This needs to be fixed
from spinalcordtoolbox.
Created labels with itksnap. And checked with:
sct_label_utils.py -i label_itksnap.nii.gz -t display-voxel
Values are now:
Position=(49,192,249) -- Value= 24
Position=(51,191,105) -- Value= 104
Position=(56,186,249) -- Value= 23
Position=(56,187,105) -- Value= 103
Position=(56,194,105) -- Value= 101
Position=(56,196,249) -- Value= 21
Position=(62,191,105) -- Value= 102
Position=(64,191,249) -- Value= 22
Instead of:
Position=(49,189,104) -- Value= 104.0
Position=(49,190,104) -- Value= 104.0
Position=(49,190,255) -- Value= 24.0
Position=(49,191,104) -- Value= 104.0
Position=(49,191,255) -- Value= 24.0
Position=(49,192,255) -- Value= 24.0
Position=(50,189,104) -- Value= 104.0
Position=(50,190,104) -- Value= 104.0
Position=(50,190,255) -- Value= 24.0
Position=(50,191,104) -- Value= 104.0
...
So the ".0" at the end seems to make the difference.
from spinalcordtoolbox.
Investigating datatype:
fslhd gives:
- label_itksnap: UINT16
- landmarks_rpi_cross3x3: INT32
- landmarks_rpi_cross3x3_straight.nii.gz: FLOAT32
- template_label_cross.nii.gz: INT32
- template_label.nii.gz: UINT32
from spinalcordtoolbox.
Changed output datatype for UINT16. Command ran:
c3d ../t2_crop.nii.gz -o data.nii
c3d ../landmarks_rpi_crop.nii.gz -o landmarks.nii
c3d ../segmentation_binary_crop.nii.gz -o segmentation.nii
sct_orientation -i data.nii -o data_rpi.nii.gz -orientation RPI
sct_orientation -i landmarks.nii.gz -o landmarks_rpi.nii.gz -orientation RPI
sct_orientation -i segmentation.nii.gz -o segmentation_rpi.nii.gz -orientation RPI
sct_straighten_spinalcord.py -i data_rpi.nii.gz -c segmentation_rpi.nii.gz -r 1
sct_label_utils.py -t remove -i ${SCT_DIR}/data/template/landmarks_center.nii.gz -o template_label.nii.gz -r landmarks_rpi.nii.gz
sct_label_utils.py -t cross -i template_label.nii.gz -o template_label_cross.nii.gz -c 5
sct_label_utils.py -t cross -i landmarks_rpi.nii.gz -o landmarks_rpi_cross3x3.nii.gz -c 5 -d
WarpImageMultiTransform 3 landmarks_rpi_cross3x3.nii.gz landmarks_rpi_cross3x3_straight.nii.gz -R data_rpi_straight.nii.gz warp_curve2straight.nii.gz --use-NN
ANTSUseLandmarkImagesToGetAffineTransform template_label_cross.nii.gz landmarks_rpi_cross3x3_straight.nii.gz affine tmp.straight2templateAffine.txt
error:
fix-label 21 movlabel 21
labels do not match -- exiting
datatypes are:
- landmarks_rpi_cross3x3: UINT16
- landmarks_rpi_cross3x3_straight.nii.gz: FLOAT32
- template_label_cross.nii.gz: UINT16
- template_label.nii.gz: UINT16
from spinalcordtoolbox.
Related Issues (20)
- Installation of SCT 6.2 failed on macos 10.15 HOT 5
- Refactor `sct_deepseg` to store model orientation in model dict HOT 4
- Debian Rolling Release CI runs are failing due to `libglib2.0-0` dependency installation
- Integration of EPI segmentation nnUNet model in SCT HOT 3
- Outdated Node.js 16 action present in `automate-changelog-PR.yml` HOT 1
- What colormap should be used for soft segmentation QCs? (single color vs. gradient) HOT 15
- Sagittal mosaic QC report is tiny for 1.0mm istropic image with 75 slices HOT 5
- Running SCT commands in 3DSlicer GUI? HOT 3
- Fix issues with `sct_deepseg` rootlets QC report HOT 1
- Should we issue certificates for the SCT course?
- Indicate versions of `sct_deepseg` models HOT 5
- `Keyword=CombinedLabels` incompatible with `combine=1`
- pytest issue `assert not changed` and how to run in IDE HOT 3
- Custom argparse formatter fails for blank lines in multiline strings HOT 2
- Usage of `sct_label_utils -disc <file>` is unclear
- Project discs orthogonally to the spinal cord segmentation or centerline
- Straightening is not a bijective transformation HOT 14
- viewer syntax at the end does not provide correct output file name HOT 1
- Add postprocessing functionality for the new monai/nnunet models
- qc report to display manual segmentation HOT 5
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.