changeset 7:59117a506f9f

Upgrade to VolView 4.1.1
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 May 2023 13:07:33 +0200
parents 776e650a6386
children 607d918270a2 ad4d62a9422d
files .hgignore NEWS Resources/CreateVolViewDist.sh Sources/OrthancExplorer.js VolView/VolView-20147b7.patch VolView/VolView-20147b7.patch.license VolView/VolView-4.1.1.patch VolView/VolView-4.1.1.patch.license
diffstat 8 files changed, 63 insertions(+), 75 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Fri May 19 12:28:41 2023 +0200
+++ b/.hgignore	Fri May 19 13:07:33 2023 +0200
@@ -6,3 +6,4 @@
 ThirdPartyDownloads/
 VolView/VolView-*.tar.gz
 VolView/dist
+i/
--- a/NEWS	Fri May 19 12:28:41 2023 +0200
+++ b/NEWS	Fri May 19 13:07:33 2023 +0200
@@ -1,8 +1,10 @@
 Pending changes in the mainline
 ===============================
 
+* Upgrade to VolView 4.1.1
 
-Version 1.0 (2023/03/22)
+
+Version 1.0 (2023-03-22)
 ========================
 
 => Minimum SDK version: 1.0.0 <=
--- a/Resources/CreateVolViewDist.sh	Fri May 19 12:28:41 2023 +0200
+++ b/Resources/CreateVolViewDist.sh	Fri May 19 13:07:33 2023 +0200
@@ -28,7 +28,7 @@
 set -ex
 
 if [ "$1" = "" ]; then
-    VERSION=20147b7
+    VERSION=4.1.1
 else
     VERSION=$1
 fi
--- a/Sources/OrthancExplorer.js	Fri May 19 12:28:41 2023 +0200
+++ b/Sources/OrthancExplorer.js	Fri May 19 13:07:33 2023 +0200
@@ -39,7 +39,7 @@
   b.insertAfter($('#series-info'));
   b.click(function() {
     if ($.mobile.pageData) {
-      window.open('../volview/index.html?urls=[../series/' + seriesId + '/archive]');
+      window.open('../volview/index.html?names=[archive.zip]&urls=[../series/' + seriesId + '/archive]');
     }
   });
 });
@@ -62,7 +62,7 @@
   b.insertAfter($('#study-info'));
   b.click(function() {
     if ($.mobile.pageData) {
-      window.open('../volview/index.html?urls=[../studies/' + studyId + '/archive]');
+      window.open('../volview/index.html?names=[archive.zip]&urls=[../studies/' + studyId + '/archive]');
     }
   });
 });
