I want to use SimpleITK to obtain the tag information, and the code is:
reader = sitk.ImageFileReader()
reader.SetFileName(fileName)
reader.LoadPrivateTagsOn()
reader.ReadImageInformation()
if reader.HasMetaDataKey('0020|000D'):
val = reader.GetMetaData(tag)
Val[tag] = val
else:
Val[tag] = ''
and it return ‘’, which means the SimpleITK can not obtain the ‘0020|000D’ tag. However, I use radiant to open the dicom, and it can give the ‘0020|000D’ tag:
Is there any wrong with my SimpleITK code ?