0
votes

I'm using vtkDICOMImageReader to get patient's information like name, descriptive name, studyID and studyUID, and image data. I wanted to get patient's ID. How can I do that?

vtkDICOMImageReader doesn't provide this function.

Posisble solutions:

  1. Using vtkMedicalImageReader2.
  2. Get a library to read the DICOM image's dcm file/extension.
  3. Use itk-snap.

What is the best way to get patient's ID?

Thanks a bunch! :)

3

3 Answers

1
votes

The "best" way ... well, more or less opinion based. 8)

If the patient id is the only necessary information you need, then it´s might be enough to use the vtkMedicalImageReader2. Depending on your VTK version, because there was a bug in a earlier version, which always returns null instead of the patient data.

But of course there are also some external libs to read the dicom header informations. e.g. you can take a look at the vtkGDCMImageReader

0
votes

A very easy way is to load your DICM data in 3DSLICER, when you do so you face such a window:

slicer dicom

And you can access to all information you need such as Patient ID :)

0
votes

If you need to access the DICOM header data programmatically, and if you happen to work in python, the pydicom module is most certainly helpful enough:

import pydicom
filename = 'path/to/your/dicom.dcm'
dcm = pydicom.dcmread(filename)
print(dcm.PatientID)