--- a/VolView/VolView-20147b7.patch	Fri May 19 12:28:41 2023 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-diff -urEb VolView-20147b7.orig/src/components/App.vue VolView-20147b7/src/components/App.vue
---- VolView-20147b7.orig/src/components/App.vue	2023-02-24 16:25:44.193696884 +0100
-+++ VolView-20147b7/src/components/App.vue	2023-02-24 16:27:06.028530105 +0100
-@@ -301,10 +301,7 @@
- 
-   const fileResults = await Promise.allSettled(
-     urls.map(async (url, index) => {
--      const { pathname } = new URL(url);
--      const name = names[index] || pathname.split('/').at(-1) || '';
--
--      return fetchFile(url, name);
-+      return fetchFile(url, 'orthanc.zip');
-     })
-   );
- 
-diff -urEb VolView-20147b7.orig/src/config.ts VolView-20147b7/src/config.ts
---- VolView-20147b7.orig/src/config.ts	2023-02-24 16:25:44.193696884 +0100
-+++ VolView-20147b7/src/config.ts	2023-02-24 16:27:28.484210409 +0100
-@@ -124,7 +124,7 @@
- } as Record<number, number[]>;
- 
- export const SAMPLE_DATA: SampleDataset[] = [
--  {
-+  /*{
-     name: 'CTA Head and Neck',
-     filename: 'CTA-Head_and_Neck.zip',
-     description:
-@@ -163,7 +163,7 @@
-       '3D ultrasound of a baby. Downloaded from tomovision.com.(8 MB)',
-     url: 'https://data.kitware.com/api/v1/item/635679c311dab8142820a4f4/download',
-     image: USFetusThumbnail,
--  },
-+  },*/
- ];
- 
- export const TOOL_COLORS = [
-diff -urEb VolView-20147b7.orig/src/io/itk/itkConfig.js VolView-20147b7/src/io/itk/itkConfig.js
---- VolView-20147b7.orig/src/io/itk/itkConfig.js	2023-02-24 16:25:44.201696770 +0100
-+++ VolView-20147b7/src/io/itk/itkConfig.js	2023-02-24 16:28:23.903988462 +0100
-@@ -1,9 +1,11 @@
- const base = process.env.VUE_APP_PUBLIC_PATH ?? '';
- const itkConfig = {
--  pipelineWorkerUrl: `${base}/itk/web-workers/min-bundles/pipeline.worker.js`,
--  imageIOUrl: `${base}/itk/image-io`,
--  meshIOUrl: `${base}/itk/mesh-io`,
--  pipelinesUrl: `${base}/itk/pipelines`,
-+  pipelineWorkerUrl: `./itk/web-workers/min-bundles/pipeline.worker.js`,
-+
-+  // The URIs below are relative to "pipeline.worker.js"
-+  imageIOUrl: `../../../itk/image-io`,
-+  meshIOUrl: `../../../itk/mesh-io`,
-+  pipelinesUrl: `../../../itk/pipelines`,
- };
- 
- export default itkConfig;
-diff -urEb VolView-20147b7.orig/src/utils/fetch.ts VolView-20147b7/src/utils/fetch.ts
---- VolView-20147b7.orig/src/utils/fetch.ts	2023-02-24 16:25:44.201696770 +0100
-+++ VolView-20147b7/src/utils/fetch.ts	2023-02-24 16:28:53.702932064 +0100
-@@ -87,7 +87,7 @@
-   name: string,
-   options?: FetchOptions
- ) {
--  const handler = HANDLERS.find((h) => h.testURL(url));
-+  const handler = HTTPHandler;
-   if (!handler) {
-     throw new Error(`Cannot find a handler for URL: ${url}`);
-   }
--- a/VolView/VolView-20147b7.patch.license	Fri May 19 12:28:41 2023 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-# SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium
-# SPDX-FileCopyrightText: 1999-2023 Kitware, USA
-#
-# SPDX-License-Identifier: Apache-2.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VolView/VolView-4.1.1.patch	Fri May 19 13:07:33 2023 +0200
@@ -0,0 +1,52 @@
+diff -urEb VolView-4.1.1.orig/src/config.ts VolView-4.1.1/src/config.ts
+--- VolView-4.1.1.orig/src/config.ts	2023-05-19 12:58:22.916872311 +0200
++++ VolView-4.1.1/src/config.ts	2023-05-19 13:01:13.557196054 +0200
+@@ -124,7 +124,7 @@
+ } as Record<number, number[]>;
+ 
+ export const SAMPLE_DATA: SampleDataset[] = [
+-  {
++  /*{
+     name: 'CTA Head and Neck',
+     filename: 'CTA-Head_and_Neck.zip',
+     description:
+@@ -163,7 +163,7 @@
+       '3D ultrasound of a baby. Downloaded from tomovision.com.(8 MB)',
+     url: 'https://data.kitware.com/api/v1/item/635679c311dab8142820a4f4/download',
+     image: USFetusThumbnail,
+-  },
++  },*/
+ ];
+ 
+ export const TOOL_COLORS = [
+diff -urEb VolView-4.1.1.orig/src/io/itk/itkConfig.js VolView-4.1.1/src/io/itk/itkConfig.js
+--- VolView-4.1.1.orig/src/io/itk/itkConfig.js	2023-05-19 12:58:22.924872326 +0200
++++ VolView-4.1.1/src/io/itk/itkConfig.js	2023-05-19 12:58:52.900929265 +0200
+@@ -1,9 +1,11 @@
+ const base = process.env.VUE_APP_PUBLIC_PATH ?? '';
+ const itkConfig = {
+-  pipelineWorkerUrl: `${base}/itk/pipeline.worker.js`,
+-  imageIOUrl: `${base}/itk/image-io`,
+-  meshIOUrl: `${base}/itk/mesh-io`,
+-  pipelinesUrl: `${base}/itk/pipelines`,
++  pipelineWorkerUrl: `./itk/pipeline.worker.js`,
++
++  // The URIs below are relative to "pipeline.worker.js"
++  imageIOUrl: `./image-io`,
++  meshIOUrl: `./mesh-io`,
++  pipelinesUrl: `./pipelines`,
+ };
+ 
+ export default itkConfig;
+diff -urEb VolView-4.1.1.orig/vue.config.js VolView-4.1.1/vue.config.js
+--- VolView-4.1.1.orig/vue.config.js	2023-05-19 12:58:22.916872311 +0200
++++ VolView-4.1.1/vue.config.js	2023-05-19 12:59:16.820974677 +0200
+@@ -31,7 +31,7 @@
+       return args;
+     });
+   },
+-  publicPath: process.env.VUE_APP_PUBLIC_PATH || '/',
++  publicPath: process.env.VUE_APP_PUBLIC_PATH || '.',
+   configureWebpack: {
+     devtool: 'source-map',
+     resolve: {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VolView/VolView-4.1.1.patch.license	Fri May 19 13:07:33 2023 +0200
@@ -0,0 +1,4 @@
+# SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium
+# SPDX-FileCopyrightText: 1999-2023 Kitware, USA
+#
+# SPDX-License-Identifier: Apache-2.0