Skip to content
Snippets Groups Projects
Commit 7778bf0d authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Bugfix in Nifti1.__determineTransform - a scaling matrix should be used

when both q/sforms are unknown. Otherwise should default to
nibabel. Also added method to MelodicClassification to return all labels.
parent cab86421
No related branches found
No related tags found
No related merge requests found
......@@ -137,7 +137,7 @@ class Nifti(object):
# corresponds to world location (0, 0, 0).
# This goes against the NIFTI spec - it
# should just be a straight scaling matrix.
elif header['qform_code'] == 0 or header['sform_code'] == 0:
elif header['qform_code'] == 0 and header['sform_code'] == 0:
pixdims = header.get_zooms()
voxToWorldMat = transform.scaleOffsetXform(pixdims, 0)
......
......@@ -163,6 +163,13 @@ class MelodicClassification(notifier.Notifier):
return list(self.__labels[component])
def getAllLabels(self):
"""Returns all labels that are currently associated with any
component.
"""
return list(self.__components.keys())
def hasLabel(self, component, label):
"""Returns ``True`` if the specified component has the specified label,
``False`` otherwise.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment