[vtkusers] How to extract a specific DICOM Tag using vtkDICOMReader

David Gobbi david.gobbi at gmail.com
Thu Feb 8 12:10:56 EST 2018

Yes, you can try something like this:

positionPath = vtkDICOMPython.vtkDICOMTagPath(
  0, # this is the index

positionValue = metadata.GetAttributeValue(positionPath)
# check positionValue.GetNumberOfValues()
# use positionValue.GetDouble(i) to get values 0, 1, and 2

On Thu, Feb 8, 2018 at 9:51 AM, Jojobus <jojotranel at hotmail.com> wrote:

> Many thanks for your answer. I tried your solution but "position" is
> returning [].
> I think that the cause might be the (0x0020,0x0032) tag
> (ImagePositionPatient) nested in (0x0054,0x0022) with SPECT images (whereas
> it is not the case with CT images, thus directly callable).
> By reading your documentation, the solution might be included with
> vtkDICOMPath, however, I don't know how to manage with it?
> Thanks again for your help,
> Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180208/34e9ecbc/attachment.html>

More information about the vtkusers mailing list