01-25-2012 03:28 PM
I am trying to save array of SGL values with IMAQ write tiff file 2 in LV2009 and am receiving an error 1074396080. Program works fine when I convert the SGL values (decimal values 0 to 1) to U16 values (multiply array values by 65535) and save as U16, however I would rather save them as the real SGL values. They can be written in the Image array as SGL values but not saved as tiffs that way it seems. How can that be done? Thanks.
Solved! Go to Solution.
01-25-2012 08:16 PM
The tiff file format can only handle integer values for each pixel. I don't know if any of the file formats handle SGL values. I think the only solution is to convert the values to U16 and save them, like you described.
Bruce
01-25-2012 08:45 PM
Thanks Bruce! I just stumbled upon this post: http://forums.ni.com/t5/Machine-Vision/how-to-save-grayscale-image/td-p/728367 (go to the bottom) that describes saving the image as a proprietary 32 bit AIPD file with IMAQ write file.However, I can't save directly as a TIFF as you pointed out. If ImageJ can open them or there is a plugin to do so, I should be good. I really appreciate the reply.
01-26-2012 02:43 AM
@jjsword wrote:
If ImageJ can open them or there is a plugin to do so, I should be good. I really appreciate the reply.
The easiest way for you to use AIPD format (which in the fact is RAW image with 512 byte header itself), or in pure RAW format.
For example, you can write and then read SGL images in LabVIEW in following ways:
Now you can open these images in ImageJ by choosing File->Import->from RAW...:
For AIPD you have to set then:
For RAW binary file:
Little Endian byte order and header offset depends from options which was used for Write to Binary File primitive.
As result:
Hopу it helps,
Andrey.
01-26-2012 02:08 PM
Andrey, that worked perfectly! I stuck with the AIPD format and ImageJ opened it without a hitch. Thanks!