comparison Sphinx/source/users/rest.rst @ 173:901bc7b2dbab

improved bulk store scu section
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 09 Nov 2018 15:00:31 +0100
parents 8239d44e0520
children 7213bef30604
comparison
equal deleted inserted replaced
172:e239c4561bdc 173:901bc7b2dbab
416 $ curl -X POST http://localhost:8042/modalities/sample/store -d c4ec7f68-9b162055-2c8c5888-5bf5752f-155ab19f 416 $ curl -X POST http://localhost:8042/modalities/sample/store -d c4ec7f68-9b162055-2c8c5888-5bf5752f-155ab19f
417 417
418 The ``/sample/`` component of the URI corresponds to the identifier of 418 The ``/sample/`` component of the URI corresponds to the identifier of
419 the remote modality, as specified above in the configuration file. 419 the remote modality, as specified above in the configuration file.
420 420
421 Note that you can send isolated DICOM instances with this command, but also entire patients, studies or series. 421 Note that you can send isolated DICOM instances with this command, but
422 also entire patients, studies or series.
422 423
423 Bulk Store SCU 424 Bulk Store SCU
424 ^^^^^^^^^^^^^^ 425 ^^^^^^^^^^^^^^
425 426
426 .. highlight:: bash 427 .. highlight:: bash
427 428
428 Each time a POST request is made to ``/modalities/.../store``, a new 429 Each time a POST request is made to ``/modalities/.../store``, a new
429 DICOM connection is possibly established. This may lead to a large 430 DICOM association is possibly established. This may lead to a large
430 communication overhead if sending multiple isolated instances. 431 communication overhead if sending multiple isolated instances by
432 making one REST call for each of these instances.
431 433
432 To circumvent this problem, you have 2 possibilities: 434 To circumvent this problem, you have 2 possibilities:
433 435
434 1. Set the ``DicomAssociationCloseDelay`` option in the 436 1. Set the ``DicomAssociationCloseDelay`` option in the
435 :ref:`configuration file <configuration>` to a non-zero value. This 437 :ref:`configuration file <configuration>` to a non-zero value. This
436 will keep the DICOM connection open for a certain amount of time, 438 will keep the DICOM connection open for a certain amount of time,
437 waiting for new instances to be routed. 439 waiting for new instances to be routed. This is useful if
438 440 autorouting images :ref:`using Lua <lua-auto-routing>`.
439 2. If you do not want to keep the connection open but inactive, it is 441
440 possible to send multiple instances with a single POST request 442 2. It is possible to send multiple instances with a single POST
441 (so-called "Bulk Store SCU", available from Orthanc 0.5.2):: 443 request (so-called "Bulk Store SCU", available from Orthanc
444 0.5.2)::
442 445
443 $ curl -X POST http://localhost:8042/modalities/sample/store -d '["d4b46c8e-74b16992-b0f5ca11-f04a60fa-8eb13a88","d5604121-7d613ce6-c315a5-a77b3cf3-9c253b23","cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e"]' 446 $ curl -X POST http://localhost:8042/modalities/sample/store -d '["d4b46c8e-74b16992-b0f5ca11-f04a60fa-8eb13a88","d5604121-7d613ce6-c315a5-a77b3cf3-9c253b23","cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e"]'
444 447
445 The list of the resources to be sent are given as a JSON array. In 448 The list of the resources to be sent are given as a JSON array. In
446 this case, a single DICOM connection is used. `Sample code is 449 this case, a single DICOM connection is used. `Sample code is
447 available 450 available
448 <https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/Python/HighPerformanceAutoRouting.py>`__. 451 <https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/Python/HighPerformanceAutoRouting.py>`__.
452
453 Note that the list of resources to be sent can include the
454 :ref:`Orthanc identifiers <orthanc-ids>` of entire patients,
455 studies or series as well.
456
449 457
450 458
451 Performing Query/Retrieve and Find with REST 459 Performing Query/Retrieve and Find with REST
452 -------------------------------------------- 460 --------------------------------------------
453 461