LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read multi-image tiff

Solved!
Go to solution

No not yet. I'll do that. The image is in the link.

https://drive.google.com/open?id=0B71N93kVyonTQ1JlbWdGRjVGX1E

0 Kudos
Message 21 of 28
(1,315 Views)

Uhhhh....I'm downloading it now but Google just complained that the file is greater than 1GB...Is there a reason this single image is larger than than a 2 hour movie? (which has 24 images/second and audio)  It likely is at a higher resolution than your monitor can display anyway.  It needs to be converted into an image that is more reasonable.


Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
Interesting in learning all you can about automotive CAN bus communication? Checkout my 12 part CAN Blog series.
Checkout and help contribute to the community driven LabVIEW Wiki.

0 Kudos
Message 22 of 28
(1,314 Views)

Okay well I see this is because the file contains 820 images.  In this case I'd look into extracting each image into it's own file, then you can load that one file into the UI at a time.

 

Edit, here is one method of extracting images using the commandline and another tool.

 

http://superuser.com/questions/44600/how-to-split-a-multipage-tiff-file-on-windows

 

Double Edit: Also interestingly enough on my system it will load the first image, but then out of memory on any other, maybe there is a bug in my code that is leaking memory.


Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
Interesting in learning all you can about automotive CAN bus communication? Checkout my 12 part CAN Blog series.
Checkout and help contribute to the community driven LabVIEW Wiki.

Message 23 of 28
(1,310 Views)
Highlighted
Solution
Accepted by topic author john1626
02-08-2017 03:05 AM

Okay found a bug and fixed it.  I wasn't releasing the previous image before loading the next, which normally wouldn't be a problem, except you are loading the same file each time and the file is quite large.  This might look like a memory leak since old images aren't disposed before loading the next.  Let me know if this works for you.


Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
Interesting in learning all you can about automotive CAN bus communication? Checkout my 12 part CAN Blog series.
Checkout and help contribute to the community driven LabVIEW Wiki.

Message 24 of 28
(1,303 Views)

Thank you so much. This one works very well.

0 Kudos
Message 25 of 28
(1,284 Views)

Dear all,

 

thanks for the code.

It works on 8 bit MultiTiff files but not on 16bit files.

Does anyone tried to load a 16bit image?

 

Best regards.

0 Kudos
Message 26 of 28
(201 Views)

I have not, do you have a 16bit tiff file you are willing to share to see what is happening?  I suspect there is something wrong with the .net functions for image selection but am unsure what it could be.


Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
Interesting in learning all you can about automotive CAN bus communication? Checkout my 12 part CAN Blog series.
Checkout and help contribute to the community driven LabVIEW Wiki.

0 Kudos
Message 27 of 28
(180 Views)

Here is an example of my 16bit image.

 

In the meantime, I successfully opened a 16 bit Multi-Tiff stack of thousand of images and I post here the result if someone is interested in this thread.To run it, you need to:

1- install 'tiff-3.8.2-1.exe'

2- run 'Read_Images_From_TIFFStack_Example.vi' located inside the 'MultiTiff.llb' Library where other vi's coming from the 'Libtiff3' post in this forum.

 

I hope this will help people.

0 Kudos
Message 28 of 28
(169 Views)