From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Multiple image tiff file with vision

Solved!
Go to solution

Hello,

 

I would like to read a multi-page tiff file into labview, and split the file into single image tiff files. Since I have the Vision toolkit I would like to use it to do this.  Does anyone know how? 

 

Thanks!

Paul. 

0 Kudos
Message 1 of 18
(6,714 Views)

Hello labJunky,

 

There's no built-in LabVIEW API that can read/write TIFF image file, but you can use IMAQ Vision for LabVIEW to read TIFF files using IMAQ Read File VI. You can refer tothe following thread

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=88495&requireLogin=False

 

Andy Chang
National Instruments
LabVIEW Control Design and Simulation
0 Kudos
Message 2 of 18
(6,690 Views)

Thanks Andy C,

 

you are right I can certainly open TIFF images with IMAQ Read File Vi and I can wire the image reference to a image display, but I don't understand how I access all the images in the TIFF. For example, if there are two images saved in the TIFF file, how do I display both images with IMAQ Vision and Labview? Any chance of a simple example? 

 

(I used the ReadFile example that comes with the IMAQ Vision examples. It opens the TIFF, and displays the first image, but not the second, and I see no way to get at the second image, or even to know it exists? Probably I am missing something simple!)

 

Thanks,

paul. 

 

 

0 Kudos
Message 3 of 18
(6,682 Views)

Hey labJunky,

 

Is it possible to have you post the file that you are trying to open?

Andy Chang
National Instruments
LabVIEW Control Design and Simulation
0 Kudos
Message 4 of 18
(6,671 Views)

Yes, here you go. (Its 4 MB though, and this one is really not for any use, its just white noise, but there are 2 images in the TIFF.)

 

 

0 Kudos
Message 5 of 18
(6,666 Views)

Hello labJunky,

 

Thank you for the files, I'll investigate this further for you.

 

0 Kudos
Message 6 of 18
(6,644 Views)

Hey labJunky,

 

Could you please clarify on what you meant by having two images saved onto one tiff file? Do you mean that you meshed two separate images onto one? When you use IMAQ Read File VI, it will open the entire file of interest, but it does not have the ability to separate different layers of images.

Andy Chang
National Instruments
LabVIEW Control Design and Simulation
0 Kudos
Message 7 of 18
(6,635 Views)

Hi Andy, thank you for your persistence!

 

when I open the TIFF in my favourite image viewer (in this case Preview on my mac), I see two pages, with one image on each page.

(I also had a look on Windows Xp with Microsoft office Imaging viewer, and I see the same thing, two pages, two images.) 

 

The images were taken with an Andor camera, in "Kinetic Series Mode". The Andor vi which I use to save the images, saves them in one TIFF file, but on separate pages. (There is a mode which merges the images together, but then that only generate one image, "Accumulative Series Mode", but that's not what I'm doing.)

 

Normally I will be taking three images in a series with the camera, and I would like to perform some manipulation with those images in Labview, but the images are all saved in one file. If it is not possible to access each of the images in Labview, I will investigate how to save them separately using the Andor Camera's SDK, it sounds like this will be the easier route. 

 

Thanks for the help!

Paul 

0 Kudos
Message 8 of 18
(6,628 Views)
Solution
Accepted by topic author labJunky

Hey labJunky,

 

When I open the tiff file in pictureviewer, I was only able to see one page and one image... But regardless, you would need to save the images in separate files in order to access them in LabVIEW.

Andy Chang
National Instruments
LabVIEW Control Design and Simulation
0 Kudos
Message 9 of 18
(6,618 Views)

hi Andy,

 

just downloaded the file I posted, definitely has two images....

 

Anyhow, its irrelevant, since according to your post the IMAQ Vision only reads in one image, and I guess only accepts multi-image files in video AVI format. 

 

Thanks for the answer!

Paul. 

0 Kudos
Message 10 of 18
(6,613 Views)