ImagingDataCommons / libdicom

C library for reading DICOM files
https://libdicom.readthedocs.io
MIT License
16 stars 7 forks source link

Use of `size_t`/`ssize_t` in `dicom.h` #21

Closed bgilbert closed 11 months ago

bgilbert commented 1 year ago

contributing.rst says:

To facilitate portability, the dicom.h header file is restricted to

  • C99 version of the standard (C89 + Boolean type from stdbool.h + fixed-width integer types from stdint.h/inttypes.h)
  • Clear, exact-width integer types (int16_t, int32_t, int64_t, uint16_t, uint32_t, and uint64_t)

But in fact, dicom.h includes several references to size_t and ssize_t.

hackermd commented 1 year ago

Good point @bgilbert! We should probably use uint64_t for the frame offsets.

The basic offset table is limited to 32-bit unsigned integer values, but we may want to allow the DcmBOT type to hold values of the Extended Offset Table attribute, which has Value Representation OV. See CP 1818 for context.