./biology/py-pydicom, Pure python package for working with DICOM files

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]

Branch: CURRENT, Version: 2.4.3, Package name: py311-pydicom-2.4.3, Maintainer: eborisch

Pydicom is a pure Python package for working with DICOM files such as medical
images, reports, and radiotherapy objects.

Pydicom makes it easy to read these complex files into natural pythonic
structures for easy manipulation. Modified datasets can be written again to
DICOM format files.

Required to run:
[devel/py-setuptools] [lang/python37]

Required to build:

Master sites:

Filesize: 1969.147 KB

Version history: (Expand)

CVS history: (Expand)

   2023-09-06 22:07:45 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-pydicom: updated to 2.4.3

Version 2.4.3


* Fixed pydicom codify error when relative path did not exist

Version 2.4.0

* Removed support for Python 3.6 (EOL since December 2021)

* Added attribute :attr:`~pydicom.valuerep.PersonName.alphabetic` (:pr:`1634`)
* Added attribute :attr:`~pydicom.tag.BaseTag.json_key` (:pr:`1648`)
* Added value validation for numerical VRs, add type validation for all
  validated VRs (:issue:`1414`)
* CLI commands now accept *pydicom* charset test files and CLI help shows
  Python Version (:pr:`1674`)
* Added support for Python 3.11 (:issue:`1658`)
* Added :class:`~pydicom.valuerep.ISfloat` to allow non-strict reading of
  existing files with float IS values (:issue:`1661`)
* Improved speed of creating and accessing highly nested structures
  (:issue:`1728`, :pr:`1734`)
* Switched to a pyproject.toml build process (:pr:`1792`)
* Updated DICOM and UID dicts to DICOM 2023b (:pr:`1803`)

* Fixed length validation of DS values with maximum length without a leading
  zero (:issue:`1632`)
* Increased download speed with progress bar for test data (:issue:`1611`)
* Fixed crash due to invalid private creator (:issue:`1638`)
* Fixed extremely long BytesLengthException error messages (:pr:`1683`)
* In codify, ensure unique variable names for DICOM keywords repeated
  in sequences, and handle unicode characters correctly (:issue:`1670`)
* Fixed handling of some invalid values in
  :meth:`~pydicom.dataset.Dataset.to_json_dict` if `suppress_invalid_tags` is
  set to `True` (:issue:`1693`)
* Fixed reading of data with 8 bits allocated, encoded in Big Endian transfer
  syntax using VR ``OW`` (:issue:`1680`)
* Fixed crash if reading regular dataset that has the SOP Class of a DICOMDIR
* Fixed wrong waveform data calculation when as_raw=False and baseline!=0 \ 
* Fixed reading LUTData to expected size (:pr:`1747`)
* Fixed handling of AT VRs when codifying data elements (:issue:`1738`)

Pydicom Internals
* In test suites, renamed 'setup' and 'teardown' methods, deprecated starting
  in pytest 7.2
* Use own fork of `CharPyLS` to handle builds with Python 3.11 (:issue:`1788`)
   2022-11-15 11:15:54 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-pydicom: updated to 2.3.1

pydicom 2.3.1
Small fix to make 2.3.X compatible with Python 3.11.
   2022-11-08 12:51:41 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-pydicom: updated to 2.3.0

Version 2.3.0

* :meth:`DataElement.description<pydicom.dataelem.DataElement.description>` is
  deprecated and will be removed in v3.0, use
  :attr:`DataElement.name<pydicom.dataelem.DataElement.name>` instead
* Updated the private dictionary
* :attr:`~pydicom.config.enforce_valid_values` is deprecated in favor of
* Added `download` parameter to :func:`~pydicom.data.get_testdata_file`
  to allow skipping downloading the file if missed locally (:pr:`1617`)

* Values are now validated for valid length, allowed character set and format
  on reading and writing. Depending on the value of
  and :attr:`~pydicom.config.settings.writing_validation_mode`
  a warning is logged, an exception is raised, or the validation is skipped.
* Added :class:`~pydicom.valuerep.VR` enum (:pr:`1500`)
* UIDs for all Storage SOP Classes have been added to the ``uid`` module
* Use rle_handler as last resort handler for decoding RLE encoded data as it is
  the slowest handler (:issue:`1487`)
* Added, enhanced, or removed a number of Mitra private dictionary entries \ 
* Added support for unpacking bit-packed data without using NumPy to
* Added :func:`~pydicom.pixel_data_handlers.util.expand_ybr422` for expanding
  uncompressed ``YBR_FULL_422`` data to ``YBR_FULL`` (:pr:`1593`)
