comparison 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
comparison
equal deleted inserted replaced
537:2c8f4eca3cd2 539:fd5c1410db5b
358 orthanc.RestApiPost('/modalities/sample/store', resourceId) 358 orthanc.RestApiPost('/modalities/sample/store', resourceId)
359 359
360 orthanc.RegisterOnChangeCallback(OnChange) 360 orthanc.RegisterOnChangeCallback(OnChange)
361 361
362 362
363 Note that, if you want to use an orthanc plugin to transfer the study,
364 you should use the ``RestApiPostAfterPlugins()`` method::
365
366 import orthanc
367
368 def OnChange(changeType, level, resourceId):
369 if changeType == orthanc.ChangeType.STABLE_STUDY:
370 print('Stable study: %s' % resourceId)
371 orthanc.RestApiPostAfterPlugins('/dicom-web/servers/sample/store', resourceId)
372
373 orthanc.RegisterOnChangeCallback(OnChange)
374
375
363 Rendering a thumbnail using PIL/Pillow 376 Rendering a thumbnail using PIL/Pillow
364 ...................................... 377 ......................................
365 378
366 .. highlight:: python 379 .. highlight:: python
367 380