Mercurial > hg > orthanc-stone
view Applications/StoneWebViewer/NOTES.txt @ 1799:1125793d82d3
serialization of annotations
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 20 May 2021 11:49:21 +0200 |
parents | 604fc328dc10 |
children | 142c7ee8fe1f |
line wrap: on
line source
Differences with Osimis Web viewer ================================== - The images are retrieved using DICOMweb. - In the Stone Web viewer, the individual instances are loaded on an as-needed basis, in order to reduce the network bandwidth usage. This contrasts with the Osimis Web viewer that loads the entire images in the background. - Contrarily to the Osimis Web viewer, the Stone Web viewer does not currently support annotations, and will not support Live Share. - The Stone Web viewer has no "timeline" bar to see the position of the current frame in the series. However, pressing the "Ctrl" key together with mouse wheel enables fast move, i.e. this changes the current frame by skipping 1/20th of the frames in the series. - The Stone Web viewer displays a color block at the bottom-right of each viewport. A "red" color means that the current frame is still being loaded, so don't trust what is currently displayed. A "yellow" color means that the viewport displays a low-quality preview (JPEG). A "green" color means that the viewport contains an image with the same quality as the source DICOM image. - The Stone Web viewer uses the DICOM identifiers, while the Osimis Web viewer uses the Orthanc identifiers. https://book.orthanc-server.com/faq/orthanc-ids.html In the Stone Web viewer, the studies are indexed by their "Study Instance UID" tag (0020,000d). The series are indexed by their "Series Instance UID" tag (0020,000e). To open a single series, the parent study must be provided. To open a single study: http://.../index.html?study=<StudyInstanceUID> To open a single series: http://.../index.html?study=<StudyInstanceUID>&series=<SeriesInstanceUID> - In the Osimis Web viewer, the "OpenAllPatientStudies" configuration option can be provided to search Orthanc for all studies from patients with the same PatientID as the selected study, then display them. In the Stone Web viewer, the "OpenAllPatientStudies" configuration option is replaced by the single "patient" GET argument. This option contains a comma-separated list of "Patient ID" tag (0010,0020). To open all the studies of one patient: http://.../index.html?patient=<PatientID> To open all the studies of several patients: http://.../index.html?patient=<PatientID1>,<PatientID2>,... - In the Osimis Web viewer, the "pickableStudyIds" parameter in the URL defines the list of studies that are available for display, and that are listed in the dropdown at the top-left of the interface. In the Stone Web viewer, "pickableStudyIds" is replaced by the single "study" GET argument, that is allowed to contain a comma-separated list of studies. The "series" parameter must not be provided in this case. To open a list of studies: http://.../index.html?study=<StudyInstanceUID1>,<StudyInstanceUID2>,... - In the Osimis Web viewer, the "selectedStudyIds" parameter in the URL defines the list of studies that are selected in the dropdown at the top-left corner of the viewer (those studies are therefore displayed when the viewer starts). In the Stone Web viewer, "selectedStudyIds" is replaced by the "selectedStudies" GET argument, that is allowed to contain a comma-separated list of studies. To make a list of studies available, but display only one of those studies when the viewer starts, please use: http://.../index.html?study=<StudyInstanceUID1>,<StudyInstanceUID2>,...&selectedStudies=<StudyInstanceUID1> If the "selectedStudies" is not provided, then all the studies are displayed at the startup. Authorization to the DICOMweb server (new in 2.0) ==================================== The function "stone.AddHttpHeader()" exposed in the WebAssembly API can be used to add custom HTTP headers to each XMLHttpRequest that is sent to the DICOMweb server. This notably gives the opportunity to provide an authentication token using the "Authorization" HTTP header. The Vue.js application will set the "Authorization" HTTP header to the value "Bearer <token>" where "<token>" is value of the GET argument "token" provided when opening "index.html". If the "token" GET argument is absent, the "Authorization" header is not altered. For instance, if the user opens the Stone Web viewer using the following URL: http://.../index.html?study=<StudyInstanceUID1>&token=Hello Then each request to the DICOMweb server will contain the HTTP header: "Authorization: Bearer Hello" Dynamic actions using messages ============================== Some actions can be dynamically triggered in the Stone Web viewer from another Web page. This is done by using the "window.postMessage()" primitive of JavaScript: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage Each message must be a JSON object containing at least the "type" field. The latter field indicates the type of action to be triggered. For security, the "ExpectedMessageOrigin" configuration option of the Stone Web viewer must have been set to the expected origin of the messages. Otherwise, the Stone Web viewer will reject the message. Action of type "show-osirix-annotations" ---------------------------------------- This action loads a set of ROIs exported from OsiriX. The ROIs must use the XML file format of OsiriX. The parent DICOM study containing the annotation(s) must have been loaded by the Stone Web viewer beforehand. The Stone Web viewer shall automatically focus on one instance that is associated with the ROIs. The JSON message must contain the following fields: - "type" must be equal to "show-osirix-annotations" - "xml" must contain the XML file generated by OsiriX - "clear" is a Boolean to indicate whether to clear the annotations that have previously been opened.