12-15-2017 06:53 AM
Hi,
My requirement is to read and write a stack of images into TIFF format (multiple pages, directories , with customised metadata). I would like to do this using open-source libraries (C, C++ or preferably .NET) and build a code in LabVIEW.
I had explored an old post on the same using LibTiff dlls in LabVIEW (https://forums.ni.com/t5/LabVIEW/Labview-libtiff-implementation/td-p/929843) and tried utilising the same. However, all dlls and llbs / VIs attached in the post don't seem to work, in that , I get an error message ' Library not found or failed to load' (attached image) for all Call library function nodes despite configuring it to point to the correct dll location in my local system. I have ensured that the right version of the dll is utilised as mentioned in the post.
I am working on 32-bit LV (version 14.0.1, LabVIEW2014 Service Pack) on Windows 10 , 64-bit OS. The downloaded dll from the webpage said it was compatiblie with both 32- and 64-bit systems.
In this respect I would like some help in figuring out why this issue occurs. Alternatively I would also welcome your suggestions on various other TIFF utility libraries which can be used for my specifications (mentioned above) in LabVIEW.
Thanks in advance !
12-19-2017 06:42 AM
Although the library might work on 32 and 64 bit LabVIEW, you do need the correct dll. The 64 bit dll won't work on 32 bit LabVIEW. Make sure you've downloaded he correct dll.
LabVIEW Programming ((make LV more popular, read this)
12-20-2017 05:36 AM - last edited on 12-20-2017 08:29 AM by Kristi_Martinez
I have ensured the dll is compatible with both 64 and 32 bit LabVIEW... The libtiff link write-up for the same says so.
12-21-2017 07:53 AM
I'm pretty sure a dll is either 64 bit or 32 bit, unless it's a .net dll. And it's not a .net dll, they don't expose functions like a normal dl. When they say it's 32 and 64 bit, it might be implied that you do need to download different versions.
LabVIEW Programming ((make LV more popular, read this)
12-21-2017 09:04 AM - edited 12-21-2017 09:14 AM
wiebe@CARYA wrote:
I'm pretty sure a dll is either 64 bit or 32 bit, unless it's a .net dll. And it's not a .net dll, they don't expose functions like a normal dl. When they say it's 32 and 64 bit, it might be implied that you do need to download different versions.
I think AishaRaj is refferring to
"The library, along with associated tool programs, should handle most of your needs for reading and writing TIFF images on 32- and 64-bit machines."
but I agree, if there was a dll for 32 and 64, you had to use the proper dll
and if I remember correctly, we wanted to use those dlls a few years ago, and it was quite an effort trouble to make them run on a windows 7 x64 pc.
12-21-2017 09:40 AM
yep, in the end, we completly dismissed the libtiff library and focused on the approach presented in message 64 of the thread you quoted in your first post
https://forums.ni.com/t5/LabVIEW/Labview-libtiff-implementation/m-p/3078644#M879535 from pbuerki
"In my search for a fast Tiff Reader that does not require IMAQ, I came across a discussion on LAVA.org (https://lavag.org/topic/7170-tiff-reader/) that provided a link to a little know LAVA Code Repository (http://code.google.com/p/lavacr/source/browse/#svn/trunk/8.5.x/Machine%20Vision%20and%20Imaging/TIFF...).
This repository includes a TIFF reader written by Gavin Burnell and Herbert Looser that apparently does not use the libtiff or any of its successors.
After some minor modifications to their Load Flattened Image from Tiff.vi (see TIFF File Reader (LAVA.org).vi), I can now read my dropbox Tiff file in 74 ms. (My application loads up to several hundred large Tiff files for interactive viewing.)"
Works in LabView 2017 x32 on Windows 10 x64
I quickly tested it with a 2 page tif created with ifranview:
http://www.nightprogrammer.org/development/multipage-tiff-example-download-test-image-file/
looks like I can't attach a .tiff to this post ...
12-21-2017 09:51 AM
Going down the .Net route I do have some code for reading and displaying a TIF file posted here. To display it, it will read it, then save it to a PNG file stream, which LabVIEW then reads into the native LabVIEW image format. You could look into invoking the Save to a TIF file format and see if that works.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
15 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
12-21-2017 10:32 AM
Yeah, I have an old Tiff library, that covers almost the entire standard in pure LabVIEW. Works with and without IMAQ. Jpg compression is the only part missing. It's on my list for cleanup and release, but it's not on top of it. If only I did it in OO to start with. Can't release it giving my current view of what "quality" is...
LabVIEW Programming ((make LV more popular, read this)
12-22-2017 02:41 PM
Is there a reason you have to do this with LabVIEW?
There are plenty of programs out there that will batch convert image files from one format to another.
12-22-2017 10:56 PM - edited 12-22-2017 10:57 PM
@wiebe@CARYA Sorry for the ambiguous wording ... I did mean that I had tried using different dlls : 64- and 32-bit versions of LibTiff ... but to no avail ... Thank you for pointing this out though !!