changeset 36:5f8d66f7fa06

Enabled support for segmentation and microscopy modes
author Alain Mazy <am@osimis.io>
date Fri, 15 Mar 2024 17:52:06 +0100
parents d16e40e084dc
children 63a5b4277cfc
files NEWS Sources/OrthancExplorer.js Sources/Plugin.cpp
diffstat 3 files changed, 24 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Fri Mar 15 15:40:27 2024 +0100
+++ b/NEWS	Fri Mar 15 17:52:06 2024 +0100
@@ -4,6 +4,8 @@
 * Patching OHIF code for https://github.com/OHIF/Viewers/issues/3928
   to allow using token args in url.
 * Update OHIF to 3.8.0-beta.60
+* Enabled support for segmentation and microscopy modes.
+  Note that the microscopy mode is not stable yet in OHIF !
 
 
 Version 1.2 (2024-01-04)
--- a/Sources/OrthancExplorer.js	Fri Mar 15 15:40:27 2024 +0100
+++ b/Sources/OrthancExplorer.js	Fri Mar 15 17:52:06 2024 +0100
@@ -90,6 +90,22 @@
           }
         });
 
+        AddOhifViewer(viewers, 'Segmentation', function() {
+          if (${USE_DICOM_WEB}) {
+            window.open('../ohif/segmentation?StudyInstanceUIDs=' + studyInstanceUid);
+          } else  {
+            window.open('../ohif/segmentation?url=../studies/' + studyId + '/ohif-dicom-json');
+          }
+        });
+
+        AddOhifViewer(viewers, 'Microscopy', function() {
+          if (${USE_DICOM_WEB}) {
+            window.open('../ohif/microscopy?StudyInstanceUIDs=' + studyInstanceUid);
+          } else  {
+            window.open('../ohif/microscopy?url=../studies/' + studyId + '/ohif-dicom-json');
+          }
+        });
+
         // Launch the dialog
         $('#dialog').simpledialog2({
           mode: 'blank',
--- a/Sources/Plugin.cpp	Fri Mar 15 15:40:27 2024 +0100
+++ b/Sources/Plugin.cpp	Fri Mar 15 17:52:06 2024 +0100
@@ -540,9 +540,12 @@
     std::string s = (userConfiguration_ + "\n" + system);
     OrthancPluginAnswerBuffer(context, output, s.c_str(), s.size(), "text/javascript");
   }
-  else if (uri == "" ||      // Study list
-           uri == "tmtv" ||  // Total metabolic tumor volume
-           uri == "viewer")  // Default viewer (including MPR)
+  else if (uri == "" ||             // Study list
+           uri == "tmtv" ||         // Total metabolic tumor volume
+           uri == "viewer" ||       // Default viewer (including MPR)
+           uri == "segmentation" || // Segmentation mode
+           uri == "microscopy"      // Microscopy mode
+           )  
   {
     // Those correspond to the different modes of the OHIF platform:
     // https://v3-docs.ohif.org/platform/modes/