* Replacement of ``UN`` VR with ``SQ`` VR for undefined length data elements
  (introduced in 2.2.2), can now be configured via
* Updated dictionaries to DICOM 2022a

* Fixed odd-length **OB** values not being padded during write (:issue:`1511`)
* Fixed Hologic private dictionary entry (0019xx43)
* Fixed Mitra global patient ID private dictionary entry (:pr:`1588`)
* Fixed :meth:`~pydicom.dataset.Dataset.compress` not setting the correct
  encoding for the rest of the dataset (:issue:`1565`)
* Fixed `AttributeError` on deep copy of :class:`~pydicom.dataset.FileDataset`
* Fixed an exception during pixel decoding if using GDCM < 2.8.8 on Windows
* Fixed crashes on Windows and MacOS when using the GDCM plugin to compress
  into *RLE Lossless* (:issue:`1581`)
* Fixed ``dir(Dataset())`` not returning class attributes (:issue:`1599`)
* Fixed bad DICOMDIR offsets when using :meth:`FileSet.write()
  <pydicom.fileset.FileSet.write>` with a *Directory Record Sequence* using
  undefined length items (:issue:`1596`)
* Assigning a list of length one as tag value is now correctly handled as
  assigning the single value (:issue:`1606`)
* Fixed an exception with multiple deferred reads with file-like objects
   2022-01-05 16:41:32 by Thomas Klausner | Files touched by this commit (289)
Log message:
python: egg.mk: add USE_PKG_RESOURCES flag

This flag should be set for packages that import pkg_resources
and thus need setuptools after the build step.

Set this flag for packages that need it and bump PKGREVISION.
   2022-01-04 21:55:40 by Thomas Klausner | Files touched by this commit (1595)
Log message:
*: bump PKGREVISION for egg.mk users

They now have a tool dependency on py-setuptools instead of a DEPENDS
   2021-10-26 12:03:45 by Nia Alarie | Files touched by this commit (73)
Log message:
biology: Replace RMD160 checksums with BLAKE2s checksums

All checksums have been double-checked against existing RMD160 and
SHA512 hashes
   2021-10-07 15:19:44 by Nia Alarie | Files touched by this commit (73)
Log message:
biology: Remove SHA1 hashes for distfiles
   2021-10-04 10:54:01 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-pydicom: updated to 2.2.2

Version 2.2.0

* Data elements with a VR of **AT** must now be set with values
  acceptable to :func:`~pydicom.tag.Tag`, and are always stored as a
  :class:`~pydicom.tag.BaseTag`.  Previously, any Python type could be
* :meth:`BaseTag.__eq__()<pydicom.tag.BaseTag.__eq__>` returns ``False`` rather
  than raising an exception when the operand cannot be converted to
  :class:`~pydicom.tag.BaseTag` (:pr:`1327`)
* :meth:`DA.__str__()<pydicom.valuerep.DA.__str__>`,
  :meth:`DT.__str__()<pydicom.valuerep.DT.__str__>` and
  :meth:`TM.__str__()<pydicom.valuerep.TM.__str__>` return valid DICOM
  strings instead of the formatted date and time representations
* If comparing :class:`~pydicom.dataset.FileDataset` instances, the file
  metadata is now ignored. This makes it possible to compare a
  :class:`~pydicom.dataset.FileDataset` object with a
  :class:`~pydicom.dataset.Dataset` object.
* :func:`~pydicom.pixel_data_handlers.rle_handler.rle_encode_frame` is
  deprecated and will be removed in v3.0, use
  :meth:`~pydicom.dataset.Dataset.compress` or
  :attr:`~pydicom.encoders.RLELosslessEncoder` instead.
* :func:`~pydicom.filereader.read_file` is deprecated and will be removed in
  v3.0, use :func:`~pydicom.filereader.dcmread` instead.
* :func:`~pydicom.filewriter.write_file` is deprecated and will be removed in
  v3.0, use :func:`~pydicom.filewriter.dcmwrite` instead.
* Data dictionaries updated to version 2021b of the DICOM Standard
* :class:`~pydicom.dataset.Dataset` no longer inherits from :class:`dict`

* Added a command-line interface for pydicom.  Current subcommands are:

    * ``show``: display all or part of a DICOM file
    * ``codify`` to produce Python code for writing files or sequence items
      from scratch.

  Please see the :ref:`cli_guide` for examples and details
  of all the options for each command.
* A field containing an invalid number of bytes will result in a warning
  instead of an exception when
  :attr:`~pydicom.config.convert_wrong_length_to_UN` is set to ``True``.
