test(CornerstoneUtils): Adding unit tests for most of Cornerstone Extension utilities (#5454)
This commit is contained in:
1 parent
44beac799f
commit
3c421f124e
35 files changed
+8743
-66
No files matched your search
@@ -39,31 +39,6 @@ export default function interleaveTopToBottom({
|
||||
}
|
||||
}
|
||||
|
||||
const filteredMatchDetails = [];
|
||||
const displaySetsToLoad = new Set();
|
||||
|
||||
// Check all viewports that have a displaySet to be loaded. In some cases
|
||||
// (eg: line chart viewports which is not a Cornerstone viewport) the
|
||||
// displaySet is created on the client and there are no instances to be
|
||||
// downloaded. For those viewports the displaySet may have the `skipLoading`
|
||||
// option set to true otherwise it may block the download of all other
|
||||
// instances resulting in blank viewports.
|
||||
Array.from(matchDetails.values()).forEach(curMatchDetails => {
|
||||
const { displaySetsInfo } = curMatchDetails;
|
||||
let numDisplaySetsToLoad = 0;
|
||||
|
||||
displaySetsInfo.forEach(({ displaySetInstanceUID, displaySetOptions }) => {
|
||||
if (!displaySetOptions?.options?.skipLoading) {
|
||||
numDisplaySetsToLoad++;
|
||||
displaySetsToLoad.add(displaySetInstanceUID);
|
||||
}
|
||||
});
|
||||
|
||||
if (numDisplaySetsToLoad) {
|
||||
filteredMatchDetails.push(curMatchDetails);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* The following is checking if all the viewports that were matched in the HP has been
|
||||
* successfully created their cornerstone viewport or not. Todo: This can be
|
||||
|
||||
Reference in new issue
Block a user