2015-11-16 17:49:35 +01:00
|
|
|
/**
|
|
|
|
|
* Obtain an imageId for Cornerstone from an image instance
|
|
|
|
|
*
|
|
|
|
|
* @param instance
|
|
|
|
|
* @returns {string} The imageId to be used by Cornerstone
|
|
|
|
|
*/
|
2015-10-13 14:14:50 +02:00
|
|
|
getImageId = function(instance) {
|
|
|
|
|
if (!instance) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (instance.wadouri) {
|
|
|
|
|
return 'dicomweb:' + instance.wadouri; // WADO-URI
|
|
|
|
|
} else {
|
|
|
|
|
return getWADORSImageId(instance); // WADO-RS Retrieve Frame
|
|
|
|
|
}
|
|
|
|
|
};
|