Normalization of TIFF images
BMoeyaert
When I save a 2D wave as TIFF, even with the /U flag, the TIFF file seems to be normalized to maximize bit depth.
In the example below, the first print statement returns 16129, which is indeed 127*127. The second print statement, however, returns 65534. Opening the test_out.tif in something like ImageJ also gives me 65534 as the value for the [127][127] pixel, so it seems like the /U flag in the ImageSave command doesn't seem to do anything?
Or am I missing something?
Make /N=(128,128)/D test
test = p*q
print test[127][127]
ImageSave/T="tiff"/U/DS=16/O test as "test_out"
ImageLoad/T=tiff/Q/N=test_out/G "SOMEPATH:test_out.tif"
print test_out[127][127]
test = p*q
print test[127][127]
ImageSave/T="tiff"/U/DS=16/O test as "test_out"
ImageLoad/T=tiff/Q/N=test_out/G "SOMEPATH:test_out.tif"
print test_out[127][127]
Thanks!
B
Forum
Support
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More
/U/DS=16
seem to collide. Not sure if this is supposed to be like this.
/U/DS=32 or just /DS=32
both work. Note that the manual states: "When using 32 or 64 bits/sample, srcWave is saved without normalization"
November 20, 2019 at 09:36 am - Permalink
Ideally you would mention the version of Igor where you encountered a problem.
The /U flag is fixed for the next nightly build of IP8.
A.G.
November 20, 2019 at 02:34 pm - Permalink
Thanks ChrLie and A.G.
Using Igor 8.03, will update to newest version today and use /DS=32 for this project.
B
November 21, 2019 at 01:11 am - Permalink