Skip to content

Utility to fetch CSA headers from DICOM? #16

Description

@matthew-brett

Nibabel has a get_csa_header function : https://github.com/nipy/nibabel/blob/master/nibabel/nicom/csareader.py#L31

It implements the logic of finding the image or series CSA header from the DICOM file. I see from that file that there is logic for finding where the relevant private elements start: https://github.com/nipy/nibabel/blob/master/nibabel/nicom/utils.py#L7. . So, for example, instead of doing this:

raw_csa = dcm.get((0x29, 0x1020)).value
CsaHeader(raw_csa).read()

you can do this:

get_csa_header(dcm, 'image')

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions