View in #cornerstone3d on Slack
@Mateo_Prados: Hello! Is there a way to retrieve all the information (with DICOM tags) from my image in a format that I can manipulate without having to check each tag individually?
for example:
const data = {
patient_name: csImage.data.string('x00100010'),
patient_id: csImage.data.string('x00100020'),
patient_sex: csImage.data.string('x00100040'),
patient_age: csImage.data.string('x00101010'),
series_date: csImage.data.string('x00080021'),
series_modality: csImage.data.string('x00080060'),
series_number: csImage.data.string('x00200011'), };
@Ibrahim_Mohamed: You can use the built-in metaDataProvider
that comes with cornerstone3D/dicomImageLoader
It does a pretty good job at fetching most tags
<https://github.com/cornerstonejs/cornerstone3D/blob/db9d5cabf22c0211a6a894119b5e0138a9221d04/packages/core/src/enums/MetadataModules.ts>
<https://github.com/cornerstonejs/cornerstone3D/blob/d68d6d0c4b9c7b18b794ccac90695b79ac87fc30/packages/dicomImageLoader/src/imageLoader/wadors/metaData/metaDataProvider.ts>
These should help, then you can call metaDataProvider.get(type, imageId)
and you can get the imageId
with something like viewport.getCurrentImageId()
You will find the list of types in the first link, in your example, you would need to retrieve generalSeriesModule
, patientStudyModule
, patientModule
or pass type instance
to get everything back I believe