LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Intensity graph save as tiff with z value

Solved!
Go to solution

Almost there!

 

The way you have your data now, the data is scaled between 0-1. Guess that is good, but you might check the tiff save documentation. Could also be 0-255.

 

The color scale is not good. You divide the integer by 255. That results in a double 0-1. That double is cast to an integer (0 or 1, not 0-1!). Notice the red coercion dot.

 

You should: split the integer in RGB (3 U8's 0-255), and cluster them (3 U8's 0-255), and divide those values by 255 (3 doubles 0-1).

 

 

0 Kudos
Message 11 of 14
(1,248 Views)

Hi,

Really appreciate the help. I made changes per your suggestion, but I'm still getting the same result. 

The tiff help said the color palette range is 0 - 255 (I also divided both data and color table by 255, just in case as you suggested but still the same result. It returns all black image). What I'm trying to do is save the intensity graph with altered z max/min scales. Like in the screenshot, I scaled z values to 20 - 40 (default is 0-255). Adjusting these values give better contrast of the image. I'd like to save the image with this modified contrast (z max/min). 

Thank you for the help again and happy holiday.

 

intensity_as_tiff_4.PNG

 

 

0 Kudos
Message 12 of 14
(1,244 Views)
Solution
Accepted by topic author dk91

Ah. You store the floats in a grayscale image! That detail escaped by attention.

 

So the 2D array of doubles needs to be converted to an array of U8's. You now have an array of 0-1's, so you need to multiply that by 255. I think that would at least get you some result in the tiff.

 

The tiff color scale seems right. If 20 is black, 40 is white, in the tiff this would mean 0 is black and 255 is white. As it is after the 255 factor.

 

I'm not sure if saving the tiff will actually set the color scale of the image (I'd guess it won't). So the tiff might be correct, while the IMAQ image is not. There's probably a property not of that IMAQ image to set the color scale. So there are three color scales: the intensity graph, the tiff and the IMAQ image (the good, the bad and the uglySmiley LOL).

0 Kudos
Message 13 of 14
(1,240 Views)

Thank you for the help. I resolved the issue by scaling input data into z scale's min/max. I left the color palette as default.

0 Kudos
Message 14 of 14
(1,228 Views)