cornerstonejs / cornerstone3D

Cornerstone is a set of JavaScript libraries that can be used to build web-based medical imaging applications. It provides a framework to build radiology applications such as the OHIF Viewer.
https://cornerstonejs.org
MIT License
578 stars 298 forks source link

[Feature Request] Accessing DICOM Tags #1439

Open vrassouli opened 2 months ago

vrassouli commented 2 months ago

What feature or change would you like to see made?

It would be great to have an API to access all DICOM tags, like PatientName, PatientID, Institution Name, and so on. There are some metadata providers for getting PatientName (for example), but some tags are missing like InstitutionName.

Why should we prioritize this feature?

In cases of existence of multiple studies from multiple sources for a specific patient, it's important and vital to display some tags, to the end user, to prevent miss understandings.

sedghi commented 5 days ago

Retrieve the metadata from metadataModules using metaData.get('moduleName', imageId).

vrassouli commented 4 days ago

But which module has the 'InstitutionName' for example? I checked all the module names, but couldn't find 'InstitutionName'

vrassouli commented 3 days ago

But which module has the 'InstitutionName' for example? I checked all the module names, but couldn't find 'InstitutionName'

I iterate through all modules, but could not find institution name:

for (let item in MetadataModules) { console.log('Module: '+item); let meta = metaData.get(item, viewport.getCurrentImageId()); console.log(meta); }

sedghi commented 1 day ago

Check the file at packages/dicomImageLoader/src/imageLoader/wadors/metaData/metaDataProvider.ts: metaDataProvider.ts.

Review the locations and note the type system here: MetadataModuleTypes.ts.

If anything is missing, feel free to submit a PR to add it to the metaDataProvider.