Skip to content

[BUG] nibabel 5.3.0 breaks dcmmeta.py #94

Description

@bpinsard

Seems like changes here nipy/nibabel#1336 broke dcmstack dcmmeta.make_empty (FYI: @effigies ), which in turns causes heudiconv to fail too @yarikoptic as can be seen in recent PRs ( eg. nipy/heudiconv#791 ).

As dcmstack do not seem to pin specific version of nibabel as reqs, any fresh install is likely to trigger that bug.

    @classmethod
    def make_empty(klass, shape, affine, reorient_transform=None,
                   slice_dim=None):
        '''Make an empty DcmMetaExtension.
    
        Parameters
        ----------
        shape : tuple
            The shape of the data associated with this extension.
    
        affine : array
            The RAS affine for the data associated with this extension.
    
        reorient_transform : array
            The transformation matrix representing any reorientation of the
            data array.
    
        slice_dim : int
            The index of the slice dimension for the data associated with this
            extension
    
        Returns
        -------
        result : DcmMetaExtension
            An empty DcmMetaExtension with the required values set to the
            given arguments.
    
        '''
        result = klass(dcm_meta_ecode, '{}')
>       result._content['global'] = OrderedDict()
E       TypeError: 'str' object does not support item assignment

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions