Skip to content

Latest commit

 

History

History
68 lines (36 loc) · 2.84 KB

2023-06-15.md

File metadata and controls

68 lines (36 loc) · 2.84 KB

OHIF Office Hours Notes 2023-06-15


Q & A

How to use postMessage to pass parameters from parent app to OHIF?

iframe has well documented api to listen and postMessage https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage

Listen for post messages in the OHIF window (e.g. in an extension) (e.g. window.addEventListener("message", handleOnMessage); ). Be mindful of security… maybe have an allowed set of origins to post messages.

Post messages from the parent using the iframe (e.g. iframeElem.contentWindow.postMessage(msg, "http://localhost:3000");)


What are the sources of CORS errors when hosting from an nginx container? I encountered this when trying to use OHIF in combination with a dcm4che archive and I am unsure how to proceed.

see the orthanc nginx.conf; set headers 'Access-Control-Allow-Origin' and 'Cross-Origin-Resource-Policy'

Other References: https://developer.chrome.com/blog/coep-credentialless-origin-trial/


What is the offline support for OHIF

It is doable through service workers


Colormap fusion seems incorrect regarding opacity (0.9 is visually 0.5)

Seems like the composite blend mode in vtk has a nonlinear signature for opacity

read more here Kitware/vtk-js#2093

we probably should define another blend mode so that we can have a linear behavior


With DICOM datasets, the coordinates generated by the measurementservice return as [x,y,z]. In the 2D space, sometimes the z is 0, other times the x is 0. E.g. points: [[0, 1.03, 4.06], [0, 1.05, 4.09]...] vs [[128.01, 132.01, 0], [129.37, 138.67, 0]...]. Is there a way we can programmatically detect the coordinate system the DICOM dataset is using?

worldToImageCoords utility function or VolumeViewport.getImageData - it has convert world to index

https://www.slicer.org/wiki/Coordinate_systems#:~:text=The%20image%20coordinate%20system%20describes,and%20the%20k%20axis%20backwards.

https://kitware.github.io/vtk-js/api/Common_DataModel_ImageData.html


Language question, is there a difference between “annotation” (term used in cornerstone) and “measurement” (used in OHIF)

In theory a measurement is a group of annotations. However, in OHIF it is just a one-to-one mapping currently.


How do I enable simultaneous synchronized scrolling of two viewports in a hanging protocol of the same series? Like you have in TMTV in the first column.

extensions/tmtv/src/getHangingProtocolModule.js


tool question: just trying to create a new tool that can cut a region of the dicom image and do some manipulations (drag/move/rotate/scale, just as the ohif annotations). any tool(freehandROI??) I can refer to? background: it is a request from my friend who want to use ohif viewer to do orthopedic preoperative surgery planning for pets.

use a binary mask; look into ITK wasm; or do it server side