@fnndsc/argus 0.38.0 → 0.39.0
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/assets/{Settings-Ctwn_AZX.js → Settings-5MjiZs3m.js} +1 -1
- package/dist/assets/{Texture-D1v9Xy2I.js → Texture-DOfcDQbS.js} +1 -1
- package/dist/assets/{addVolumesToViewports-DAOdqC8e.js → addVolumesToViewports-Bb0m3THm.js} +1 -1
- package/dist/assets/{cornerstoneEngine-3rInTfmn.js → cornerstoneEngine-C-Ad7wRm.js} +2 -2
- package/dist/assets/{field-B9YUJfqB.js → field-Dry3W437.js} +3 -3
- package/dist/assets/{index-D16XL1_Y.js → index-3-iYk56R.js} +1 -1
- package/dist/assets/{index-C-wTlo8D.js → index-B6eZOqOc.js} +1 -1
- package/dist/assets/{index-Djdu-TKQ.css → index-BGaBRrms.css} +1 -1
- package/dist/assets/{index-j4GB7pgk.js → index-BM66Iqpq.js} +1 -1
- package/dist/assets/{index-DrTSUPZD.js → index-BPtfl54C.js} +1 -1
- package/dist/assets/{index-ByYv-ULM.js → index-BeBkGdY4.js} +1 -1
- package/dist/assets/{index-CdnmV0qh.js → index-C3nSyvq6.js} +1 -1
- package/dist/assets/{index-CqCG-b3T.js → index-CErCsopW.js} +1 -1
- package/dist/assets/{index-Bet-OavM.js → index-CgXV7KHK.js} +1 -1
- package/dist/assets/{index-Cfm-hN8L.js → index-CpqNW11B.js} +1 -1
- package/dist/assets/{index-BzesoZ0G.js → index-CrXkv4Vv.js} +1 -1
- package/dist/assets/{index-CtgxVxiE.js → index-CrjhBgBA.js} +1 -1
- package/dist/assets/{index-SQwtgFa6.js → index-DPfj2TXJ.js} +1 -1
- package/dist/assets/{index-CmT5b0Ou.js → index-DQf3qxtA.js} +1 -1
- package/dist/assets/{index-BrttXGaO.js → index-wXc13Noh.js} +259 -259
- package/dist/assets/niivueEngine-mmgElHY8.js +2 -0
- package/dist/assets/{slabScene-Bg94Bi0e.js → slabScene-Cw83Xw1C.js} +1 -1
- package/dist/build.json +1 -1
- package/dist/index.html +2 -2
- package/dist/notes.json +1 -1
- package/package.json +3 -3
- package/dist/assets/niivueEngine-DbkxQ2GF.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CrXkv4Vv.js","./_commonjsHelpers-CE1G-McA.js","./index-wXc13Noh.js","./index-BGaBRrms.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as u,b as a,I as c}from"./index-wXc13Noh.js";import{r as p}from"./refusal-DOpm8I8L.js";const m={gray:"gray",hot:"hot",jet:"jet",cool:"cool"},d={wl:"contrast",pan:"pan",length:"measurement",angle:"angle"};class g{name="niivue";host;path;nv=null;module=null;layout="mpr";tool="wl";colormap="gray";slice=0;slices=0;refused=0;disposed=!1;constructor(s,t){this.host=s,this.path=t}async open(s){const t=document.createElement("canvas");t.className="image-canvas",s.appendChild(t),this.host.readout_set("LOADING"),this.host.progress_set({label:"READING VOLUME",done:0,total:0});const e=performance.now();if(this.module=await u(()=>import("./index-CrXkv4Vv.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),this.disposed)return;const i=new this.module.Niivue({isResizeCanvas:!0,logLevel:"error",dragAndDropEnabled:!1,crosshairWidth:.4,crosshairWidthUnit:"percent"});i.onLocationChange=o=>{const r=o,l=r.vox?.[2];l!==void 0&&(this.slice=l+1),this.host.readout_set(`${this.slices>0?`SLICE ${this.slice} OF ${this.slices} · `:""}${r.string??""}`)},await i.attachToCanvas(t);const n=this.path.split("/").pop()??"volume.nii.gz";try{await i.loadVolumes([{url:a(this.host.source.url_resolve(this.path),location.href),name:n}])}catch(o){this.refused=1,this.host.progress_set(null),this.host.readout_set("REFUSED 1 OF 1"),this.host.note(`image: ${this.path}: ${o instanceof Error?o.message:String(o)}`);const r=await p(a(this.host.source.url_resolve(this.path),location.href));this.host.readout_set(`REFUSED 1 OF 1 · ${r}`),this.host.note(`image: ${this.path}: ${r.toLowerCase()}`);return}if(this.host.progress_set(null),this.disposed)return;this.nv=i;const h=i.volumes[0]?.dims;this.slices=h?.[3]??0,i.setSliceType(i.sliceTypeMultiplanar),this.layout="mpr",this.host.readout_set(`${this.slices} SLICES`),this.host.note(`image: ${n} drawn in ${Math.round(performance.now()-e)} ms`),this.host.regard(this.path)}async layout_set(s){return s==="slab"||this.nv===null?!1:(this.nv.setSliceType(s==="single"?this.nv.sliceTypeAxial:s==="mpr"?this.nv.sliceTypeMultiplanar:this.nv.sliceTypeRender),this.layout=s,this.host.readout_set(`${this.slices} SLICES`),!0)}slice_set(s){if(this.nv===null||this.slices===0)return!1;const t=Math.max(1,Math.min(s,this.slices)),e=this.slice>0?this.slice:Math.ceil(this.slices/2);return this.nv.moveCrosshairInVox(0,0,t-e),this.slice=t,!0}wl_set(s,t){const e=this.nv?.volumes[0];return this.nv===null||e===void 0?!1:(e.cal_min=s,e.cal_max=t,this.nv.updateGLVolume(),!0)}colormap_set(s){const t=this.nv?.volumes[0];return this.nv===null||t?.id===void 0?!1:(this.colormap=s,this.nv.setColormap(t.id,m[s]),!0)}toolsOffered_get(){return c}ghost_set(s){return!1}tool_set(s){const t=d[s];return this.nv===null||t===void 0?!1:(this.nv.setDragMode(t),this.tool=s,!0)}annotations_export(){return Promise.resolve(null)}annotations_import(){return Promise.resolve(0)}async slices_fill(){return this.nv!==null}state_get(){return{engine:"niivue",layout:this.layout,slice:this.slice,slices:this.slices,tool:this.tool,primaryTool:this.tool,refused:this.refused,annotations:0,filled:this.nv!==null,colormap:this.colormap}}dispose(){this.disposed=!0,this.nv=null}}export{g as NiivueEngine};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as v,as as _e,R as ft,K as Ge,L as Le,W as ke,N as We,k as de,E as X,t as vt,i as Me,x as ce,F as ht,Z as St,h as dt,D as Tt,al as wt,c as yt,at as Ct,d as Ve,au as xt,y as ue,ak as le,av as ze,j as pe}from"./cornerstoneEngine-
|
|
1
|
+
import{m as v,as as _e,R as ft,K as Ge,L as Le,W as ke,N as We,k as de,E as X,t as vt,i as Me,x as ce,F as ht,Z as St,h as dt,D as Tt,al as wt,c as yt,at as Ct,d as Ve,au as xt,y as ue,ak as le,av as ze,j as pe}from"./cornerstoneEngine-C-Ad7wRm.js";import{ae as Ne,am as De,an as re,K as B,k as Z,al as $,D as se,U as $e,X as Be,B as Q,J as Et,E as Rt,ak as _t,$ as He,a2 as Mt,Z as Vt,b as Dt,_ as Ke,ao as Bt,ap as be,aq as mt,ar as Te,as as Ot,z as Ut,at as Ft,au as Pt,av as ae,ad as Gt,R as Lt,aw as Y,ah as kt,ai as Wt,C as zt,P as Nt,I as $t,a as Ht}from"./Texture-DOfcDQbS.js";import"./index-wXc13Noh.js";import"./refusal-DOpm8I8L.js";import"./_commonjsHelpers-CE1G-McA.js";function Kt(t){return t}function ye(t){if(t===null||t==="null")return null;if(t==="true")return!0;if(t==="false")return!1;if(!(t===void 0||t==="undefined"))return t[0]==="["&&t[t.length-1]==="]"?t.substring(1,t.length-1).split(",").map(e=>ye(e.trim())):t===""||Number.isNaN(Number(t))?t:Number(t)}function bt(t=!0,e=window.location.search){const r={},s=t?ye:Kt;return new URLSearchParams(e).forEach((n,a)=>{a&&(r[a]=n?s(n):!0)}),r}var It={toNativeType:ye,extractURLParameters:bt},jt={IS_START:0,IS_NONE:0,IS_ROTATE:1,IS_PAN:2,IS_SPIN:3,IS_DOLLY:4,IS_CAMERA_POSE:11,IS_WINDOW_LEVEL:1024,IS_SLICE:1025},Ce={States:jt},{vtkErrorMacro:Qt,VOID:Yt}=v;function Xt(t,e,r,s){return t.getRenderWindow().getViews()[0].worldToDisplay(e,r,s,t)}function Zt(t,e,r,s){return t.getRenderWindow().getViews()[0].displayToWorld(e,r,s,t)}var Jt={computeWorldToDisplay:Xt,computeDisplayToWorld:Zt};function qt(t,e){e.classHierarchy.push("vtkInteractorObserver");const r={...t};function s(){for(;e.subscribedEvents.length;)e.subscribedEvents.pop().unsubscribe()}function n(){Ne.handledEvents.forEach(a=>{t[`handle${a}`]&&e.subscribedEvents.push(e._interactor[`on${a}`](o=>e.processEvents?t[`handle${a}`](o):Yt,e.priority))})}t.setInteractor=a=>{a!==e._interactor&&(s(),e._interactor=a,a&&e.enabled&&n(),t.modified())},t.setEnabled=a=>{a!==e.enabled&&(s(),a&&(e._interactor?n():Qt(`
|
|
2
2
|
The interactor must be set before subscribing to events
|
|
3
3
|
`)),e.enabled=a,t.modified())},t.computeDisplayToWorld=(a,o,i,u)=>a?e._interactor.getView().displayToWorld(o,i,u,a):null,t.computeWorldToDisplay=(a,o,i,u)=>a?e._interactor.getView().worldToDisplay(o,i,u,a):null,t.setPriority=a=>{r.setPriority(a)&&e._interactor&&(s(),n())}}var At={enabled:!0,priority:0,processEvents:!0,subscribedEvents:[]};function Ie(t,e,r={}){Object.assign(e,At,r),v.obj(t,e),v.event(t,e,"InteractionEvent"),v.event(t,e,"StartInteractionEvent"),v.event(t,e,"EndInteractionEvent"),v.get(t,e,["_interactor","enabled"]),v.setGet(t,e,["priority","processEvents"]),v.moveToProtected(t,e,["interactor"]),qt(t,e)}var en=v.newInstance(Ie,"vtkInteractorObserver"),tn={newInstance:en,extend:Ie,...Jt},{States:N}=Ce,ge={Rotate:N.IS_ROTATE,Pan:N.IS_PAN,Spin:N.IS_SPIN,Dolly:N.IS_DOLLY,CameraPose:N.IS_CAMERA_POSE,WindowLevel:N.IS_WINDOW_LEVEL,Slice:N.IS_SLICE};function nn(t,e){e.classHierarchy.push("vtkInteractorStyle"),Object.keys(ge).forEach(r=>{v.event(t,e,`Start${r}Event`),t[`start${r}`]=()=>{e.state===N.IS_NONE&&(e.state=ge[r],e._interactor.requestAnimation(t),t.invokeStartInteractionEvent({type:"StartInteractionEvent"}),t[`invokeStart${r}Event`]({type:`Start${r}Event`}))},v.event(t,e,`End${r}Event`),t[`end${r}`]=()=>{e.state===ge[r]&&(e.state=N.IS_NONE,e._interactor.cancelAnimation(t),t.invokeEndInteractionEvent({type:"EndInteractionEvent"}),t[`invokeEnd${r}Event`]({type:`End${r}Event`}),e._interactor.render())}}),e.getRenderer=r=>e.focusedRenderer||r.pokedRenderer,t.handleKeyPress=r=>{const s=e._interactor;let n=null;switch(r.key){case"r":case"R":e.getRenderer(r).resetCamera(),s.render();break;case"w":case"W":n=e.getRenderer(r).getActors(),n.forEach(a=>{const o=a.getProperty();o.setRepresentationToWireframe&&o.setRepresentationToWireframe()}),s.render();break;case"s":case"S":n=e.getRenderer(r).getActors(),n.forEach(a=>{const o=a.getProperty();o.setRepresentationToSurface&&o.setRepresentationToSurface()}),s.render();break;case"v":case"V":n=e.getRenderer(r).getActors(),n.forEach(a=>{const o=a.getProperty();o.setRepresentationToPoints&&o.setRepresentationToPoints()}),s.render();break}}}var rn={state:N.IS_NONE,handleObservers:1,autoAdjustCameraClippingRange:1};function je(t,e,r={}){Object.assign(e,rn,r),tn.extend(t,e,r),v.setGet(t,e,["focusedRenderer"]),nn(t,e)}var an=v.newInstance(je,"vtkInteractorStyle"),xe={newInstance:an,extend:je,...Ce},{States:W}=Ce;function sn(t,e){e.classHierarchy.push("vtkInteractorStyleTrackballCamera"),t.handleMouseMove=r=>{const s=r.position,n=e.getRenderer(r);switch(e.state){case W.IS_ROTATE:t.handleMouseRotate(n,s),t.invokeInteractionEvent({type:"InteractionEvent"});break;case W.IS_PAN:t.handleMousePan(n,s),t.invokeInteractionEvent({type:"InteractionEvent"});break;case W.IS_DOLLY:e.wheelDolly||(t.handleMouseDolly(n,s),t.invokeInteractionEvent({type:"InteractionEvent"}));break;case W.IS_SPIN:t.handleMouseSpin(n,s),t.invokeInteractionEvent({type:"InteractionEvent"});break}e.previousPosition=s},t.handleButton3D=r=>{if(r&&r.pressed&&r.device===De.RightController&&(r.input===re.Trigger||r.input===re.TrackPad)){t.startCameraPose();return}r&&!r.pressed&&r.device===De.RightController&&(r.input===re.Trigger||r.input===re.TrackPad)&&e.state===W.IS_CAMERA_POSE&&t.endCameraPose()},t.handleMove3D=r=>{e.state===W.IS_CAMERA_POSE&&t.updateCameraPose(r)},t.updateCameraPose=r=>{const s=e.getRenderer(r).getActiveCamera(),n=s.getPhysicalTranslation(),a=.5*.05*s.getPhysicalScale(),o=s.physicalOrientationToWorldDirection([r.orientation.x,r.orientation.y,r.orientation.z,r.orientation.w]);s.setPhysicalTranslation(n[0]+o[0]*a,n[1]+o[1]*a,n[2]+o[2]*a)},t.handleLeftButtonPress=r=>{e.previousPosition=r.position,r.shiftKey?r.controlKey||r.altKey?t.startDolly():t.startPan():r.controlKey||r.altKey?t.startSpin():t.startRotate()},t.handleLeftButtonRelease=()=>{switch(e.state){case W.IS_DOLLY:t.endDolly();break;case W.IS_PAN:t.endPan();break;case W.IS_SPIN:t.endSpin();break;case W.IS_ROTATE:t.endRotate();break}},t.handleStartMouseWheel=()=>{e.wheelDolly=!0,t.startDolly()},t.handleEndMouseWheel=()=>{t.endDolly(),e.wheelDolly=!1},t.handleStartPinch=r=>{e.previousScale=r.scale,t.startDolly()},t.handleEndPinch=()=>{t.endDolly()},t.handleStartRotate=r=>{e.previousRotation=r.rotation,t.startRotate()},t.handleEndRotate=()=>{t.endRotate()},t.handleStartPan=r=>{e.previousTranslation=r.translation,t.startPan()},t.handleEndPan=()=>{t.endPan()},t.handlePinch=r=>{t.dollyByFactor(e.getRenderer(r),r.scale/e.previousScale),e.previousScale=r.scale},t.handlePan=r=>{const s=e.getRenderer(r).getActiveCamera();let n=s.getFocalPoint();n=t.computeWorldToDisplay(e.getRenderer(r),n[0],n[1],n[2]);const a=n[2],o=r.translation,i=e.previousTranslation,u=t.computeDisplayToWorld(e.getRenderer(r),n[0]+o[0]-i[0],n[1]+o[1]-i[1],a),p=t.computeDisplayToWorld(e.getRenderer(r),n[0],n[1],a),c=[];c[0]=p[0]-u[0],c[1]=p[1]-u[1],c[2]=p[2]-u[2],n=s.getFocalPoint();const l=s.getPosition();s.setFocalPoint(c[0]+n[0],c[1]+n[1],c[2]+n[2]),s.setPosition(c[0]+l[0],c[1]+l[1],c[2]+l[2]),e._interactor.getLightFollowCamera()&&e.getRenderer(r).updateLightsGeometryToFollowCamera(),s.orthogonalizeViewUp(),e.previousTranslation=r.translation},t.handleRotate=r=>{const s=e.getRenderer(r).getActiveCamera();s.roll(r.rotation-e.previousRotation),s.orthogonalizeViewUp(),e.previousRotation=r.rotation},t.handleMouseRotate=(r,s)=>{if(!e.previousPosition)return;const n=e._interactor,a=s.x-e.previousPosition.x,o=s.y-e.previousPosition.y,i=n.getView().getViewportSize(r);let u=-.1,p=-.1;i[0]&&i[1]&&(u=-20/i[1],p=-20/i[0]);const c=a*p*e.motionFactor,l=o*u*e.motionFactor,g=r.getActiveCamera();!Number.isNaN(c)&&!Number.isNaN(l)&&(g.azimuth(c),g.elevation(l),g.orthogonalizeViewUp()),e.autoAdjustCameraClippingRange&&r.resetCameraClippingRange(),n.getLightFollowCamera()&&r.updateLightsGeometryToFollowCamera()},t.handleMouseSpin=(r,s)=>{if(!e.previousPosition)return;const n=e._interactor,a=r.getActiveCamera(),o=n.getView().getViewportCenter(r),i=_e(Math.atan2(e.previousPosition.y-o[1],e.previousPosition.x-o[0])),u=_e(Math.atan2(s.y-o[1],s.x-o[0]))-i;Number.isNaN(u)||(a.roll(u),a.orthogonalizeViewUp())},t.handleMousePan=(r,s)=>{if(!e.previousPosition)return;const n=r.getActiveCamera();let a=n.getFocalPoint();a=t.computeWorldToDisplay(r,a[0],a[1],a[2]);const o=a[2],i=t.computeDisplayToWorld(r,s.x,s.y,o),u=t.computeDisplayToWorld(r,e.previousPosition.x,e.previousPosition.y,o),p=[];p[0]=u[0]-i[0],p[1]=u[1]-i[1],p[2]=u[2]-i[2],a=n.getFocalPoint();const c=n.getPosition();n.setFocalPoint(p[0]+a[0],p[1]+a[1],p[2]+a[2]),n.setPosition(p[0]+c[0],p[1]+c[1],p[2]+c[2]),e._interactor.getLightFollowCamera()&&r.updateLightsGeometryToFollowCamera()},t.handleMouseDolly=(r,s)=>{if(!e.previousPosition)return;const n=s.y-e.previousPosition.y,a=e._interactor.getView().getViewportCenter(r),o=e.motionFactor*n/a[1];t.dollyByFactor(r,1.1**o)},t.handleMouseWheel=r=>{const s=1-r.spinY/e.zoomFactor;t.dollyByFactor(e.getRenderer(r),s)},t.dollyByFactor=(r,s)=>{if(Number.isNaN(s))return;const n=r.getActiveCamera();n.getParallelProjection()?n.setParallelScale(n.getParallelScale()/s):(n.dolly(s),e.autoAdjustCameraClippingRange&&r.resetCameraClippingRange()),e._interactor.getLightFollowCamera()&&r.updateLightsGeometryToFollowCamera()}}var on={motionFactor:10,zoomFactor:10,wheelDolly:!1};function Qe(t,e,r={}){Object.assign(e,on,r),xe.extend(t,e,r),v.setGet(t,e,["motionFactor","zoomFactor"]),sn(t,e)}var cn=v.newInstance(Qe,"vtkInteractorStyleTrackballCamera"),un={newInstance:cn,extend:Qe},{vtkErrorMacro:ln}=ft,fe=["setBindGroup","setIndexBuffer","setVertexBuffer","draw","drawIndexed"];function pn(t,e){e.classHierarchy.push("vtkWebGPURenderEncoder"),t.begin=r=>{e.drawCallbacks=[],e.handle=r.beginRenderPass(e.description),e.label&&e.handle.pushDebugGroup(e.label)},t.end=()=>{for(let r=0;r<e.drawCallbacks.length;r++){const s=e.drawCallbacks[r],n=s.pipeline;t.setPipeline(n);for(let a=0;a<s.callbacks.length;a++)s.callbacks[a](t)}e.label&&e.handle.popDebugGroup(),e.handle.end(),e.boundPipeline=null},t.setPipeline=r=>{if(e.boundPipeline===r)return;e.handle.setPipeline(r.getHandle());const s=r.getPipelineDescription(),n=s.fragment?.targets;if(e.colorTextureViews.length!==n.length)console.log(`mismatched attachment counts on pipeline ${n.length} while encoder has ${e.colorTextureViews.length}`),console.trace();else for(let a=0;a<e.colorTextureViews.length;a++){const o=e.colorTextureViews[a].getTexture()?.getFormat();o&&o!==n[a].format&&(console.log(`mismatched attachments for attachment ${a} on pipeline ${n[a].format} while encoder has ${o}`),console.trace())}if(!!e.depthTextureView!="depthStencil"in s)console.log("mismatched depth attachments"),console.trace();else if(e.depthTextureView){const a=e.depthTextureView.getTexture()?.getFormat();a&&a!==s.depthStencil.format&&(console.log(`mismatched depth attachments on pipeline ${s.depthStencil.format} while encoder has ${a}`),console.trace())}e.boundPipeline=r},t.replaceShaderCode=r=>{e.replaceShaderCodeFunction(r)},t.setColorTextureView=(r,s)=>{e.colorTextureViews[r]!==s&&(e.colorTextureViews[r]=s)},t.activateBindGroup=r=>{const s=e.boundPipeline.getDevice(),n=e.boundPipeline.getBindGroupLayoutIndex(r.getLabel());if(n<0){ln(`vtkWebGPURenderEncoder: could not find bind group layout ${r.getLabel()}`);return}e.handle.setBindGroup(n,r.getBindGroup(s));const a=s.getBindGroupLayoutDescription(r.getBindGroupLayout(s)),o=s.getBindGroupLayoutDescription(e.boundPipeline.getBindGroupLayout(n));a!==o&&(console.log(`renderEncoder ${e.pipelineHash} mismatched bind group layouts bind group has
|
|
4
4
|
${a}
|
package/dist/build.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"git":"
|
|
1
|
+
{"git":"89d24509","built":"2026-10-24 19:48"}
|
package/dist/index.html
CHANGED
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
href="https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap"
|
|
20
20
|
rel="stylesheet"
|
|
21
21
|
/>
|
|
22
|
-
<script type="module" crossorigin src="./assets/index-
|
|
23
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
22
|
+
<script type="module" crossorigin src="./assets/index-wXc13Noh.js"></script>
|
|
23
|
+
<link rel="stylesheet" crossorigin href="./assets/index-BGaBRrms.css">
|
|
24
24
|
</head>
|
|
25
25
|
<body>
|
|
26
26
|
<!-- ARGUS's own four sounds, synthesised rather than borrowed
|