Package Details: python-pydicom 2.4.4-2

Git Clone URL: https://aur.archlinux.org/python-pydicom.git (read-only, click to copy)
Package Base: python-pydicom
Description: Pure python package for working with DICOM files
Upstream URL: https://pydicom.github.io/pydicom/stable/index.html
Licenses: MIT, LicenseRef-GDCM
Submitter: wedjat
Maintainer: bertptrs
Last Packager: bertptrs
Votes: 11
Popularity: 0.000000
First Submitted: 2018-03-10 18:20 (UTC)
Last Updated: 2024-03-28 20:42 (UTC)

Dependencies (12)

Sources (2)

Latest Comments

liamtimms commented on 2019-12-16 16:27 (UTC) (edited on 2019-12-16 16:29 (UTC) by liamtimms)

@bertptrs thanks for explaining, I had assumed that the makedepends could be split between the python2 and python3 versions such that only the python2 version would pull any python2 dependencies. This is the first split package I've used.

bertptrs commented on 2019-12-15 21:04 (UTC)

@liamtimms this pkgbase is used to build both the python 3 and python 2 version of this package. You don't need to have any python 2 packages installed to use the python 3 version, but both packages are needed for building. This is just how split packages work.

I intend to support python 2 for this package as long as upstream does so, which appears to be until April 2020: https://pydicom.github.io/pydicom/stable/python2_support.html

liamtimms commented on 2019-12-13 17:31 (UTC) (edited on 2019-12-13 17:32 (UTC) by liamtimms)

Do you need the python2-setuptools dependency in this PKGBUILD?

Makes sense for python2-pydicom but is strange to keep here in the python3 version.

bertptrs commented on 2018-09-05 14:22 (UTC)

flipmess, I can't reproduce your error, but there are some incompatibilities with Python 3.7 in the unit tests and will be fixed in future versions. I've disabled tests which I know to be problematic but apparantly there are others.

You can skip the "check" phase of the build by adding the "--nocheck" flag to makepkg, by changing your makepkg config, or by using whatever your AUR helper offers for this.

flipmess commented on 2018-09-05 13:59 (UTC) (edited on 2018-09-05 14:00 (UTC) by flipmess)

hi, i get this error while compiling: ===================================================================================================== FAILURES ===================================================================================================== ______________ TestCodify.test_code_file _______________

tag = (3030, 3030)

def get_entry(tag):
    """Return the tuple (VR, VM, name, is_retired, keyword)
    from the DICOM dictionary

    If the entry is not in the main dictionary,
    check the masked ones, e.g. repeating groups like 50xx, etc.
    """
    # Note: tried the lookup with 'if tag in DicomDictionary'
    # and with DicomDictionary.get, instead of try/except
    # Try/except was fastest using timeit if tag is valid (usual case)
    # My test had 5.2 usec vs 8.2 for 'contains' test, vs 5.32 for dict.get
    if not isinstance(tag, BaseTag):
        tag = Tag(tag)
    try:
      return DicomDictionary[tag]

E KeyError: (3030, 3030)

pydicom/datadict.py:136: KeyError

During handling of the above exception, another exception occurred:

raw_data_element = RawDataElement(tag=(3030, 3030), VR=None, length=807418400, value=b'0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n..... 55 4e 41 50 50 52 4f 56 45 44 ......UNAPPROVED\n0a70 : \n', value_tell=8, is_implicit_VR=True, is_little_endian=True) encoding = 'iso8859'

def DataElement_from_raw(raw_data_element, encoding=None):
    """Return a DataElement created from the data in `raw_data_element`.

    Parameters
    ----------
    raw_data_element : RawDataElement namedtuple
        The raw data to convert to a DataElement
    encoding : str
        The encoding of the raw data

    Returns
    -------
    pydicom.dataelem.DataElement
    """
    # XXX buried here to avoid circular import
    # filereader->Dataset->convert_value->filereader
    # (for SQ parsing)

    if in_py2:
        encoding = encoding or default_encoding
    from pydicom.values import convert_value
    raw = raw_data_element

    # If user has hooked into conversion of raw values, call his/her routine
    if config.data_element_callback:
        data_elem = config.data_element_callback
        raw = data_elem(raw_data_element,
                        **config.data_element_callback_kwargs)
    VR = raw.VR
    if VR is None:  # Can be if was implicit VR
        try:
          VR = dictionary_VR(raw.tag)

pydicom/dataelem.py:475:


tag = (3030, 3030)

