AWV-1: Enablind and disabling viewport navigation buttons

This commit is contained in:
Bruno Alves de Faria committed 2016-09-03 10:55:01 -03:00
1 parent e98e686664
commit e4dfd7c4bf
3 files changed
+108 -30

No files matched your search

+12
View File
@@ -46,10 +46,19 @@ createStacks = function(study) {
// Override the default value of instances.length
displaySet.numImageFrames = instance.numFrames;
// Include the instance number
displaySet.instanceNumber = instance.instanceNumber;
displaySets.push(displaySet);
} else if (isSingleImageModality(instance.modality)) {
displaySet = makeDisplaySet(series, [ instance ]);
// Include the study instance Uid
displaySet.studyInstanceUid = study.studyInstanceUid;
// Include the instance number
displaySet.instanceNumber = instance.instanceNumber;
displaySets.push(displaySet);
} else {
stackableInstances.push(instance);
@@ -86,6 +95,9 @@ function makeDisplaySet(series, instances) {
}
});
// Include the first image instance number
displaySet.instanceNumber = displaySet.images[0].instanceNumber;
// Create a unique ID for this stack so we can reference it
displaySet.displaySetInstanceUid = Random.id();
+3 -2
View File
@@ -67,8 +67,9 @@ LayoutManager = class LayoutManager {
const currentLength = self.viewportData.length;
if (currentLength) {
// TODO: isolate displaySets array by study (maybe a map?)
const endIndex = currentViewportIndex + (viewportsAmount - currentLength) + 1;
appendix = displaySets.slice(currentViewportIndex + 1, endIndex);
const beginIndex = sequenceMap.values().next().value[0].displaySetIndex + currentLength;
const endIndex = beginIndex + (viewportsAmount - currentLength);
appendix = displaySets.slice(beginIndex, endIndex);
} else {
// Get available display sets from the first to the grid size
appendix = displaySets.slice(0, viewportsAmount - 1);