Hi there!
DicomImageClass::rangeToBits uses tobits from diutils.h to calculate the number of bits necessary for a specific value.
Is the adding of 1 to the result of tobits intended? Because this leads to a higher number of bits than I expect. Or am I just misinterpreting the functionality of this method?
Example:
parameters of rangeToBits:
minvalue = -1024, maxvalue = 64511
parameter tb_value of tobits = 64511 -> tobits returns 16, rangeToBits returns 17
I encounterd this using the following:
DiMonoImage::getMonoInterData()->getBits();
kind regards
christian
DicomImageClass::rangeToBits adds 1 (DCMTK 3.5.4)
Moderator: Moderator Team
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
rangeToBits() returns the number of bits that are required to store values in the given range. In order to store values in the range between -1024 and 64511 you need 17 bits (assuming "symmetry" of the negative and positive axis). In fact, 17 bits allow you to store values in the range -65536 to 65535, but 16 bit would be limited to -32768 to 32767.
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Who is online
Users browsing this forum: Baidu [Spider] and 1 guest