def dictionary_VR(tag):
    """Return the dicom value representation
       for the given dicom tag."""
  return get_entry(tag)[0]

pydicom/datadict.py:156:


tag = (3030, 3030)

def get_entry(tag):
    """Return the tuple (VR, VM, name, is_retired, keyword)
    from the DICOM dictionary

    If the entry is not in the main dictionary,
    check the masked ones, e.g. repeating groups like 50xx, etc.
    """
    # Note: tried the lookup with 'if tag in DicomDictionary'
    # and with DicomDictionary.get, instead of try/except
    # Try/except was fastest using timeit if tag is valid (usual case)
    # My test had 5.2 usec vs 8.2 for 'contains' test, vs 5.32 for dict.get
    if not isinstance(tag, BaseTag):
        tag = Tag(tag)
    try:
        return DicomDictionary[tag]
    except KeyError:
        mask_x = mask_match(tag)
        if mask_x:
            return RepeatersDictionary[mask_x]
        else:
          raise KeyError("Tag {0} not found in DICOM dictionary".format(tag))

E KeyError: 'Tag (3030, 3030) not found in DICOM dictionary'

pydicom/datadict.py:142: KeyError

During handling of the above exception, another exception occurred:

self = <pydicom.tests.test_util.testcodify 0x7fd221ab2898="" at="" object="">, capsys = <_pytest.capture.CaptureFixture object at 0x7fd221ab2c50></pydicom.tests.test_util.testcodify>

def test_code_file(self, capsys):
    """Test utils.codify.code_file"""
    filename = get_testdata_files("rtplan")[0]
    args = ["--save-as", r"c:\temp\testout.dcm", filename]
  codify_main(100, args)

pydicom/tests/test_util.py:139:


pydicom/util/codify.py:349: in main code_lines = code_file(filename, args.exclude_size, args.include_private) pydicom/util/codify.py:276: in code_file ds, exclude_size=exclude_size, include_private=include_private) pydicom/util/codify.py:223: in code_dataset for dataelem in ds: pydicom/dataset.py:703: in iter yield self[tag] pydicom/dataset.py:599: in getitem self[tag] = DataElement_from_raw(data_elem, character_set)


raw_data_element = RawDataElement(tag=(3030, 3030), VR=None, length=807418400, value=b'0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n..... 55 4e 41 50 50 52 4f 56 45 44 ......UNAPPROVED\n0a70 : \n', value_tell=8, is_implicit_VR=True, is_little_endian=True) encoding = 'iso8859'

def DataElement_from_raw(raw_data_element, encoding=None):
    """Return a DataElement created from the data in `raw_data_element`.

    Parameters
    ----------
    raw_data_element : RawDataElement namedtuple
        The raw data to convert to a DataElement
    encoding : str
        The encoding of the raw data

    Returns
    -------
    pydicom.dataelem.DataElement
    """
    # XXX buried here to avoid circular import
    # filereader->Dataset->convert_value->filereader
    # (for SQ parsing)

    if in_py2:
        encoding = encoding or default_encoding
    from pydicom.values import convert_value
    raw = raw_data_element

    # If user has hooked into conversion of raw values, call his/her routine
    if config.data_element_callback:
        data_elem = config.data_element_callback
        raw = data_elem(raw_data_element,
                        **config.data_element_callback_kwargs)
    VR = raw.VR
    if VR is None:  # Can be if was implicit VR
        try:
            VR = dictionary_VR(raw.tag)
        except KeyError:
            # just read the bytes, no way to know what they mean
            if raw.tag.is_private:
                # for VR for private tags see PS3.5, 6.2.2
                if raw.tag.is_private_creator:
                    VR = 'LO'
                else:
                    VR = 'UN'

            # group length tag implied in versions < 3.0
            elif raw.tag.element == 0:
                VR = 'UL'
            else:
                msg = "Unknown DICOM tag {0:s}".format(str(raw.tag))
                msg += " can't look up VR"
              raise KeyError(msg)

E KeyError: "Unknown DICOM tag (3030, 3030) can't look up VR"

pydicom/dataelem.py:491: KeyError ==================================================================== 1 failed, 660 passed, 49 skipped, 2 deselected, 2 xpassed in 7.22 seconds ===================================================================== ==> ERROR: A failure occurred in check(). Aborting...

bertptrs commented on 2018-07-23 09:36 (UTC)

@hottea I have a working PKGBUILD for that, but I'm still waiting on the python2 version to be orphaned. Stay tunned.

hottea commented on 2018-07-23 03:18 (UTC)

Hi, could add python2 version too?