LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

image format conversion (.SDT to .JPEG / .BMP / .TIFF images)

Hello All;
 
I am developing a Labview software module for our TCSPC (Time Correlated Single Photon Counting) laser microscope. A part of my module generates .SDT images via the Becker-Hickl SPC-830 photon counter. I want to convert those images to BMP / JPEG / TIFF within labview if possible,
 
Does anyone has done this before, or has any idea how to do this?
 
Thanks,
 
 
Muttee Sheikh
Photonics Research Group,
Dept. of Electrical and Computer Engineering,
University of Toronto,
Canada
(647)686-5152
0 Kudos
Message 1 of 9
(6,958 Views)

As far as I know .SDT files are binary files. 
I don't know the file format description of SDT files but you can load binary files in LabVIEW, extract the data, convert it to 2D-array of U8 orU32, copy the array to an IMAQ image, write the image to disk.

If you don't have NI-Vision or don't want to use it, you might prefer to continue searching for someone that has been working on this.
Guenter

0 Kudos
Message 2 of 9
(6,937 Views)
I second Guenter's suggestion.  It is possible a .spr (signal parameters) file comes with your .sdt file.  The .spr has the information you need to convert the binary info into an array in LabVIEW.
Brian K.
0 Kudos
Message 3 of 9
(6,913 Views)
You don't need IMAQ at all. Get the 2D array from the binary data, and use "Flatten Pixmap.vi". Then, save this pixmap with "Write JPEG/PNG/BMP File.vi" in "Graphics&Sound>Graphics Formats".


You do need the full or professional version of LabVIEW.


Regards,


Wiebe.
Message 4 of 9
(6,904 Views)
First, thanks to all who replied. Second, i do have the full developmental version of labview. Third, i developed a VI that takes in the .SDT file and uses "read binary file" to extract 2D Integer array data and passes it to "flatten to pixmap" function that passes the image data to the function "Write Flattened Pixmap" and then a picture to show the result.
 
When I try this VI on an SDT file, i get this error:
 
Error 116 occurred at Read from Binary File in Untitled 1
 
Possible reason(s):
LabVIEW:  Unflatten or byte stream read operation failed due to corrupt, unexpected, or truncated data.
 
I have also attached the VI that i made,
 
Please help if anyone knows whats wrong..
 
Thanks once again,
 
 
0 Kudos
Message 5 of 9
(6,885 Views)
As I take from the wire to the "Flatten Pixmap.VI" you expect U8 data in your image. You wired a 2D array of I32 to the "Read from Binary File" function. This doesn't match.
Next issue: The .SDT has a special format, so reading the image data using "Read from Binary File" won't work. Brian already mentioned an .SPR file that needs to be considered when extracting the image data.
Hope this helps, Guenter
0 Kudos
Message 6 of 9
(6,875 Views)
Do I expect the .SPR file to be generated by my photon counter? It only gives me an SDT file as an output, how do i extract the SPR information? and now i wired 2d array of U8 to the data type (in read from binary file)...but still doesnt work and same error,
 
0 Kudos
Message 7 of 9
(6,870 Views)
Sorry for me not clearly pointing out that LabVIEW writes array size information to binary files.
In turn, in expects this information when reading a 2D array from a binary file.
That's why your code reports an error.
I don't know where to get a description of your .SPR file format.
Regards, Guenter
0 Kudos
Message 8 of 9
(6,864 Views)

if your module continue to get errors, you can take a look those vb scripts  i am very familiar when i want to do image format conversion. good luck with all of your work.

0 Kudos
Message 9 of 9
(5,740 Views)