Mercurial > hg > orthanc-book
diff Sphinx/source/plugins/python.rst @ 1046:63edb430f259
mosaic
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 26 Mar 2024 09:50:04 +0100 |
parents | fe9c92d81082 |
children | c80cc6eaad99 |
line wrap: on
line diff
--- a/Sphinx/source/plugins/python.rst Mon Mar 25 18:33:57 2024 +0100 +++ b/Sphinx/source/plugins/python.rst Tue Mar 26 09:50:04 2024 +0100 @@ -397,6 +397,8 @@ :language: python +.. _python-pil-thumbnail: + Rendering a thumbnail using PIL/Pillow ...................................... @@ -899,6 +901,25 @@ the :ref:`Orthanc Explorer 2 <orthanc-explorer-2>` interface. +.. _python_mosaic: + +Generating a mosaic for a DICOM series +...................................... + +Thanks to the fact that Python plugins have access to :ref:`PIL/Pillow +<python-pil-thumbnail>`, it is quite easy to generate a mosaic from a +DICOM series: + +.. image:: python/mosaic.png + :align: center + :width: 512 + +Here is the source code: + +.. literalinclude:: python/mosaic.py + :language: python + + Performance and concurrency ---------------------------