ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TIF intensity graph

Hey everyone,

I have a quick question about how to create an intensity graph from a .TIF file. Currently, I have my spectrometer setup to change grating, focus, then capture the focused image (in .TIF form). I have a user prompt dialog box, where the user chooses the file path. I would then like to create an intensity graph of the same image. I have already looked at several sources as to how to solve this problem, but I do not have the IMAQ vision add-on. 

 

Currently, I am trying to use the image file path to retrieve the image data, then use the unflatten piximap vi to create an intensity graph using the 2-D array. This option is not working due to an error 7 (file cannot be found). I tried stripping the file path but this did not work either. So I'm looking for other, more simple options (if possible). Thanks for any feedback! =]

0 Kudos
Message 1 of 3
(2,971 Views)

Hey BoilerUp,

 

Can you post your tif file and your attempt at this. That would clarify what you are trying to do...

 

Regards,

A. Zaatari

National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(2,948 Views)

Your simplest option would be to convert your TIF file to something LabVIEW can natively read, then extract the (presumably) grayscale image data and plot on an intensity graph.  There are a several options:

 

  1. Search these forums for a LabVIEW library to read TIF.  This topic comes up occassionally, and there have been multiple implementations.
  2. Use ImageMagick to convert from TIF to PNG, then read the PNG.  ImageMagick is a command line utility, so can be called from LabVIEW using System Exec.
  3. Manually convert from TIF to PNG using almost any bitmap editor.  Good open source (i.e. free) options that I have used are IrfanView or GIMP.

Good luck.  Let us know if you need further assistance.

0 Kudos
Message 3 of 3
(2,939 Views)