dicomweb-client icon indicating copy to clipboard operation
dicomweb-client copied to clipboard

corrected _getSharedMediaTypes to enable methods like retrieveStudy w…

Open Christian-e-S opened this issue 3 years ago • 3 comments

…hich check for commonMediaType === MEDIATYPES.DICOM

Problem description: Some functions like "retrieveStudy(options)" check for commonMediaType === MEDIATYPES.DICOM and throw "Media type ${commonMediaType} is not supported for retrieval of study." when the condition is not met.

Current implementation of _getSharedMediaTypes returns "application/" for "application/dicom" which will not meet the condition above.

With the modification that I have introduced, "application/dicom" will stay intact.

Please note: There was something similar in previous versions of this code.

Christian-e-S avatar Jun 27 '22 13:06 Christian-e-S

@Christian-e-S is this still valid? I'm not familiar with the issue myself.

pieper avatar Jun 21 '24 12:06 pieper

I pass below param to retrieveStudy(options)

{
        studyInstanceUID,
        mediaTypes: [{
          transferSyntaxUID: '1.2.840.10008.1.2.4.90',
          mediaType: 'image/jp2'
        }
        ],
 }

I got an error: Media type image/ is not supported for retrieval of study.

lam0620 avatar Jul 09 '24 09:07 lam0620

Okay, this sounds reasonable, but I'm wary to change this code since it's very hard to test for any side effects.

Can you create an issue and reference it here that describes the scenario in which this happens? I.e. what types of data is involved (SM? US? MR?) and what servers?

pieper avatar Jul 09 '24 12:07 pieper