Bug #951
openRefactor calcElementLength()
0%
Description
The current implementation of calcElementLength() is prone to integer overflow errors since the result is always returned as a 32 bit integer. It should be refactored to return size_t so that we can always finish the calculation correctly (since size_t is the type to allow access to all the available memory depending on the target platform, is should always be sufficient to calculate the length of an object in the executing machine's memory). Handling size limits (i.e. encoding the length as a 32 bit value when writing DICOM data) shall then be implemented at one single place in the code only (during write, not during length calculation).
Updated by Jörg Riesmeier almost 5 years ago
- Related to Feature #806: Maximum value returned by calcElementLength() is limited to 2^32-1 added
Updated by Jörg Riesmeier almost 5 years ago
- Due date set to 2018-11-27
- Start date changed from 2020-10-01 to 2018-11-27
- Follows Bug #857: Implementation and documentation of calcElementLength() are inconsistent added
Updated by Jörg Riesmeier almost 5 years ago
Originally, the term "Element Length" probably referred to "Value Length", which is a term from the DICOM standard (see PS3.5) and which is a 16-bit or 32-bit unsigned integer. It should be made clear (in the documentation?) what the differences are.
Also limiting the size of an item/sequence/dataset to 4.2 GB on 32-bit systems is not acceptable when dealing with large datasets (e.g. WSI).
Updated by Jörg Riesmeier almost 5 years ago
- Due date deleted (
2018-11-27) - Start date deleted (
2018-11-27)