dicomweb-client
dicomweb-client copied to clipboard
corrected _getSharedMediaTypes to enable methods like retrieveStudy w…
…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 is this still valid? I'm not familiar with the issue myself.
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.
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?