Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, February 25, 2013 12:38:16 AM(UTC)
philippVh

Groups: Registered
Posts: 4


Hello,

I have some problems with the AnnRulerObject. I'm trying to set a fixed calibration-distance for the ruler, but don't know how.

The goal is the following:
The user determines a distance of e.g. 10 cm, then he/she draws a ruler and in this way I can calculate the scale for the whole picture.

In the AutomationDemo I saw that you can set the calibration of a AnnRulerObject by right-clicking it, but didn't found the corresponding code. I also searched in the documentation for the AnnRulerObject but found nothing that helped me.

The AnnRulerObject has a annRulerInternal - Property with a function called SaveCalibrateValues. This seems promising, but due to missing documentation of the AnnRulerInternal-object I don't know how to use it.

Can anyone help?

Thanks,
Philipp
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, February 25, 2013 4:39:03 AM(UTC)

Daoud  
Daoud

Groups: Registered
Posts: 256


Philipp,
By default, the ruler uses the image's resolution in dots per inch (DPI) to determine the measuring scale.
If you want to use a different scale, you could change the image's DPI based on the ratio of the calculated DPI to the previous DPI.

If you can't find the solution, please send me more details about what you're using, including:
1. Which LEADTOOLS version (17, 17.5, 18, etc.) are you using?
2. What programming interface and platform (.NET 2, .NET 4, Silverlight, WPF, etc.) are you using in your project?
3. Which programming language do you use?
4. What's your version of Visual Studio?

 
#3 Posted : Monday, February 25, 2013 4:50:45 AM(UTC)
philippVh

Groups: Registered
Posts: 4


Hi Daoud,

thank you for your reply and sorry for forgetting all the standard infos about the version I'm using, programming language I use.... I found another post, there it says that you have to set the DpiX and the DpiY - Property of the AnnRulerObject.

Now I calculate the needed X- and Y-DPI-Resolution while drawing a an AnnRulerObject to work with a fixed scale. It works fine - although I needed a while to find all the old math formulas from school to calculate it :)

PS:
LeadTools v17.5
.Net 4
C#
VS 2010
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.090 seconds.