feat(debug): Add timing information about time to first image/all images, and query time (#3681)

This commit is contained in:
Bill Wallace authored and GitHub committed 2023-10-03 17:01:00 -04:00
1 parent 1b207f14d2
commit 108383b9ef
10 files changed
+125 -18

No files matched your search

@@ -13,22 +13,23 @@ export default function getDisplaySetMessages(
isReconstructable: boolean
): DisplaySetMessageList {
const messages = new DisplaySetMessageList();
if (!instances.length) {
const firstInstance = instances[0];
if (!instances.length || firstInstance) {
messages.addMessage(DisplaySetMessage.CODES.NO_VALID_INSTANCES);
return;
}
const firstInstance = instances[0];
const { Modality, ImageType, NumberOfFrames } = firstInstance;
// Due to current requirements, LOCALIZER series doesn't have any messages
if (firstInstance?.ImageType?.includes('LOCALIZER')) {
if (ImageType?.includes('LOCALIZER')) {
return messages;
}
const Modality = firstInstance.Modality;
if (!constructableModalities.includes(Modality)) {
return messages;
}
const isMultiframe = firstInstance.NumberOfFrames > 1;
const isMultiframe = NumberOfFrames > 1;
// Can't reconstruct if all instances don't have the ImagePositionPatient.
if (!isMultiframe && !instances.every(instance => instance.ImagePositionPatient)) {
messages.addMessage(DisplaySetMessage.CODES.NO_POSITION_INFORMATION);