LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Overlaying intensity graphs to create a picture

I have a 16x256x256 3-dimensional array of intensity images which represent 16 different 256x256 intensity graphs.  Each page of the stack represents a single wavelength on the visible spectrum.  Is it possible to create a full 16-color picture by overlaying the intensity graphs together?  If so, how would I go about doing that?  I have attached the 3-d stack of data.
 
Thanks!
-Anthony
0 Kudos
Message 1 of 11
(4,333 Views)
Hi Anthony,
i can´t open your vi at the moment. Which values do you have in the array (in which range are they)? Are it only 0 or 1? If yes, then you can build a 16bit number of every pixel (256*256), so you get an array of 256*256 of 16bit values.

Mike
0 Kudos
Message 2 of 11
(4,310 Views)

AntLee29 a écrit:
I have a 16x256x256 3-dimensional array of intensity images which represent 16 different 256x256 intensity graphs. Each page of the stack represents a single wavelength on the visible spectrum. Is it possible to create a full 16-color picture by overlaying the intensity graphs together? If so, how would I go about doing that? I have attached the 3-d stack of data.



Since a color image is made with only 3 colors (RGB), you need a way to re-code your data. The 16 wavelengths (WL) could be considered as belonging to the visible spectrum, between 400 and 800 nm, and a simple way to convert the WL as RGB would be to use Dan Burton's linear approximation, as described here. Alternatively, you could define you own arbitrary colors...
Attached is an example result using D Burton color coding.



Message Edité par chilly charly le 08-02-2008 02:48 PM
Chilly Charly    (aka CC)
Download All
Message 3 of 11
(4,291 Views)

*He's the Graphing Wizard, there has to be trick,

He's the Graphing Wizard, he's got such a supple wrist

How do you think he does it? I don't know

What maeks him so good?

....

I pass my graphing crown to him, to him!

Ben

* To be read with the rock-opera "Tommy" by the Who playing in the background.

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 11
(4,281 Views)
🙂

Thanks Ben !
Chilly Charly    (aka CC)
Message 5 of 11
(4,265 Views)
Hi everyone, and thanks for the detailed help chilly!  It looks like that's almost what I need.

Now I actually have the exact wavelength numbers in nanometers for each page of the stack so I plan on simply entering them all as a constant.  I'm trying to figure out how your vi works, but I'm confused as to what the equalizer is supposed to be.  At first I thought they were the corresponding RGB values for wavelengths distributed evenly across the visible spectrum, but then I also noticed a Color table constant in the subvi which seems more like the actual RGB values.  I'm guessing the color table for each page in the stack is simply ramped up from black to the corresponding color at max intensity?

It looks like I can use the Wavelength to RGB.vi to create the RGB values for the corresponding wavelengths, but where do I go from there and what should I do with the equalizer?  Thanks!


P.S.  The picture is upside-down compared to the intensity graph.  Is that because the intensity graph/picture formats are mapped differently?


Message Edited by AntLee29 on 08-03-2008 01:50 AM
0 Kudos
Message 6 of 11
(4,244 Views)
Hi AntLee

I'm sure you should be able to figure out the purpose of the "equalizer", just by playing a while with it ! There is one slider for each wavelength, yielding a value in the range 0.01 to 100 (log scale)...
The color table constant is a lookup table where each wavelength index has been mapped to an RGB value according to Dan Burton's algorithm (that gives a much better looking color spectrum than other methods). The vi to create the table is included, and you can easily modify it to create your own table.
The image is upside down due to the way the picture control handles the XY coordinates. This should not be a problem for you since your image as no absolute origin. You could even consider that the intensity graph is upside down and just reverse its Y axis 😉 😄
By the way, what is the actual object ? And what spectrometer are you using ?

Message Edité par chilly charly le 08-03-2008 09:55 AM
Chilly Charly    (aka CC)
0 Kudos
Message 7 of 11
(4,236 Views)
Ahh you caught me in the middle of editing my post. Smiley Tongue

Correct me if I'm wrong, but it looks like the equalizer lets you bias the color table on each wavelength to make it stand out more.  That means I should keep them all at the same level to get the normal distribution?

I've got the rest of the vis understood now. Smiley Very Happy  I suppose I'll need to manually figure out an RGB value for wavelengths under 380, as the first 2 pages in the stack correspond to 359nm and 378nm.

You're looking at endothelial cells in a fixed collagen matrix.  We used a laser to image the sample and a prism to spread the fluorescence across a 16-channel photomultiplier tube, which was tuned to the wavelength range that we desired.


Message Edited by AntLee29 on 08-03-2008 03:01 AM
0 Kudos
Message 8 of 11
(4,231 Views)

AntLee29 a écrit:
(...) Correct me if I'm wrong, but it looks like the equalizer lets you bias
the color table on each wavelength to make it stand out more. That means I should keep them all at the same level to get the normal distribution?
I've got the rest of the vis understood now. Smiley Very Happy I suppose I'll need to manually figure out an RGB value for wavelengths under 380, as the first 2 pages in the stack correspond to 359nm and 378nm.

You're looking at endothelial cells in a fixed collagen matrix. We used a laser to image the sample and a prism to spread the fluorescence across a 16-channel photomultiplier tube, which was tuned to the wavelength range that we desired.



I don't think there is something such as an "normal" distribution of light intensities in your application : if all the sliders were set at unity, you would get a color spectrum like the one below for intensities values all fixed at 255. Now, you have to consider that your signal value range is not absolute, specially because there is no color equivalence between UV and visible. Accordingly, the equalizer was used to optimize the look-and-feel of the resulting image. Forget about "normal distribution" (anyway you are not making measurements on the displayed picture !) and focus only on the image "quality".



The wavelength_to_RGB vi has been improved by introducing a fall-off correction at both ends of the spectrum. This makes the vi closer to Dan Burton's C program. I have also added a "gamma" exponent, to account for the fact that the eye/display system is not linear. With gamma < 0, the lower intensities are boosted up, but this also increases the noise. The sliders are now coerced in the range 0.5-10, making the display optimization slightly easier.
The new version is attached.

One question : are the 359 and 378 emission or excitation wavelengths ?

Message Edité par chilly charly le 08-03-2008 02:20 PM
Chilly Charly    (aka CC)
Download All
Message 9 of 11
(4,200 Views)
And a last version...



Message Edité par chilly charly le 08-03-2008 03:30 PM
Chilly Charly    (aka CC)
Download All
Message 10 of 11
(4,191 Views)