:orphan:



.. _sphx_glr_auto_examples:

.. _general_examples:

General examples
----------------

Somewhere to start



.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This examples illustrates how to find the differences between two DICOM files.">

.. only:: html

 .. figure:: /auto_examples/images/thumb/sphx_glr_plot_dicom_difference_thumb.png
     :alt: Analyse differences between DICOM files

     :ref:`sphx_glr_auto_examples_plot_dicom_difference.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/plot_dicom_difference

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Very simple app to display unicode person names.">

.. only:: html

 .. figure:: /auto_examples/images/thumb/sphx_glr_show_charset_name_thumb.png
     :alt: Display unicode person names

     :ref:`sphx_glr_auto_examples_show_charset_name.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/show_charset_name

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Show how to write a DICOM dataset into a byte array and to read it back from a byte array. This...">

.. only:: html

 .. figure:: /auto_examples/images/thumb/sphx_glr_memory_dataset_thumb.png
     :alt: Show working with memory-based dataset

     :ref:`sphx_glr_auto_examples_memory_dataset.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/memory_dataset

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="sudo apt install tix-dev sudo pip install -U pydicom python3 dicomtree.py file.dcm Or in file b...">

.. only:: html

 .. figure:: /auto_examples/images/thumb/sphx_glr_dicomtree_thumb.png
     :alt: Show a dicom file using hierarchical tree

     :ref:`sphx_glr_auto_examples_dicomtree.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/dicomtree
.. raw:: html

    <div class="sphx-glr-clear"></div>



.. _sphx_glr_auto_examples_image_processing:

.. _image_processing_examples:

Image processing
----------------

These examples illustrate the image processing available in pydicom which can
be applied to DICOM images.



.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to downsize an MR image from 512  imes 512 to 64       imes 64. The down...">

.. only:: html

 .. figure:: /auto_examples/image_processing/images/thumb/sphx_glr_plot_downsize_image_thumb.png
     :alt: Downsize MRI image using pydicom

     :ref:`sphx_glr_auto_examples_image_processing_plot_downsize_image.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/image_processing/plot_downsize_image

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to plot waveforms from a Waveform Sequence using matplotlib.">

.. only:: html

 .. figure:: /auto_examples/image_processing/images/thumb/sphx_glr_plot_waveforms_thumb.png
     :alt: Decode and plot Waveform Data

     :ref:`sphx_glr_auto_examples_image_processing_plot_waveforms.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/image_processing/plot_waveforms

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates loading multiple files, sorting them by slice location, building a 3D ...">

.. only:: html

 .. figure:: /auto_examples/image_processing/images/thumb/sphx_glr_reslice_thumb.png
     :alt: Load CT slices and plot axial, sagittal and coronal images

     :ref:`sphx_glr_auto_examples_image_processing_reslice.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/image_processing/reslice
.. raw:: html

    <div class="sphx-glr-clear"></div>



.. _sphx_glr_auto_examples_input_output:

.. _input_ouput_examples:

Input-output
------------

These examples illustrate the use of pydicom to read DICOM data.



.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Given an RTPLAN DICOM file, list basic info for the beams in it.">

.. only:: html

 .. figure:: /auto_examples/input_output/images/thumb/sphx_glr_plot_read_rtplan_thumb.png
     :alt: Read RTPLAN DICOM and list information

     :ref:`sphx_glr_auto_examples_input_output_plot_read_rtplan.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/input_output/plot_read_rtplan

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to open a DICOM file, print some dataset information, and show it ...">

.. only:: html

 .. figure:: /auto_examples/input_output/images/thumb/sphx_glr_plot_read_dicom_thumb.png
     :alt: Read a Dataset and plot Pixel Data

     :ref:`sphx_glr_auto_examples_input_output_plot_read_dicom.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/input_output/plot_read_dicom

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to print the data set in your own format.">

.. only:: html

 .. figure:: /auto_examples/input_output/images/thumb/sphx_glr_plot_printing_dataset_thumb.png
     :alt: Format the output of the data set printing

     :ref:`sphx_glr_auto_examples_input_output_plot_printing_dataset.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/input_output/plot_printing_dataset

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to write a DICOM file from scratch using pydicom. This example does not ...">

.. only:: html

 .. figure:: /auto_examples/input_output/images/thumb/sphx_glr_plot_write_dicom_thumb.png
     :alt: Write DICOM data

     :ref:`sphx_glr_auto_examples_input_output_plot_write_dicom.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/input_output/plot_write_dicom

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to read a DICOM :File-set&#x27;s DICOMDIR dataset.">

.. only:: html

 .. figure:: /auto_examples/input_output/images/thumb/sphx_glr_plot_read_dicom_directory_thumb.png
     :alt: Read a DICOMDIR dataset

     :ref:`sphx_glr_auto_examples_input_output_plot_read_dicom_directory.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/input_output/plot_read_dicom_directory

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to read and interact with a DICOM File-set.">

.. only:: html

 .. figure:: /auto_examples/input_output/images/thumb/sphx_glr_plot_read_fileset_thumb.png
     :alt: Read a DICOM File-set

     :ref:`sphx_glr_auto_examples_input_output_plot_read_fileset.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/input_output/plot_read_fileset
.. raw:: html

    <div class="sphx-glr-clear"></div>



.. _sphx_glr_auto_examples_metadata_processing:

.. _metadata_processing_examples:

Metadata processing
-------------------

These examples illustrates the processing available in pydicom to modify the
metadata of DICOM data.



.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This examples illustrates how to add dictionary items to the &#x27;standard&#x27; DICOM dictionary dynami...">

.. only:: html

 .. figure:: /auto_examples/metadata_processing/images/thumb/sphx_glr_plot_add_dict_entries_thumb.png
     :alt: Add dictionary items in the standard DICOM dictionary

     :ref:`sphx_glr_auto_examples_metadata_processing_plot_add_dict_entries.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/metadata_processing/plot_add_dict_entries

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This examples illustrates how to work with sequences.">

.. only:: html

 .. figure:: /auto_examples/metadata_processing/images/thumb/sphx_glr_plot_sequences_thumb.png
     :alt: Working with sequences

     :ref:`sphx_glr_auto_examples_metadata_processing_plot_sequences.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/metadata_processing/plot_sequences

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example is a starting point to anonymize DICOM data.">

.. only:: html

 .. figure:: /auto_examples/metadata_processing/images/thumb/sphx_glr_plot_anonymize_thumb.png
     :alt: Anonymize DICOM data

     :ref:`sphx_glr_auto_examples_metadata_processing_plot_anonymize.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/metadata_processing/plot_anonymize
.. raw:: html

    <div class="sphx-glr-clear"></div>



.. only :: html

 .. container:: sphx-glr-footer
    :class: sphx-glr-footer-gallery


  .. container:: sphx-glr-download sphx-glr-download-python

    :download:`Download all examples in Python source code: auto_examples_python.zip </auto_examples/auto_examples_python.zip>`



  .. container:: sphx-glr-download sphx-glr-download-jupyter

    :download:`Download all examples in Jupyter notebooks: auto_examples_jupyter.zip </auto_examples/auto_examples_jupyter.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
