Extract x and y co-ordinates from a line profile
Hello,
May I know if there is an option to extract the (x,y) co-ordinates from a line profile on a calibrated image?
Thanks for any help,
Paulstar008
May I know if there is an option to extract the (x,y) co-ordinates from a line profile on a calibrated image?
Thanks for any help,
Paulstar008
0
Answers
Here is a copy of the image. The line profile is also visible.
Thanks
Take a look on this post.
http://forums.mediacy.com/discussion/comment/2311#Comment_2311
Thanks,
Nikita.
Thanks for your suggestion. The original co-ordinates of the image ranges from (0,0) to (990,740). When I performed the measurements using the above macro, I get strange values with co-ordinates up to (2014, 813), see below. I would also like to export the values to MS excel with x and y values in two different columns for further analysis.
Thanks,
Paulstar008
If you want to print coordinates in 2 columns, use Matt's code (from the same topic):
'Output the CURRENT BOUDARY POINT s = _ p.x.ToString("F2") & vbTab & _ p.y.ToString("F2") ThisApplication.Output.PrintMessage(s)
Then you can export the Output window to Excel.
Note, that the coordinates are in Pixels, that may explain 2014,813.
Yuri
Imports MediaCy.Addins.Measurements.Gadgets
Imports MediaCy.Addins.Measurements.McMMData
Dim MyPixelSizeX As Double
Dim MyPixelSizeY As Double
If (ThisApplication.ActiveImage.SpatialCalibration IsNot Nothing) _
Then
MyCalibrationUnits = _
ThisApplication.ActiveImage.SpatialCalibration.UnitAbbrev
MyPixelSizeX = _
ThisApplication.ActiveImage.SpatialCalibration.PixelSizeX
MyPixelSizeY = _
ThisApplication.ActiveImage.SpatialCalibration.PixelSizeY
Else
MyCalibrationUnits = _
"pix"
MyPixelSizeX = _
1
MyPixelSizeY = _
1
End If
( ThisApplication.ActiveImage.Width * MyPixelSizeX ) * _
( ThisApplication.ActiveImage.Height * MyPixelSizeY )
Thanks,
PaulStar008