[MINC-development] Unexpected value scaling with miget_real_value_hyperslab

Rick Hoge rick.hoge at linev.ca
Fri Jan 7 23:37:37 EST 2011


On 2011-01-07, at 9:33 PM, Rick Hoge wrote:

> I get the series as expected, however the unsigned shorts in the buffer appear to have been scaled so that the minimum and maximum values correspond respectively to 0 and USHRT_MAX.  I know the values in the file should be within the range 0 to 4095 since it comes from 12-bit DICOM - this is in fact the 'valid range' reported for the MINC2 file by mincinfo.  The true range of data values in my example file is actually 0 to 1006.

I've been exploring the ICV functions some more, but honestly I couldn't find *any* way to recover the original maximum data value (1006 in my example) from the MINC2 file I generated using dcm2mnc in the reference at

http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Application_Programmers_Interface

Finally I found the function miget_volume_real_range(), which does return the actual min and max values.  However this is not really documented anywhere...

Playing around with ICV's the only other thing I've been able to do is to get the data values mapped into the 12-bit range 0 to 4095, which is still not the actual data range.

I realize that in some cases there can be an advantage to using the whole dynamic range of a given data type, but surely there is a way to preserve the original values?

Thanks again,

Rick



More information about the MINC-development mailing list