changeset 2184:fc320529cdc0

added JavaScript function GetActiveSeries()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 22 Jan 2025 15:07:22 +0100 (3 months ago)
parents 2b0002d34295
children 115628b0651d
files Applications/StoneWebViewer/WebApplication/app.js
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebApplication/app.js	Fri Jan 17 12:32:59 2025 +0100
+++ b/Applications/StoneWebViewer/WebApplication/app.js	Wed Jan 22 15:07:22 2025 +0100
@@ -729,6 +729,24 @@
       }
     },
 
+    GetActiveSeries: function() {
+      if (this.activeViewport == 1) {
+        return this.viewport1Content.series;
+      }
+      else if (this.activeViewport == 2) {
+        return this.viewport2Content.series;
+      }
+      else if (this.activeViewport == 3) {
+        return this.viewport3Content.series;
+      }
+      else if (this.activeViewport == 4) {
+        return this.viewport4Content.series;
+      }
+      else {
+        return null;
+      }
+    },
+
     SetResources: function(sourceStudies, sourceSeries) {
       // Here one can fix input studies/series for missing DICOM tags
       // that are needed for the Stone Web viewer (e.g. "hand.dcm")