[#6328] SRI24-tzo116plus.txt inconsistent with label map

Please log in

State: more information
Open
Date:
2012-01-27 23:33
Priority: more information
3
Submitted By:
Torsten Rohlfing (torstenrohlfing)
Assigned To: more information
Nobody (None)
Hardware: 
All
Product: 
None
Operating System: 
All
Component: 
None
Version: 
None
Severity: 
trivial
Resolution: 
Accepted As Bug
Summary: more information
SRI24-tzo116plus.txt inconsistent with label map

Detailed description

By: Yaroslav Halchenko

It seems that some labels defined in SRI24-tzo116plus.txt are not defined
in tzo116plus.nii.gz and vise versa. how come?

here is the output of a little python snippet listed below

(array([83, 84]), array([98, 98]), array([55, 55]), array([0, 0]))
Labels present in the map but not in the labels file: set([422, 424, 426, 428, 430, 432, 434, 476, 478])
Labels present in the labels file but not in the map: set([227, 201, 203, 205, 413, 219, 221])

import nibabel as nib;
import numpy as np

atl_tzo116 = "/usr/share/data/sri24-atlas/tzo116plus.nii.gz"
atl_tzo116_labelsfile = '/usr/share/data/sri24-atlas/SRI24-tzo116plus.txt'
atl_tzo116_labels = np.loadtxt(atl_tzo116_labelsfile, dtype=str)
atl_tzo116_labels = dict([(int(i), l) for i,l in atl_tzo116_labels[:, :2]])

ni = nib.load(atl_tzo116)
m = ni.get_data()

mset = set(np.unique(m))
lset = set(np.unique(atl_tzo116_labels.keys()))

print np.where(m == 432)
# so we have voxels labels as 432 which is not present in the labels file

print "Labels present in the map but not in the labels file: ", mset -
lset
print "Labels present in the labels file but not in the map: ", lset -
mset

Response

Message

Date: 2012-03-09 17:14
Sender: Torsten Rohlfing

The missing and extra labels all belong to spatially-encoded structures, i.e., things like the lateral ventricles where the label value encodes the relative A/P location of every coronal slice through the LVs.

So unused labels are slices that were assigned a label in the dictionary, but the respective structure isn't really there.

Labels not in the dictionary are slices where the structure was there but I forgot to list the label in the .txt file.

These will be fixed in the near future. Promise.

Attached Files:

Name Download
No Files Currently Attached

Changes:

Field Old Value Date By
New Message2012-03-09 17:14torstenrohlfing