pylidc
pylidc copied to clipboard
Contrast agent ambiguity
Hi,
I noticed the following metadata in LIDC-IDRI-0132/1.3.6.1.4.1.14519.5.2.1.6279.6001.218658642102832118810712329678/1.3.6.1.4.1.14519.5.2.1.6279.6001.151647338241909635299641922057/000000.dcm:
[0040,0275] RequestAttributesSequence SQ 94
[fffe,e000] Item na 78
[0040,0007] ScheduledProcedureStepDescription CT, CHEST, W CONTRAST LO 22
It's writtent W CONTRAST , yet pylidc returns contrast_used == False.
I think pylidc is correct since there's not Contrast/Bolus Agent dicom field, but i'm not sure...
any opinion?
thanks
LIDC-IDRI-0086,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT, CHEST, W CONTRAST' LIDC-IDRI-0094,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT,CHEST,W CONTRAST' LIDC-IDRI-0095,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT,CHEST,W CONTRAST' LIDC-IDRI-0098,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT, CHEST, W CONTRAST' LIDC-IDRI-0101,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT,CHEST/ABDOMEN,W CONTRAST' LIDC-IDRI-0103,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT, CHEST, W/O CONTRAST' LIDC-IDRI-0110,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT,CHEST,W CONTRAST' LIDC-IDRI-0119,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT,CHEST,W CONTRAST' LIDC-IDRI-0127,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT, CHEST, W CONTRAST' LIDC-IDRI-0130,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT, CHEST, W CONTRAST' LIDC-IDRI-0132,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT, CHEST, W CONTRAST' LIDC-IDRI-0136,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT, CHEST/ABDOMEN, WITH CONTRAST' LIDC-IDRI-0141,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT,CHEST,W CONTRAST' LIDC-IDRI-0142,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT,CHEST,W CONTRAST' LIDC-IDRI-0151,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT,CHEST,W CONTRAST' LIDC-IDRI-0303,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT, CHEST, W CONTRAST' LIDC-IDRI-0358,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT,CHEST,W & W/O CONTRAST' LIDC-IDRI-0435,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT, CHEST, W CONTRAST' LIDC-IDRI-0436,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT, CHEST, W CONTRAST' LIDC-IDRI-0468,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT,CHEST,W CONTRAST' LIDC-IDRI-0546,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT,CHEST,W/O CONTRAST' LIDC-IDRI-0648,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT, CHEST, WITHOUT CONTRAST' LIDC-IDRI-0713,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT,CHEST,W CONTRAST' LIDC-IDRI-0719,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT,CHEST,W CONTRAST' LIDC-IDRI-0791,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT,CHEST,W CONTRAST' LIDC-IDRI-0793,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT, CHEST, W CONTRAST' LIDC-IDRI-0837,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT THORAX WO IV CONTRAST' LIDC-IDRI-0883,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT,CHEST,W CONTRAST' LIDC-IDRI-0962,(0040, 0007) Scheduled Procedure Step Descriptio LO: 'CT, CHEST, W CONTRAST'
Thanks for pointing this out, @Jonas1312. My suggestion at this point would be to consider the DICOM files themselves as the source of truth for these types of attributes, and only use the pylidc / sqlalchemy layer for more basic attributes (e.g., slice thickness) or for annotation attributes (spiculation, etc).
@Jonas1312 if you don't mind, I'll leave this open for greater visibility since I think I would still consider this an issue (albeit with a workaround of just using the DICOM directly for these attributes as suggested above)
Hi @notmatthancock ,
Yes we should keep this open (maybe add a "warning contrast_used labels not accurate" to the README.md?)
Unfortunately some DICOM tags for contrast agent are missing, especially in Philips dicoms. Absence of the "ContrastBolusAgent" tag doesn't mean there's not contrast agent.
A surgeon came to my office last week and gave me some tips to "read" a CT scan and detect if a patient has had an injection of intravenous contrast agent.
The best way to do that is to set a Hounsfield units window of [50HU ; 300HU] and if the aorta can be seen on the CT that means there is an IV contrast material. For oral/rectal contrast you have to look at the stomach and intestines.
LIDRI-IDRI-0033: (IV and probably oral/rectal)

LIDC-IDRI-0346: nothing

You can find the corrected labels here IV contrast.csv. For IV contrast only (oral/rectal is considered as contrast_used=False). I labelled the images myself but I'm not a certified radiologist! However I'm quite confident that my labels are more accurate than those generated this way: https://github.com/notmatthancock/pylidc/blob/b9f7a464e4531178c2d7e94af10bffe1a3c04bf9/_populate_db/populate.py#L119