LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use IMAQ to read out custom information in .tiff file?

Currently, our lab use AFM to scan sample surface. The result was saved as .tiff file.

Here are lots of information stored in the .tiff file, such as scan range, tip offset...

But when I try to use IMAQ to load such .tiff file. I just get the image, and some information such as x resolution, y resolution, calibration.

Is there some way to use IMAQ tool to extract all the information I need from .tiff file?

Thanks a lot!

0 Kudos
Message 1 of 6
(6,998 Views)

I mean all the information I need to is already in .tiff header part.

They have such structure.

[Control]

Signal Gain: 1

X Amplitude: 100 nm

Y Amplitude: 100 nm

Z Gain: 1

[General Info]

Head type: STM

Number of columns: 512

Number of rows: 512

Z Amplitude: 100 nm

[Head Settings]

Preamp Gain: 1000 mV/nA

X Calibration: 1 Å/V

Z Calibration: 1 Å/V

[Header end]

Also there is a PreHeader consists of three lines:
  • The first line indicates the file is a WSxM file: WSxM file copyright Nanotec Electronica
  • The second line indicates the data is an SxM image (not a movie, CITS nor CITM): SxM Image file
  • The third line provides information about the size of the header in bytes: Image header size: n

They looks like this :

 

WSxM file copyright Nanotec Electronica
SxM Image file
Image header size: 417.

 

So how to use LabVIEW to get such information?

Can IMAQ do such a job? Is there certain vi in IMAQ can show these information?

Please give me some help or suggestions.

Thank you very very much!

0 Kudos
Message 2 of 6
(6,971 Views)
Why don't you open the file using Read Text File and read out the first few lines that way. Once you parse out how many bytes are in the header portion, you could read more bytes to get the rest of the header portion.
0 Kudos
Message 3 of 6
(6,962 Views)

I tried to use read text file vi. But what I get is some meaningless characters. Just like this.

 

 

II* Ô   ô                                                                                  ¥ÂZEÃÒZE    ª}gDó» ‘N‘>test3                                   Mesuared by JSPM-5200                                                                                                                                                                                                                                            ?  Ù Ù :/  

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ                       ÿÿÿÿ                    «ÊDÚ¢I@                {.A                   ?    @  ºB   @ PCG PCG  €?           €?jè@  €? øâE              SPM                                                                                                                                                                                                                                                                         ý?F                                                                                                     ÿÿÿÿ  ÿ ÿÿUÿþ    þ  þ þ 𪠠    
 "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~€‚„†ˆŠŒŽ’”–˜šœž ¢¤¦¨ª¬®°²´¶¸º¼¾ÀÂÄÆÈÊÌÎÐÒÔÖØÚÜÞàâäæèêìîðòôöøúüþ  )19AJRZbjs{ƒ‹”œ¤¬´½ÅÍÕÞæîöÿ  )19AJRZbjs{ƒ‹”œ¤¬´½ÅÍÕÞæîöÿ                               ªÿ ÿU ÿ ÿÿ ªÿÿ þþ  þ þ`  þðªŒþþ   
 "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~€‚„†ˆŠŒŽ’”–˜šœž ¢¤¦¨ª¬®°²´¶¸º¼¾ÀÂÄÆÈÊÌÎÐÒÔÖØÚÜÞàâäæèêìîðòôöøúüþ  )19AJRZbjs{ƒ‹”œ¤¬´½ÅÍÕÞæîöÿ                                                              ª ÿ ÿª  ÿ ÿÿUªÿ  þªPþ  þþþðª þþ   

 

 

Why is that ?

0 Kudos
Message 4 of 6
(6,951 Views)

Much of the data may be saved in a binary format as opposed to a readable text format.  (Though you can see some of the data is saved as strings.)  You can convert the ASCII characters to bytes using the typecast function.

 

I don't know the format of the header.  You will have to look that up.  But for example, if bytes 10,11 represent something like a picture dimension in U16, then you should be able to extract them and typecast them to a U16 and you will have the numeric value you are looking for.

 

Depending on the the format of the data, it may be better to read the file using Read Binary File to get an array of bytes.  The only question is how many to read before the header ends and the raw data begins.

0 Kudos
Message 5 of 6
(6,945 Views)

I tried to use tiff tag to anaylsis the .tiff image. The result is like this

 

1.JPG

 

When I tried to convert the ASCII characters to bytes using the typecast function. What I get is an array of data.

I do not know what does them mean.

 

It seems that one software called WSxM can show the inforamtion saved with tiff file.

2.JPG

 

But how to extract them from tiff by using labview? I am still confused.

Ravens, thanks for our reply.

0 Kudos
Message 6 of 6
(6,935 Views)