Non integer labels in Colin27 2008 version
See original GitHub issue🐛Bug
Class labels in Colin27 dataset, version 2008, are not integer values.
To reproduce
from torchio.datasets import Colin27
colin = Colin27(2008)
label_values = colin['cls']['data'].unique()
print(label_values)
>>> tensor([ 0.0000, 0.9882, 2.0235, 3.0118, 4.0000, 4.9882, 6.0235, 7.0118,
8.9882, 10.0235, 11.0118, 12.0000])
Expected behavior
Label encoding map should only contain integer values.
TorchIO version
0.17.7
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
Colin 27 2008 | McConnell Brain Imaging Centre
Colin 27 Average Brain, Stereotaxic Registration Model, high-resolution version 2008. Overview. The anatomical phantom is derived from T1, T2, PD-weighted ...
Read more >Voxel label data warped to fit the Colin27 MRI average: the 3D...
Each region was assigned an integer label (totaling 105 regions). ... structures from the voxel label atlas was completed using a modified version...
Read more >torchio.transforms.preprocessing.label.remove_labels
Args: labels: A sequence of label integers that will be removed. background_label: integer ... Colin27(2008) label_map = colin.cls colin.remove_image('t2') ...
Read more >The SRI24 multichannel atlas of normal adult human brain ...
This article describes the SRI24 atlas, a new standard reference system of normal human brain anatomy, that was created using template-free ...
Read more >The Brain Atlas Concordance Problem: Quantitative ... - PLOS
Currently, however, no widely accepted standards exist for partitioning the cortex and subcortical structures, or for assigning labels to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I removed the slope from the file
and the values are now
Indeed to get 12 from 255 you need to multiply by
12/255 = 0.047058823529411764
, which is the intercept stored in the header. However,234 * 0.047058823529411764 = 11.0118
. It looks like, for some reason, someone decided to store the labels from 0 to 255 for some reason, and adding a slope. Maybe this worked with the software they use at the MNI because the labels are rounded after reading.I think the best for now is just rounding the values ourselves when reading the CLS image.
Thanks for reporting, @GFabien. This is weird, and I don’t think there’s much we can do about this. I tried reading the image with ITK and results are the same. I checked the intercept and slope values in the NIfTI header and I found nothing interesting:
I’ve been googling with no success. I think that the only solution for now is to
round
the data in theColin27
class of thetorchio.datasets.mni.colin
module.