Mercurial > hg > orthanc-book
diff Sphinx/source/plugins/python.rst @ 539:fd5c1410db5b
doc for RestApiPostAfterPlugins
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Thu, 05 Nov 2020 15:09:50 +0100 |
parents | 50bdd7c7e9b9 |
children | d0332c5a2cb8 |
line wrap: on
line diff
--- a/Sphinx/source/plugins/python.rst Thu Nov 05 07:36:18 2020 +0100 +++ b/Sphinx/source/plugins/python.rst Thu Nov 05 15:09:50 2020 +0100 @@ -360,6 +360,19 @@ orthanc.RegisterOnChangeCallback(OnChange) +Note that, if you want to use an orthanc plugin to transfer the study, +you should use the ``RestApiPostAfterPlugins()`` method:: + + import orthanc + + def OnChange(changeType, level, resourceId): + if changeType == orthanc.ChangeType.STABLE_STUDY: + print('Stable study: %s' % resourceId) + orthanc.RestApiPostAfterPlugins('/dicom-web/servers/sample/store', resourceId) + + orthanc.RegisterOnChangeCallback(OnChange) + + Rendering a thumbnail using PIL/Pillow ......................................