larvitar 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build-docs.yml +1 -1
- package/.github/workflows/deploy.yml +4 -4
- package/README.md +3 -3
- package/modules/vuex/larvitar.js +1 -0
- package/package.json +1 -1
- package/docs/documentation/Mixins.polygonSegmentationMixin%20-%20segmentation%20operations%20for%20polyline.html +0 -171
- package/docs/documentation/Tools.Annotation.ContoursTool.html +0 -218
- package/docs/documentation/Tools.Annotation.DiameterTool.html +0 -219
- package/docs/documentation/Tools.Annotation.SeedsTool.html +0 -214
- package/docs/documentation/Tools.Brush.BrushTool.html +0 -218
- package/docs/documentation/Tools.Brush.ThresholdsBrushTool.html +0 -218
- package/docs/documentation/Tools.PolylineScissorsTool.html +0 -218
- package/docs/documentation/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/documentation/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/documentation/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/documentation/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/documentation/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/documentation/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/documentation/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/documentation/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -978
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -1049
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/documentation/global.html +0 -1303
- package/docs/documentation/imageAnonymization.js.html +0 -245
- package/docs/documentation/imageColormaps.js.html +0 -283
- package/docs/documentation/imageContours.js.html +0 -278
- package/docs/documentation/imageIo.js.html +0 -291
- package/docs/documentation/imageLayers.js.html +0 -188
- package/docs/documentation/imageLoading.js.html +0 -297
- package/docs/documentation/imageParsing.js.html +0 -385
- package/docs/documentation/imagePresets.js.html +0 -207
- package/docs/documentation/imageRendering.js.html +0 -849
- package/docs/documentation/imageReslice.js.html +0 -162
- package/docs/documentation/imageStore.js.html +0 -360
- package/docs/documentation/imageTools.js.html +0 -784
- package/docs/documentation/imageUtils.js.html +0 -1609
- package/docs/documentation/image_colormaps.js.html +0 -283
- package/docs/documentation/image_contours.js.html +0 -279
- package/docs/documentation/image_io.js.html +0 -288
- package/docs/documentation/image_layers.js.html +0 -188
- package/docs/documentation/image_loading.js.html +0 -294
- package/docs/documentation/image_parsing.js.html +0 -391
- package/docs/documentation/image_presets.js.html +0 -207
- package/docs/documentation/image_rendering.js.html +0 -845
- package/docs/documentation/image_reslice.js.html +0 -164
- package/docs/documentation/image_store.js.html +0 -359
- package/docs/documentation/image_tools.js.html +0 -792
- package/docs/documentation/image_utils.js.html +0 -1609
- package/docs/documentation/index.html +0 -175
- package/docs/documentation/loaders_commonLoader.js.html +0 -306
- package/docs/documentation/loaders_dicomLoader.js.html +0 -130
- package/docs/documentation/loaders_fileLoader.js.html +0 -155
- package/docs/documentation/loaders_multiframeLoader.js.html +0 -443
- package/docs/documentation/loaders_niftiLoader.js.html +0 -150
- package/docs/documentation/loaders_nrrdLoader.js.html +0 -545
- package/docs/documentation/loaders_resliceLoader.js.html +0 -258
- package/docs/documentation/module-imaging_contours.html +0 -954
- package/docs/documentation/module-imaging_imageAnonymization.html +0 -544
- package/docs/documentation/module-imaging_imageColormaps.html +0 -1012
- package/docs/documentation/module-imaging_imageContours.html +0 -954
- package/docs/documentation/module-imaging_imageIo.html +0 -1057
- package/docs/documentation/module-imaging_imageLayers.html +0 -904
- package/docs/documentation/module-imaging_imageLoading.html +0 -1301
- package/docs/documentation/module-imaging_imageParsing.html +0 -1356
- package/docs/documentation/module-imaging_imagePresets.html +0 -679
- package/docs/documentation/module-imaging_imageRendering.html +0 -3223
- package/docs/documentation/module-imaging_imageReslice.html +0 -413
- package/docs/documentation/module-imaging_imageStore-Larvitar_Store.html +0 -284
- package/docs/documentation/module-imaging_imageStore.html +0 -1560
- package/docs/documentation/module-imaging_imageTools.html +0 -3617
- package/docs/documentation/module-imaging_imageUtils.html +0 -7253
- package/docs/documentation/module-imaging_io.html +0 -1057
- package/docs/documentation/module-imaging_layers.html +0 -904
- package/docs/documentation/module-imaging_loading.html +0 -1301
- package/docs/documentation/module-imaging_parsing.html +0 -1375
- package/docs/documentation/module-imaging_presets.html +0 -679
- package/docs/documentation/module-imaging_rendering.html +0 -8094
- package/docs/documentation/module-imaging_reslice.html +0 -411
- package/docs/documentation/module-imaging_store-Larvitar_Store.html +0 -284
- package/docs/documentation/module-imaging_store.html +0 -1537
- package/docs/documentation/module-imaging_strategies_eraseFreehand.html +0 -708
- package/docs/documentation/module-imaging_strategies_fillFreehand.html +0 -708
- package/docs/documentation/module-imaging_tools.html +0 -3617
- package/docs/documentation/module-imaging_tools_custom_contourTool.html +0 -207
- package/docs/documentation/module-imaging_tools_custom_diameterTool.html +0 -205
- package/docs/documentation/module-imaging_tools_custom_editMaskTool.html +0 -205
- package/docs/documentation/module-imaging_tools_custom_polygonScissorsTool.html +0 -203
- package/docs/documentation/module-imaging_tools_custom_thresholdBrushTool.html +0 -684
- package/docs/documentation/module-imaging_tools_default.html +0 -205
- package/docs/documentation/module-imaging_tools_interaction.html +0 -530
- package/docs/documentation/module-imaging_tools_io.html +0 -832
- package/docs/documentation/module-imaging_tools_main.html +0 -2028
- package/docs/documentation/module-imaging_tools_polygonSegmentationMixin.html +0 -567
- package/docs/documentation/module-imaging_tools_segmentation.html +0 -3586
- package/docs/documentation/module-imaging_tools_state.html +0 -494
- package/docs/documentation/module-imaging_utils.html +0 -7253
- package/docs/documentation/module-loaders_commonLoader.html +0 -1313
- package/docs/documentation/module-loaders_dicomLoader.html +0 -522
- package/docs/documentation/module-loaders_fileLoader.html +0 -593
- package/docs/documentation/module-loaders_multiframeLoader.html +0 -1169
- package/docs/documentation/module-loaders_niftiLoader.html +0 -565
- package/docs/documentation/module-loaders_nrrdLoader.html +0 -1459
- package/docs/documentation/module-loaders_resliceLoader.html +0 -590
- package/docs/documentation/module-monitors_memory.html +0 -980
- package/docs/documentation/module-tools_default.html +0 -740
- package/docs/documentation/module.exports_module.exports.html +0 -203
- package/docs/documentation/monitors_memory.js.html +0 -189
- package/docs/documentation/parsers_nrrd.js.html +0 -569
- package/docs/documentation/scripts/collapse.js +0 -20
- package/docs/documentation/scripts/linenumber.js +0 -25
- package/docs/documentation/scripts/nav.js +0 -12
- package/docs/documentation/scripts/polyfill.js +0 -4
- package/docs/documentation/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/docs/documentation/scripts/prettify/lang-css.js +0 -2
- package/docs/documentation/scripts/prettify/prettify.js +0 -28
- package/docs/documentation/scripts/search.js +0 -83
- package/docs/documentation/styles/jsdoc.css +0 -765
- package/docs/documentation/styles/prettify.css +0 -80
- package/docs/documentation/tools_contourTool.js.html +0 -1963
- package/docs/documentation/tools_custom_contourTool.js.html +0 -1968
- package/docs/documentation/tools_custom_diameterTool.js.html +0 -225
- package/docs/documentation/tools_custom_editMaskTool.js.html +0 -225
- package/docs/documentation/tools_custom_polylineScissorsTool.js.html +0 -143
- package/docs/documentation/tools_custom_thresholdsBrushTool.js.html +0 -245
- package/docs/documentation/tools_default.js.html +0 -576
- package/docs/documentation/tools_diameterTool.js.html +0 -219
- package/docs/documentation/tools_editMaskTool.js.html +0 -219
- package/docs/documentation/tools_interaction.js.html +0 -258
- package/docs/documentation/tools_io.js.html +0 -297
- package/docs/documentation/tools_main.js.html +0 -443
- package/docs/documentation/tools_polygonSegmentationMixin.js.html +0 -329
- package/docs/documentation/tools_polylineScissorsTool.js.html +0 -136
- package/docs/documentation/tools_seedTool.js.html +0 -423
- package/docs/documentation/tools_segmentation.js.html +0 -558
- package/docs/documentation/tools_state.js.html +0 -163
- package/docs/documentation/tools_strategies_eraseFreehand.js.html +0 -160
- package/docs/documentation/tools_strategies_fillFreehand.js.html +0 -163
- package/docs/documentation/tools_thresholdsBrushTool.js.html +0 -239
- package/docs/documentation/tools_tools.default.js.html +0 -569
- package/docs/documentation/tools_tools.interaction.js.html +0 -251
- package/docs/documentation/tools_tools.io.js.html +0 -288
- package/docs/documentation/tools_tools.main.js.html +0 -442
- package/docs/documentation/tools_tools.segmentation.js.html +0 -445
- package/docs/documentation/tools_tools.state.js.html +0 -157
- package/docs/examples/base.html +0 -170
- package/docs/examples/colorMaps.html +0 -181
- package/docs/examples/defaultTools.html +0 -246
- package/docs/examples/demo/anon1 +0 -0
- package/docs/examples/demo/anon10 +0 -0
- package/docs/examples/demo/anon11 +0 -0
- package/docs/examples/demo/anon12 +0 -0
- package/docs/examples/demo/anon13 +0 -0
- package/docs/examples/demo/anon14 +0 -0
- package/docs/examples/demo/anon15 +0 -0
- package/docs/examples/demo/anon16 +0 -0
- package/docs/examples/demo/anon17 +0 -0
- package/docs/examples/demo/anon18 +0 -0
- package/docs/examples/demo/anon19 +0 -0
- package/docs/examples/demo/anon2 +0 -0
- package/docs/examples/demo/anon20 +0 -0
- package/docs/examples/demo/anon21 +0 -0
- package/docs/examples/demo/anon22 +0 -0
- package/docs/examples/demo/anon23 +0 -0
- package/docs/examples/demo/anon24 +0 -0
- package/docs/examples/demo/anon3 +0 -0
- package/docs/examples/demo/anon4 +0 -0
- package/docs/examples/demo/anon5 +0 -0
- package/docs/examples/demo/anon6 +0 -0
- package/docs/examples/demo/anon7 +0 -0
- package/docs/examples/demo/anon8 +0 -0
- package/docs/examples/demo/anon9 +0 -0
- package/docs/examples/demo/example.nrrd +0 -0
- package/docs/examples/demo/segmentation.nrrd +0 -0
- package/docs/examples/demo/xa_integris.dcm +0 -0
- package/docs/examples/index.html +0 -129
- package/docs/examples/larvitar.js +0 -108623
- package/docs/examples/layers.html +0 -250
- package/docs/examples/masks.html +0 -273
- package/docs/examples/multiframe.html +0 -200
- package/docs/examples/nrrd.html +0 -96
- package/docs/examples/reslice.html +0 -174
- package/docs/index.html +0 -92
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html class="h-100 overflow-hidden">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link
|
|
6
|
-
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css"
|
|
7
|
-
rel="stylesheet"
|
|
8
|
-
integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl"
|
|
9
|
-
crossorigin="anonymous"
|
|
10
|
-
/>
|
|
11
|
-
<link
|
|
12
|
-
rel="stylesheet"
|
|
13
|
-
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/vs2015.min.css"
|
|
14
|
-
/>
|
|
15
|
-
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js"></script>
|
|
16
|
-
<script>
|
|
17
|
-
hljs.highlightAll();
|
|
18
|
-
</script>
|
|
19
|
-
<title>Larvitar - Multiframe rendering example</title>
|
|
20
|
-
</head>
|
|
21
|
-
|
|
22
|
-
<body class="h-100" style="background-color: #000000">
|
|
23
|
-
<div class="row h-100">
|
|
24
|
-
<div
|
|
25
|
-
id="viewer"
|
|
26
|
-
class="col-8 h-100"
|
|
27
|
-
style="background-color: black"
|
|
28
|
-
></div>
|
|
29
|
-
<p style="position: absolute; color: white">
|
|
30
|
-
Press "p" to play/pause frame animation
|
|
31
|
-
</p>
|
|
32
|
-
<p
|
|
33
|
-
id="frame-rate"
|
|
34
|
-
style="position: absolute; top: 20px; color: white"
|
|
35
|
-
></p>
|
|
36
|
-
<p
|
|
37
|
-
id="current-frame"
|
|
38
|
-
style="position: absolute; top: 40px; color: white"
|
|
39
|
-
></p>
|
|
40
|
-
|
|
41
|
-
<div class="col-4 h-100">
|
|
42
|
-
<pre class="h-100">
|
|
43
|
-
<code class="javascript" style="background-color: #000000">
|
|
44
|
-
<p style="font-size:0.6vw;">
|
|
45
|
-
let demoFiles = [];
|
|
46
|
-
|
|
47
|
-
// init all
|
|
48
|
-
larvitar.initLarvitarStore();
|
|
49
|
-
larvitar.initializeImageLoader();
|
|
50
|
-
larvitar.registerMultiFrameImageLoader();
|
|
51
|
-
larvitar.initializeCSTools();
|
|
52
|
-
larvitar.larvitar_store.addViewport("viewer");
|
|
53
|
-
|
|
54
|
-
function renderSerie() {
|
|
55
|
-
larvitar
|
|
56
|
-
.readFiles(demoFiles)
|
|
57
|
-
.then(seriesStack => {
|
|
58
|
-
// render the first series of the study
|
|
59
|
-
let seriesId = _.keys(seriesStack)[0];
|
|
60
|
-
let serie = seriesStack[seriesId];
|
|
61
|
-
larvitar.populateLarvitarManager(seriesId, serie);
|
|
62
|
-
let manager = larvitar.getLarvitarManager();
|
|
63
|
-
let multiFrameSerie = manager[seriesId];
|
|
64
|
-
let frameId = 1;
|
|
65
|
-
larvitar
|
|
66
|
-
.renderImage(multiFrameSerie, "viewer", frameId)
|
|
67
|
-
.then(() => {
|
|
68
|
-
console.log("Image has been rendered");
|
|
69
|
-
});
|
|
70
|
-
larvitar.addDefaultTools();
|
|
71
|
-
larvitar.setToolActive("Wwwc");
|
|
72
|
-
|
|
73
|
-
let animation = false;
|
|
74
|
-
let animationId = null;
|
|
75
|
-
let numberOfFrames = multiFrameSerie.numberOfFrames;
|
|
76
|
-
let frameRate = multiFrameSerie.frameTime;
|
|
77
|
-
$("#frame-rate").html("Frame Rate: " + parseInt(frameRate) + "ms");
|
|
78
|
-
$("#current-frame").html("Current Frame: 1 of " + numberOfFrames);
|
|
79
|
-
|
|
80
|
-
document.onkeypress = function (e) {
|
|
81
|
-
e = e || window.event;
|
|
82
|
-
if (e.keyCode == 112) {
|
|
83
|
-
animation = !animation;
|
|
84
|
-
if (animation) {
|
|
85
|
-
frameId =
|
|
86
|
-
larvitar.larvitar_store.state.viewports.viewer.sliceId;
|
|
87
|
-
animationId = setInterval(function () {
|
|
88
|
-
let series =
|
|
89
|
-
larvitar.getSeriesDataFromLarvitarManager(seriesId);
|
|
90
|
-
frameId = frameId == numberOfFrames ? 1 : frameId + 1;
|
|
91
|
-
larvitar.updateImage(series, "viewer", frameId, true);
|
|
92
|
-
$("#current-frame").html(
|
|
93
|
-
"Current Frame: " + frameId + " of " + numberOfFrames
|
|
94
|
-
);
|
|
95
|
-
}, frameRate);
|
|
96
|
-
} else {
|
|
97
|
-
clearInterval(animationId);
|
|
98
|
-
$("#current-frame").html();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
})
|
|
103
|
-
.catch(err => console.log(err));
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
async function createFile(fileName, cb) {
|
|
107
|
-
let response = await fetch("./demo/" + fileName);
|
|
108
|
-
let data = await response.blob();
|
|
109
|
-
let file = new File([data], fileName);
|
|
110
|
-
demoFiles.push(file);
|
|
111
|
-
cb();
|
|
112
|
-
}
|
|
113
|
-
createFile("xa_integris.dcm", renderSerie);
|
|
114
|
-
</p>
|
|
115
|
-
</code>
|
|
116
|
-
</pre>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
|
|
120
|
-
<script src="./larvitar.js"></script>
|
|
121
|
-
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"></script>
|
|
122
|
-
<script
|
|
123
|
-
src="https://code.jquery.com/jquery-3.6.0.slim.min.js"
|
|
124
|
-
integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI="
|
|
125
|
-
crossorigin="anonymous"
|
|
126
|
-
></script>
|
|
127
|
-
|
|
128
|
-
<script>
|
|
129
|
-
let demoFiles = [];
|
|
130
|
-
|
|
131
|
-
// init all
|
|
132
|
-
larvitar.initLarvitarStore();
|
|
133
|
-
larvitar.initializeImageLoader();
|
|
134
|
-
larvitar.registerMultiFrameImageLoader();
|
|
135
|
-
larvitar.initializeCSTools();
|
|
136
|
-
larvitar.larvitar_store.addViewport("viewer");
|
|
137
|
-
|
|
138
|
-
function renderSerie() {
|
|
139
|
-
larvitar
|
|
140
|
-
.readFiles(demoFiles)
|
|
141
|
-
.then(seriesStack => {
|
|
142
|
-
// render the first series of the study
|
|
143
|
-
let seriesId = _.keys(seriesStack)[0];
|
|
144
|
-
let serie = seriesStack[seriesId];
|
|
145
|
-
larvitar.populateLarvitarManager(seriesId, serie);
|
|
146
|
-
let manager = larvitar.getLarvitarManager();
|
|
147
|
-
let multiFrameSerie = manager[seriesId];
|
|
148
|
-
let frameId = 1;
|
|
149
|
-
larvitar
|
|
150
|
-
.renderImage(multiFrameSerie, "viewer", frameId)
|
|
151
|
-
.then(() => {
|
|
152
|
-
console.log("Image has been rendered");
|
|
153
|
-
});
|
|
154
|
-
larvitar.addDefaultTools();
|
|
155
|
-
larvitar.setToolActive("Wwwc");
|
|
156
|
-
|
|
157
|
-
let animation = false;
|
|
158
|
-
let animationId = null;
|
|
159
|
-
let numberOfFrames = multiFrameSerie.numberOfFrames;
|
|
160
|
-
let frameRate = multiFrameSerie.frameTime;
|
|
161
|
-
$("#frame-rate").html("Frame Rate: " + parseInt(frameRate) + "ms");
|
|
162
|
-
$("#current-frame").html("Current Frame: 1 of " + numberOfFrames);
|
|
163
|
-
|
|
164
|
-
document.onkeypress = function (e) {
|
|
165
|
-
e = e || window.event;
|
|
166
|
-
if (e.keyCode == 112) {
|
|
167
|
-
animation = !animation;
|
|
168
|
-
if (animation) {
|
|
169
|
-
frameId =
|
|
170
|
-
larvitar.larvitar_store.state.viewports.viewer.sliceId;
|
|
171
|
-
animationId = setInterval(function () {
|
|
172
|
-
let series =
|
|
173
|
-
larvitar.getSeriesDataFromLarvitarManager(seriesId);
|
|
174
|
-
frameId = frameId == numberOfFrames ? 1 : frameId + 1;
|
|
175
|
-
larvitar.updateImage(series, "viewer", frameId, true);
|
|
176
|
-
$("#current-frame").html(
|
|
177
|
-
"Current Frame: " + frameId + " of " + numberOfFrames
|
|
178
|
-
);
|
|
179
|
-
}, frameRate);
|
|
180
|
-
} else {
|
|
181
|
-
clearInterval(animationId);
|
|
182
|
-
$("#current-frame").html();
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
})
|
|
187
|
-
.catch(err => console.log(err));
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
async function createFile(fileName, cb) {
|
|
191
|
-
let response = await fetch("./demo/" + fileName);
|
|
192
|
-
let data = await response.blob();
|
|
193
|
-
let file = new File([data], fileName);
|
|
194
|
-
demoFiles.push(file);
|
|
195
|
-
cb();
|
|
196
|
-
}
|
|
197
|
-
createFile("xa_integris.dcm", renderSerie);
|
|
198
|
-
</script>
|
|
199
|
-
</body>
|
|
200
|
-
</html>
|
package/docs/examples/nrrd.html
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html class="h-100 overflow-hidden">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link
|
|
6
|
-
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css"
|
|
7
|
-
rel="stylesheet"
|
|
8
|
-
integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl"
|
|
9
|
-
crossorigin="anonymous"
|
|
10
|
-
/>
|
|
11
|
-
<link
|
|
12
|
-
rel="stylesheet"
|
|
13
|
-
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/vs2015.min.css"
|
|
14
|
-
/>
|
|
15
|
-
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js"></script>
|
|
16
|
-
<script>
|
|
17
|
-
hljs.highlightAll();
|
|
18
|
-
</script>
|
|
19
|
-
<title>Larvitar - NRRD rendering example</title>
|
|
20
|
-
</head>
|
|
21
|
-
|
|
22
|
-
<body class="h-100" style="background-color: #000000">
|
|
23
|
-
<div class="row h-100">
|
|
24
|
-
<div
|
|
25
|
-
id="viewer"
|
|
26
|
-
class="col-8 h-100"
|
|
27
|
-
style="background-color: black"
|
|
28
|
-
></div>
|
|
29
|
-
|
|
30
|
-
<div class="col-4 h-100">
|
|
31
|
-
<pre class="h-100">
|
|
32
|
-
<code class="javascript" style="background-color: #000000">
|
|
33
|
-
<p style="font-size:0.6vw;">
|
|
34
|
-
// init all
|
|
35
|
-
larvitar.initLarvitarStore();
|
|
36
|
-
larvitar.initializeImageLoader();
|
|
37
|
-
larvitar.registerNRRDImageLoader();
|
|
38
|
-
larvitar.initializeCSTools();
|
|
39
|
-
larvitar.larvitar_store.addViewport("viewer");
|
|
40
|
-
|
|
41
|
-
createFile("example.nrrd", function (nrrd_file) {
|
|
42
|
-
let reader = new FileReader();
|
|
43
|
-
reader.readAsArrayBuffer(nrrd_file);
|
|
44
|
-
reader.onload = function () {
|
|
45
|
-
let volume = larvitar.importNRRDImage(reader.result);
|
|
46
|
-
let serie = larvitar.buildNrrdImage(volume, "1234", {});
|
|
47
|
-
larvitar.renderImage(serie, "viewer");
|
|
48
|
-
larvitar.addDefaultTools();
|
|
49
|
-
larvitar.setToolActive("Wwwc");
|
|
50
|
-
};
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
async function createFile(fileName, callback) {
|
|
54
|
-
let response = await fetch("./demo/" + fileName);
|
|
55
|
-
let data = await response.blob();
|
|
56
|
-
let file = new File([data], fileName);
|
|
57
|
-
callback(file);
|
|
58
|
-
}
|
|
59
|
-
</p>
|
|
60
|
-
</code>
|
|
61
|
-
</pre>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
|
-
<script src="./larvitar.js"></script>
|
|
66
|
-
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"></script>
|
|
67
|
-
|
|
68
|
-
<script>
|
|
69
|
-
// init all
|
|
70
|
-
larvitar.initLarvitarStore();
|
|
71
|
-
larvitar.initializeImageLoader();
|
|
72
|
-
larvitar.registerNRRDImageLoader();
|
|
73
|
-
larvitar.initializeCSTools();
|
|
74
|
-
larvitar.larvitar_store.addViewport("viewer");
|
|
75
|
-
|
|
76
|
-
createFile("example.nrrd", function (nrrd_file) {
|
|
77
|
-
let reader = new FileReader();
|
|
78
|
-
reader.readAsArrayBuffer(nrrd_file);
|
|
79
|
-
reader.onload = function () {
|
|
80
|
-
let volume = larvitar.importNRRDImage(reader.result);
|
|
81
|
-
let serie = larvitar.buildNrrdImage(volume, "1234", {});
|
|
82
|
-
larvitar.renderImage(serie, "viewer");
|
|
83
|
-
larvitar.addDefaultTools();
|
|
84
|
-
larvitar.setToolActive("Wwwc");
|
|
85
|
-
};
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
async function createFile(fileName, callback) {
|
|
89
|
-
let response = await fetch("./demo/" + fileName);
|
|
90
|
-
let data = await response.blob();
|
|
91
|
-
let file = new File([data], fileName);
|
|
92
|
-
callback(file);
|
|
93
|
-
}
|
|
94
|
-
</script>
|
|
95
|
-
</body>
|
|
96
|
-
</html>
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html class="h-100 overflow-hidden">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link
|
|
6
|
-
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css"
|
|
7
|
-
rel="stylesheet"
|
|
8
|
-
integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl"
|
|
9
|
-
crossorigin="anonymous"
|
|
10
|
-
/>
|
|
11
|
-
<link
|
|
12
|
-
rel="stylesheet"
|
|
13
|
-
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/vs2015.min.css"
|
|
14
|
-
/>
|
|
15
|
-
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js"></script>
|
|
16
|
-
<script>
|
|
17
|
-
hljs.highlightAll();
|
|
18
|
-
</script>
|
|
19
|
-
<title>Larvitar - Reslice rendering example</title>
|
|
20
|
-
</head>
|
|
21
|
-
|
|
22
|
-
<body class="h-100" style="background-color: #000000">
|
|
23
|
-
<div class="row h-100">
|
|
24
|
-
<div class="col-8 h-100">
|
|
25
|
-
<div
|
|
26
|
-
id="viewer-base"
|
|
27
|
-
class="col-12 h-50"
|
|
28
|
-
style="background-color: black"
|
|
29
|
-
></div>
|
|
30
|
-
<div
|
|
31
|
-
id="viewer-reslice"
|
|
32
|
-
class="col-12 h-50"
|
|
33
|
-
style="background-color: black"
|
|
34
|
-
></div>
|
|
35
|
-
</div>
|
|
36
|
-
<div class="col-4 h-100">
|
|
37
|
-
<pre class="h-100">
|
|
38
|
-
<code class="javascript" style="background-color: #000000">
|
|
39
|
-
<p style="font-size:0.6vw;">
|
|
40
|
-
let demoFiles = [];
|
|
41
|
-
let counter = 0;
|
|
42
|
-
|
|
43
|
-
const getDemoFileNames = function () {
|
|
44
|
-
let demoFileList = [];
|
|
45
|
-
for (let i = 1; i < 25; i++) {
|
|
46
|
-
let filename = "anon" + i;
|
|
47
|
-
demoFileList.push(filename);
|
|
48
|
-
}
|
|
49
|
-
return demoFileList;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
// init all
|
|
53
|
-
larvitar.initLarvitarStore();
|
|
54
|
-
larvitar.initializeImageLoader();
|
|
55
|
-
larvitar.registerResliceLoader();
|
|
56
|
-
larvitar.initializeCSTools();
|
|
57
|
-
larvitar.larvitar_store.addViewport("viewer-base");
|
|
58
|
-
larvitar.larvitar_store.addViewport("viewer-reslice");
|
|
59
|
-
|
|
60
|
-
async function createFile(fileName, cb) {
|
|
61
|
-
let response = await fetch("./demo/" + fileName);
|
|
62
|
-
let data = await response.blob();
|
|
63
|
-
let file = new File([data], fileName);
|
|
64
|
-
demoFiles.push(file);
|
|
65
|
-
counter++;
|
|
66
|
-
if (counter == 24) {
|
|
67
|
-
cb();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function renderSerie() {
|
|
72
|
-
larvitar
|
|
73
|
-
.readFiles(demoFiles)
|
|
74
|
-
.then(seriesStack => {
|
|
75
|
-
// render the first series of the study
|
|
76
|
-
let seriesId = _.keys(seriesStack)[0];
|
|
77
|
-
let serie = seriesStack[seriesId];
|
|
78
|
-
larvitar.populateLarvitarManager(seriesId, serie);
|
|
79
|
-
larvitar.renderImage(serie, "viewer-base").then(() => {
|
|
80
|
-
console.log("Image axial has been rendered");
|
|
81
|
-
});
|
|
82
|
-
larvitar.cacheImages(serie, function (resp) {
|
|
83
|
-
if (resp.loading == 100) {
|
|
84
|
-
larvitar.resliceSeries(serie, "coronal").then(data => {
|
|
85
|
-
larvitar.renderImage(data, "viewer-reslice").then(() => {
|
|
86
|
-
console.log("Image resliced has been rendered");
|
|
87
|
-
});
|
|
88
|
-
larvitar.addDefaultTools();
|
|
89
|
-
larvitar.setToolActive("Wwwc");
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
})
|
|
94
|
-
.catch(err => console.log(err));
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
let demoFileList = getDemoFileNames();
|
|
98
|
-
_.each(demoFileList, function (demoFile) {
|
|
99
|
-
createFile(demoFile, renderSerie);
|
|
100
|
-
});
|
|
101
|
-
</p>
|
|
102
|
-
</code>
|
|
103
|
-
</pre>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
<script src="./larvitar.js"></script>
|
|
108
|
-
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"></script>
|
|
109
|
-
|
|
110
|
-
<script>
|
|
111
|
-
let demoFiles = [];
|
|
112
|
-
let counter = 0;
|
|
113
|
-
|
|
114
|
-
const getDemoFileNames = function () {
|
|
115
|
-
let demoFileList = [];
|
|
116
|
-
for (let i = 1; i < 25; i++) {
|
|
117
|
-
let filename = "anon" + i;
|
|
118
|
-
demoFileList.push(filename);
|
|
119
|
-
}
|
|
120
|
-
return demoFileList;
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
// init all
|
|
124
|
-
larvitar.initLarvitarStore();
|
|
125
|
-
larvitar.initializeImageLoader();
|
|
126
|
-
larvitar.registerResliceLoader();
|
|
127
|
-
larvitar.initializeCSTools();
|
|
128
|
-
larvitar.larvitar_store.addViewport("viewer-base");
|
|
129
|
-
larvitar.larvitar_store.addViewport("viewer-reslice");
|
|
130
|
-
|
|
131
|
-
async function createFile(fileName, cb) {
|
|
132
|
-
let response = await fetch("./demo/" + fileName);
|
|
133
|
-
let data = await response.blob();
|
|
134
|
-
let file = new File([data], fileName);
|
|
135
|
-
demoFiles.push(file);
|
|
136
|
-
counter++;
|
|
137
|
-
if (counter == 24) {
|
|
138
|
-
cb();
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function renderSerie() {
|
|
143
|
-
larvitar
|
|
144
|
-
.readFiles(demoFiles)
|
|
145
|
-
.then(seriesStack => {
|
|
146
|
-
// render the first series of the study
|
|
147
|
-
let seriesId = _.keys(seriesStack)[0];
|
|
148
|
-
let serie = seriesStack[seriesId];
|
|
149
|
-
larvitar.populateLarvitarManager(seriesId, serie);
|
|
150
|
-
larvitar.renderImage(serie, "viewer-base").then(() => {
|
|
151
|
-
console.log("Image axial has been rendered");
|
|
152
|
-
});
|
|
153
|
-
larvitar.cacheImages(serie, function (resp) {
|
|
154
|
-
if (resp.loading == 100) {
|
|
155
|
-
larvitar.resliceSeries(serie, "coronal").then(data => {
|
|
156
|
-
larvitar.renderImage(data, "viewer-reslice").then(() => {
|
|
157
|
-
console.log("Image resliced has been rendered");
|
|
158
|
-
});
|
|
159
|
-
larvitar.addDefaultTools();
|
|
160
|
-
larvitar.setToolActive("Wwwc");
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
})
|
|
165
|
-
.catch(err => console.log(err));
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
let demoFileList = getDemoFileNames();
|
|
169
|
-
_.each(demoFileList, function (demoFile) {
|
|
170
|
-
createFile(demoFile, renderSerie);
|
|
171
|
-
});
|
|
172
|
-
</script>
|
|
173
|
-
</body>
|
|
174
|
-
</html>
|
package/docs/index.html
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html class="h-100">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<title>Larvitar</title>
|
|
6
|
-
<link
|
|
7
|
-
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css"
|
|
8
|
-
rel="stylesheet"
|
|
9
|
-
integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl"
|
|
10
|
-
crossorigin="anonymous"
|
|
11
|
-
/>
|
|
12
|
-
</head>
|
|
13
|
-
<body class="h-100" style="background-color: #d7e8e1">
|
|
14
|
-
<div class="container h-100">
|
|
15
|
-
<div class="row justify-content-center">
|
|
16
|
-
<div class="col-4"></div>
|
|
17
|
-
<div class="col-4 text-center">
|
|
18
|
-
<img
|
|
19
|
-
src="https://assets.pokemon.com/assets/cms2/img/pokedex/full/246.png"
|
|
20
|
-
style="height: 200px"
|
|
21
|
-
alt="..."
|
|
22
|
-
/>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="col-4"></div>
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
<div>
|
|
28
|
-
<div class="row justify-content-center">
|
|
29
|
-
<div class="col-3"></div>
|
|
30
|
-
<div class="col-6 text-center">
|
|
31
|
-
<div id="title">
|
|
32
|
-
<p class="display-5">Larvitar Documentation</p>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
<div class="col-3"></div>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
<hr class="my-4" />
|
|
39
|
-
<div class="row justify-content-center">
|
|
40
|
-
<div class="col-3"></div>
|
|
41
|
-
<div class="col-6 text-center">
|
|
42
|
-
<div id="title">
|
|
43
|
-
<p class="lead">Dicom Image Toolkit for CornestoneJS</p>
|
|
44
|
-
<p class="lead" id="version"><i>v</i></p>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
<div class="col-3"></div>
|
|
48
|
-
</div>
|
|
49
|
-
|
|
50
|
-
<div class="row justify-content-center">
|
|
51
|
-
<div class="col-3"></div>
|
|
52
|
-
<div class="col-6 text-center">
|
|
53
|
-
<a
|
|
54
|
-
class="btn btn-outline-success btn-lg"
|
|
55
|
-
href="./documentation/index.html"
|
|
56
|
-
role="button"
|
|
57
|
-
>Docs
|
|
58
|
-
</a>
|
|
59
|
-
|
|
60
|
-
<a
|
|
61
|
-
class="btn btn-outline-success btn-lg"
|
|
62
|
-
href="./examples/index.html"
|
|
63
|
-
role="button"
|
|
64
|
-
>Examples
|
|
65
|
-
</a>
|
|
66
|
-
</div>
|
|
67
|
-
<div class="col-3"></div>
|
|
68
|
-
</div>
|
|
69
|
-
|
|
70
|
-
<hr class="mt-5 mb-5" />
|
|
71
|
-
</div>
|
|
72
|
-
|
|
73
|
-
<div class="row align-items-end">
|
|
74
|
-
<div class="col-2"></div>
|
|
75
|
-
<div class="col-8 text-center">
|
|
76
|
-
<a href="https://www.dvisionlab.com" target="_blank">
|
|
77
|
-
<img
|
|
78
|
-
src="https://www.dvisionlab.com/images/logo_500.png"
|
|
79
|
-
style="height: 300px"
|
|
80
|
-
alt="..."
|
|
81
|
-
/>
|
|
82
|
-
</a>
|
|
83
|
-
</div>
|
|
84
|
-
<div class="col-2"></div>
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
<script src="examples/larvitar.js"></script>
|
|
88
|
-
<script>
|
|
89
|
-
document.getElementById("version").innerHTML += larvitar.VERSION;
|
|
90
|
-
</script>
|
|
91
|
-
</body>
|
|
92
|
-
</html>
|