Mercurial > hg > orthanc-stone
diff Applications/StoneWebViewer/NOTES.txt @ 1696:572652803929
bootstrapping the Stone Web viewer configuration file
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 27 Nov 2020 09:34:02 +0100 |
parents | e787b52d025f |
children | bc40b6450261 |
line wrap: on
line diff
--- a/Applications/StoneWebViewer/NOTES.txt Thu Nov 26 19:46:33 2020 +0100 +++ b/Applications/StoneWebViewer/NOTES.txt Fri Nov 27 09:34:02 2020 +0100 @@ -47,3 +47,38 @@ If the "selectedStudies" is not provided, then all the studies are displayed at the startup. + +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.