fix(core): Address 3D reconstruction and Android compatibility issues and clean up 4D data mode (#4762)
This commit is contained in:
1 parent
4d06a7d286
commit
149d6d049c
32 files changed
+529
-529
No files matched your search
@@ -37,7 +37,7 @@
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "^1.2.4",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.5",
|
||||
"@cornerstonejs/dicom-image-loader": "^2.17.2",
|
||||
"@cornerstonejs/dicom-image-loader": "^2.19.3",
|
||||
"@ohif/ui": "3.10.0-beta.91",
|
||||
"cornerstone-math": "0.1.9",
|
||||
"dicom-parser": "^1.8.21"
|
||||
|
||||
@@ -285,14 +285,25 @@ export default class HangingProtocolService extends PubSubService {
|
||||
* @param protocolId - the id of the protocol
|
||||
* @returns protocol - the protocol with the given id
|
||||
*/
|
||||
public getProtocolById(protocolId: string): HangingProtocol.Protocol {
|
||||
public getProtocolById(protocolId: string, caseInsensitive = true): HangingProtocol.Protocol {
|
||||
if (!protocolId) {
|
||||
return;
|
||||
}
|
||||
if (protocolId === this.protocol?.id) {
|
||||
return this.protocol;
|
||||
}
|
||||
const protocol = this.protocols.get(protocolId);
|
||||
|
||||
let protocol = this.protocols.get(protocolId);
|
||||
if (!protocol && caseInsensitive) {
|
||||
const lowerCaseId = protocolId.toLowerCase();
|
||||
for (const [key] of this.protocols) {
|
||||
if (key.toLowerCase() === lowerCaseId) {
|
||||
protocol = this.getProtocolById(key);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!protocol) {
|
||||
throw new Error(`No protocol ${protocolId} found`);
|
||||
}
|
||||
@@ -533,8 +544,7 @@ export default class HangingProtocolService extends PubSubService {
|
||||
}
|
||||
|
||||
_validateProtocol(protocol: HangingProtocol.Protocol): HangingProtocol.Protocol {
|
||||
protocol.id = protocol.id || protocol.name;
|
||||
protocol.name = protocol.name || protocol.id;
|
||||
protocol.name = protocol.name ?? protocol.id;
|
||||
const { stages } = protocol;
|
||||
|
||||
if (!stages) {
|
||||
|
||||
Reference in new issue
Block a user