Mercurial > hg > orthanc-java
comparison Samples/MammographyDeepLearning/src/main/java/Main.java @ 42:b04559283a1d
updated Stone Web viewer to newer snapshot
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 31 Aug 2024 12:00:40 +0200 |
parents | 08ea8401f7b2 |
children |
comparison
equal
deleted
inserted
replaced
41:d0b0bb6dfb4a | 42:b04559283a1d |
---|---|
47 import java.util.zip.ZipEntry; | 47 import java.util.zip.ZipEntry; |
48 import java.util.zip.ZipFile; | 48 import java.util.zip.ZipFile; |
49 | 49 |
50 public class Main { | 50 public class Main { |
51 private static final String MODEL_PATH = "2024-03-08-retina_res50_trained_08_03.torchscript"; | 51 private static final String MODEL_PATH = "2024-03-08-retina_res50_trained_08_03.torchscript"; |
52 private static final String STONE_VERSION = "2024-03-15-StoneWebViewer-DICOM-SR"; | 52 private static final String STONE_VERSION = "2024-08-31-StoneWebViewer-DICOM-SR"; |
53 private static final String STONE_PATH = "2024-03-15-StoneWebViewer-DICOM-SR.zip"; | 53 private static final String STONE_PATH = "2024-08-31-StoneWebViewer-DICOM-SR.zip"; |
54 | 54 |
55 private static ZipFile stone; | 55 private static ZipFile stone; |
56 private static NDManager manager; | 56 private static NDManager manager; |
57 private static RetinaNet retinaNet; | 57 private static RetinaNet retinaNet; |
58 private static Map<String, String> mimeTypes = new HashMap<>(); | 58 private static Map<String, String> mimeTypes = new HashMap<>(); |
59 | 59 |
60 static { | 60 static { |
61 ExecutorService executor = Executors.newSingleThreadExecutor(); | 61 ExecutorService executor = Executors.newSingleThreadExecutor(); |
62 try { | 62 try { |
63 OrthancConnection.download("2024-03-08-retina_res50_trained_08_03.torchscript", executor, | 63 OrthancConnection.download(MODEL_PATH, executor, |
64 "https://orthanc.uclouvain.be/downloads/cross-platform/orthanc-mammography/models/2024-03-08-retina_res50_trained_08_03.torchscript", | 64 "https://orthanc.uclouvain.be/downloads/cross-platform/orthanc-mammography/models/" + MODEL_PATH, |
65 146029397L, "b3de8f562de683bc3515fe93ae102fd4"); | 65 146029397L, "b3de8f562de683bc3515fe93ae102fd4"); |
66 OrthancConnection.download("2024-03-15-StoneWebViewer-DICOM-SR.zip", executor, | 66 OrthancConnection.download(STONE_PATH, executor, |
67 "https://github.com/jodogne/orthanc-mammography/raw/master/viewer/2024-03-15-StoneWebViewer-DICOM-SR.zip", | 67 "https://github.com/jodogne/orthanc-mammography/raw/master/viewer/" + STONE_PATH, |
68 4742571L, "de952da6fc74a9d4b78ca5064a6a7318"); | 68 4815178L, "86b52a17f86e4769d12e9ae680c4a99f"); |
69 } catch (IOException | NoSuchAlgorithmException | InterruptedException e) { | 69 } catch (IOException | NoSuchAlgorithmException | InterruptedException e) { |
70 throw new RuntimeException(e); | 70 throw new RuntimeException(e); |
71 } finally { | 71 } finally { |
72 executor.shutdown(); | 72 executor.shutdown(); |
73 } | 73 } |