LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multipage TIF VIs

Hi,

I put together some VIs to write multipage TIF files: just call to labview functions, no external libraries are needed.

Currently only U8 and  U16 images are supported, and the collection of TifTags implemented is rather crude but it should work for most applications.

Let me know what you think!

 

Nico

Message 1 of 16
(3,631 Views)

That's awesome! Thanks for contributing to the community!

C. Weeks
Product Support Engineer
NI
0 Kudos
Message 2 of 16
(3,566 Views)

Hey Nico,

 

I've been implementing some of the old libtiff libraries in labview, however, I have noticed that as multipage tiffs grow larger in page size, the write speed decreases by 1 or 2 orders of magnitude. Have you noticed this in your implementations? Also, would it be possible for you to compile your multipagetiff.llb for previous versions of labview (2016). 

 

Best,

 

Taylor

0 Kudos
Message 3 of 16
(3,390 Views)

Without seeing your code it is hard to say why you see a slow down! Generally the LabVIEW file functions hare hardly affected by fhe size of the file if written (or read) to in a linear fashion. I regularly handle multi MB files and haven’t noticed such slow downs.

Of course if you write 100 int32 values individually inside a loop this will take considerably longer than if you pass that array to a single Write File node and let LabVIEW write it to the file in one go. Similarly using all over the place Set File Offset to do random access will slow down your File IO performance a lot too.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 16
(3,362 Views)

Hi Taylor,

 

here is a LV2011 version, hope that helps.

 

I did not run any extensive tests on the old version, sorry...

 

Best,

 

Nico

 

 

0 Kudos
Message 5 of 16
(3,322 Views)

Hi,

thank you for your work. I have tried to use your VI, but I am having problems. The image should look something like this:

TIFF1.png

But what comes out looks like this:

TIFF2.png

Also, some viewers in Windows 10 are having problems displaying it. It does have 2 pages though, as it should, and they should be the same. I am using Labview 2018SP1. Do you have any idea, what is going wrong? Thank you.

 

0 Kudos
Message 6 of 16
(3,102 Views)

Hi,

 

which type of data are you trying to write as TIFF images? Could you also share the code you are using? I suspect something is wrong with the bit depth.

 

Best,

 

Nico

0 Kudos
Message 7 of 16
(3,091 Views)

Hi, thank you for the quick reply.

I am working with U8 and SGL 1920x1200 pixel images, and I made sure that all images are U8. I just tested it again, specifically recasting to  U8, still the same result.

0 Kudos
Message 8 of 16
(3,086 Views)

Does it work if you try converting your images to U16? I suspect my VIs might not handle properly the different image types...

0 Kudos
Message 9 of 16
(3,082 Views)

The Forum seems to have lost my last message.

Converting to U16 makes a difference. The files are readable now. However, in the image viewers they seem to be just black, might be because of the conversion from 8 to 16 bit. The information seems to be still there, when scaled correctly. This is annoying. Is there no way to stay in 8 bit for it to work?

0 Kudos
Message 10 of 16
(3,024 Views)