[vtkusers] How to extract a specific DICOM Tag using vtkDICOMReader
Jojobus
jojotranel at hotmail.com
Thu Feb 8 04:35:52 EST 2018
Hello vtk(-dicom) users,
I am attempting to extract the ImagePatientPosition tag (0020,0032) from a
SPECT DICOM image using vtk-dicom library and python. However, I am
encountering some trouble to find the right combinaison between the
vtkDICOMTag and vtkDICOMReader. My written code so far is below:
directory = vtkDICOMPython.vtkDICOMDirectory()
directory.SetDirectoryName(PathDicomSPECT)
directory.Update()
readerSPECT = vtkDICOMPython.vtkDICOMReader()
readerSPECT.SetFileNames(directory.GetFileNamesForSeries(0))
readerSPECT.Update()
# No encountered troubles so far but for the next step...
TagPatientPosition=vtkDICOMPython.vtkDICOMTag(20,32)
MetaPatientPosition=vtkDICOMPython.vtkDICOMMetaData()
MetaPatientPosition.GetAttributeValue(TagPatientPosition)
#What is the right thing to code in order to be linked with readerSPECT?
How can code the vtkDICOMImageReader equivalent of GetImagePositionPatient
() ?
Many thanks in advance !
Jonathan
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list