@3cr/viewer-browser 0.0.195 → 0.0.200
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/dist/Viewer3CR.js +25 -25
- package/dist/Viewer3CR.mjs +553 -543
- package/dist/Viewer3CR.umd.js +15 -15
- package/package.json +2 -2
- package/playground/index.html +5 -1
- package/src/components/modal/ViewerAnnotationModal.vue +2 -6
- package/src/components/modal/ViewerAnnotations.vue +14 -8
- package/src/services/gpt/gpt.service.ts +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@3cr/viewer-browser",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.200",
|
|
4
4
|
"main": "./dist/Viewer3CR.umd.js",
|
|
5
5
|
"module": "dist/Viewer3CR.umd.js",
|
|
6
6
|
"homepage": "https://docs.3cr.singular.health",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"coverage": "vitest run --coverage"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@3cr/sdk-browser": "^1.0.
|
|
24
|
+
"@3cr/sdk-browser": "^1.0.15",
|
|
25
25
|
"@3cr/types-ts": "file:static/3cr-types-browser",
|
|
26
26
|
"@kyvg/vue3-notification": "^3.2.1",
|
|
27
27
|
"@mdi/font": "6.2.95",
|
package/playground/index.html
CHANGED
|
@@ -92,7 +92,11 @@
|
|
|
92
92
|
|
|
93
93
|
const dynamicConfig = client.getDynamicConfig("3cr_viewer_version");
|
|
94
94
|
const testVersion = (isTest) && new URLSearchParams(window.location.search).get("build_version")
|
|
95
|
-
|
|
95
|
+
let version = testVersion
|
|
96
|
+
if (!testVersion) {
|
|
97
|
+
version = dynamicConfig.value["sdkVersion"] ?? "1.1.0";
|
|
98
|
+
}
|
|
99
|
+
// const version = testVersion || dynamicConfig.value["sdkVersion"] ?? "1.1.0";
|
|
96
100
|
|
|
97
101
|
client.initializeAsync().then(() => {
|
|
98
102
|
window.registerViewer(version).then(() => {
|
|
@@ -26,9 +26,7 @@
|
|
|
26
26
|
<b style="font-size: 12px">Smart Description</b>
|
|
27
27
|
</v-col>
|
|
28
28
|
<v-col>
|
|
29
|
-
<span style="font-size: 12px">
|
|
30
|
-
smartResponses.GptResponse
|
|
31
|
-
}}</span>
|
|
29
|
+
<span v-html="smartResponses.GptResponse" style="font-size: 12px"></span>
|
|
32
30
|
</v-col>
|
|
33
31
|
</v-row>
|
|
34
32
|
<v-row no-gutters>
|
|
@@ -37,9 +35,7 @@
|
|
|
37
35
|
</v-col>
|
|
38
36
|
<v-col>
|
|
39
37
|
<template v-for="action in actions">
|
|
40
|
-
<a style="font-size: 12px" :href="action.ActionData.Url">{{
|
|
41
|
-
action.ActionData.Description
|
|
42
|
-
}}</a>
|
|
38
|
+
<a style="font-size: 12px" :href="action.ActionData.Url" target="_blank">{{ action.ActionData.Description }}</a>
|
|
43
39
|
<br />
|
|
44
40
|
</template>
|
|
45
41
|
</v-col>
|
|
@@ -59,12 +59,14 @@
|
|
|
59
59
|
@askFollowup="askFollowUpQuestion"
|
|
60
60
|
>
|
|
61
61
|
</AskAI>
|
|
62
|
-
<
|
|
62
|
+
<div
|
|
63
63
|
class="text-caption"
|
|
64
|
-
style="font-size:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
style="font-size: 9px !important; line-height: 12px !important"
|
|
65
|
+
>
|
|
66
|
+
* 3Dicom's Annotiva AI is powered by AI Large Language Models (LLMs) which
|
|
67
|
+
generate general health information for improved patient comprehension.
|
|
68
|
+
<br /><br />It is NOT for diagnostic usage.
|
|
69
|
+
</div>
|
|
68
70
|
</template>
|
|
69
71
|
|
|
70
72
|
<script setup lang="ts">
|
|
@@ -72,7 +74,7 @@ import { dataOverlayState, initialScanState } from "@/dataLayer/scanState";
|
|
|
72
74
|
import { nextTick, onMounted, ref } from "vue";
|
|
73
75
|
import { ColourData, SlidersActions, Vector3Data } from "@3cr/types-ts";
|
|
74
76
|
import { GptQuestion, GptService } from "@/services/gpt/gpt.service";
|
|
75
|
-
import {useViewer3cr} from "@/dataLayer/useViewer3cr";
|
|
77
|
+
import { useViewer3cr } from "@/dataLayer/useViewer3cr";
|
|
76
78
|
|
|
77
79
|
interface Annotation {
|
|
78
80
|
id: string;
|
|
@@ -233,10 +235,14 @@ function getBackgroundStyles(item: Annotation): Record<string, any> {
|
|
|
233
235
|
|
|
234
236
|
async function focusSlices(ids: unknown[]): Promise<void> {
|
|
235
237
|
const id = ids.length > 0 ? ids[0] : null;
|
|
236
|
-
if (!id) {
|
|
238
|
+
if (!id) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
237
241
|
|
|
238
242
|
const item = findNode(id as string);
|
|
239
|
-
if (!item) {
|
|
243
|
+
if (!item) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
240
246
|
|
|
241
247
|
const x = item.position?.X ?? 0;
|
|
242
248
|
const y = item.position?.Y ?? 0;
|
|
@@ -7,9 +7,17 @@ export class GptService {
|
|
|
7
7
|
|
|
8
8
|
client: AxiosInstance = axios.create();
|
|
9
9
|
|
|
10
|
-
async GenerateAnnotations(
|
|
10
|
+
async GenerateAnnotations(
|
|
11
|
+
title: string,
|
|
12
|
+
question: number = 0
|
|
13
|
+
): Promise<AxiosResponse<GptResponsePayload>> {
|
|
14
|
+
const testVersion =
|
|
15
|
+
window.location.href.includes("test.") ||
|
|
16
|
+
window.location.href.includes("localhost");
|
|
11
17
|
return this.client.post(
|
|
12
|
-
|
|
18
|
+
`https://${
|
|
19
|
+
testVersion ? "test." : ""
|
|
20
|
+
}api.singular.health/api/GPT/Smart/Annotation`,
|
|
13
21
|
null,
|
|
14
22
|
{ params: { annotationTitle: title, question } }
|
|
15
23
|
);
|