Closed wajahat57 closed 5 years ago
Hi, Sorry for the late reply, I was on holidays...
No I never needed it. If you want to do it, I can push it to the library.
regards
scholi
Here is a useful link: https://stackoverflow.com/questions/46477712/reading-tiff-image-metadata-in-python
so you can read the data and size information with the information above and create a custom SPM_image:
I = SPM_image(data, real=dict(x=real_width,y=real_height,unit=unit_used_for_WidthHeight))
Hi Scholi Thanks a lot for your response and the link. It was helpful. What are the real_width and height and the unit? Are they the real world size of the image field of view in distance metrics such as cm, mm etc?
yes exactly. Imagine you have an image of 512×512 pixels but it correspond to a real size of 20×20 μm, then x=20, y=20, unit="um" or x=2e-5,y=2e-5,unit="m" for e.g.
And this real distance or size, if stored inside the TIFF image file, such as in the meta information, how that information can be extracted for SPM images? Is it just the way you shared above through the link for reading meta information?
Actually, I am able to read that meta information, but in that, I could bot find real world distance info. I was looking for some help from people who have been using SPM images to know if there is a way to extract the real world information from SPM images ?
Do these images by default contain this information?
If you are willing to help, then I can share sample SPM TIFF image.
TIFF is NO SPM standard. It is basically a non compressed way of storing image which also work with 16bits per pixels making it a possible choice for SPM data.
The problem is that TIFF is not meant to store real size data. Maybe some manufacturer can add the information in the form of tags, but this does not seems to be the case for your image.
Do you know what is the real_size of your image you provided?
Note: Most manufacturer produce a second file with the same name and another extention woth the metadata. Do you have something like that?
Don't have any such file. Will double check with those involved in image acquisition.
I guess that those Tif are exported with WinSPM. Which instrument are you using to record the images?
There is an SPM file produced with the following info:
FileName X pix Z V I STS Date Time Comment
110618a1_15.TIF 80.0 512 1.5 0.30 0.05 N 28/6/18 22:43 110618a16
So I guess you have your answer then... Your image is most probably 80×80 μm and the Z scale is probaly 1.5 μm. Just check with your measurements
Ookay...great will do.
Meanwhile, the meta information of the TIFF image (you might have also got it already), is:
{'BitsPerSample': (16,), 'Compression': 1, 'HostComputer': 'IBM Compatible (Windows)', 'ImageDescription': '110618a16', 'ImageLength': 512, 'ImageWidth': 512, 'Make': 'WinSPM 407(34) R.B. Leane', 'Model': 'WinSPM 4', 'PhotometricInterpretation': 1, 'ResolutionUnit': 2, 'RowsPerStrip': 512, 'SamplesPerPixel': 1, 'StripByteCounts': (524288,), 'StripOffsets': (7124,), 'XResolution': 72.0, 'YResolution': 72.0}
And any idea what V, I and STS are in the information I shared above?
The instrument is Scanning Tunnel Microscope
just noticed that I forgot to answer. So for clarity: STM = Scanning Tunneling Microscope, STS=Scanning Tunneling Spectroscopy where you record the current I in function of the voltage V (so the tip-sample bias).
If you still have issue, please tell the people who performed the mesurement to contact me.
kind regards
Ok. Thanks. I will.
Sent: Friday, September 28, 2018 at 1:14 PM From: "Olivier Scholder" notifications@github.com To: scholi/pySPM pySPM@noreply.github.com Cc: wajahat57 wajahat1@gmx.com, Author author@noreply.github.com Subject: Re: [scholi/pySPM] TIFF image meta information (#3)
just noticed that I forgot to answer. So for clarity: STM = Scanning Tunneling Microscope, STS=Scanning Tunneling Spectroscopy where you record the current I in function of the voltage V (so the tip-sample bias).
If you still have issue, please tell the people who performed the mesurement to contact me.
kind regards
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/scholi/pySPM/issues/3#issuecomment-425403726
Hi Scholi Thanks for sharing this toolbox. Can it be used to extract metadata from an SPM tiff image file such as pixel to world distance mapping etc?