* Private tags known via the private dictionary will now get the configured
  VR if read from a dataset instead of **UN** (:issue:`1051`).
* While reading explicit VR, a switch to implicit VR will be silently attempted
  if the VR bytes are not valid VR characters, and config option
  :attr:`~pydicom.config.assume_implicit_vr_switch` is ``True`` (default)
* New functionality to help with correct formatting of decimal strings (**DS**)

    * Added :func:`~pydicom.valuerep.is_valid_ds` to check whether a string is
      valid as a DICOM decimal string and
      :func:`~pydicom.valuerep.format_number_as_ds` to format a given ``float``
      or ``Decimal`` as a DS while retaining the highest possible level of
    * If :attr:`~pydicom.config.enforce_valid_values` is set to ``True``, all
      **DS** objects created will be checked for the validity of their string
    * Added optional ``auto_format`` parameter to the init methods of
      :class:`~pydicom.valuerep.DSfloat` and
      :class:`~pydicom.valuerep.DSdecimal` and the :func:`~pydicom.valuerep.DS`
      factory function to allow explicitly requesting automatic formatting of
      the string representations of these objects when they are constructed.
* Added methods to construct :class:`~pydicom.valuerep.PersonName` objects
  from individual components of names (``family_name``, ``given_name``, etc.).
  See :meth:`~pydicom.valuerep.PersonName.from_named_components` and
* Added support for downloading the large test files with the `requests
  <https://docs.python-requests.org/en/master/>`_ package in addition to
  :mod:`urllib.request` (:pr:`1340`)
* Ensured :func:`~pydicom.pixel_data_handlers.util.convert_color_space` uses
  32-bit floats for calculation, added `per_frame` flag to allow frame-by-frame
  processing and improved the speed by ~20-60% (:issue:`1348`)
* Optimisations for RLE encoding using *pydicom* (~40% faster).
* Added support for faster decoding (~4-5x) and encoding (~20x) of *RLE Lossless*
  *Pixel Data* via the `pylibjpeg-rle
  <https://github.com/pydicom/pylibjpeg-rle>`_ plugin (:pr:`1361`, :pr:`1372`).
* Added :func:`Dataset.compress()<pydicom.dataset.Dataset.compress>` \ 
function for
  compressing uncompressed pixel data using a given encoding format as specified
  by a UID. Only *RLE Lossless* is currently supported (:pr:`1372`)
* Added :mod:`~pydicom.encoders` module and the following encoders:

  * :attr:`~pydicom.encoders.RLELosslessEncoder` with 'pydicom', 'pylibjpeg'
    and 'gdcm' plugins
* Added `read` parameter to :func:`~pydicom.data.get_testdata_file`
  to allow reading and returning the corresponding dataset (:pr:`1372`)
* Handle decoded RLE segments with padding (:issue:`1438`)
* Add option to JSON functions to suppress exception and continue (:pr:`1332`)
* Allow searching :class:`~pydicom.fileset.FileSet` s for a list of elements \ 
* Added hash function to SR :class:`~pydicom.sr.Code` (:pr:`1434`)

* Fixed pickling a :class:`~pydicom.dataset.Dataset` instance with sequences
  after the sequence had been read (:issue:`1278`)
* Fixed JSON export of numeric values
* Fixed handling of sequences of unknown length that switch to implicit
  encoding, and sequences with VR **UN** (:issue:`1312`)
* Do not load external data sources until needed - fixes problems with
  standard workflow if `setuptools` are not installed (:issue:`1341`)
* Fixed empty **PN** elements read from file being :class:`str` rather than
  :class:`~pydicom.valuerep.PersonName` (:issue:`1338`)
* Fixed handling of JPEG (10918-1) images compressed using RGB colourspace
  rather than YBR with the Pillow pixel data handler (:pr:`878`)
* Allow to deepcopy a `~pydicom.dataset.FileDataset` object (:issue:`1147`)
* Fixed elements with a VR of **OL**, **OD** and **OV** not being set correctly
  when an encoded backslash was part of the element value (:issue:`1412`)
* Fixed expansion of linear segments with floating point steps in
  segmented LUTs (:issue:`1415`)
* Fixed handling of code extensions with person name component delimiter
* Fixed bug decoding RBG jpg with APP14 marker due to change in Pillow (:pr:`1444`)
* Fixed decoding for `FloatPixelData` and `DoubleFloatPixelData` via
  `pydicom.pixel_data_handlers.numpy_handler` (:issue:`1457`)