ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Help with SetScaleFromSelectionLen
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

AndyColmes

USA
351 Posts

Posted - Aug 04 2015 :  10:37:42  Show Profile  Reply
Hello,

I am trying to implement measurements like the demo measureit to measure distances in mm and cm. I am a bit confused on how to use ImageEnVect1.SetScaleFromSelectionLen which I think is crucial to get the correct measurement. Does this have to do with the image size at all?

Also, I need to be able to make the measurement stick as a line object (with the measurement text value) after releasing the mouse. The demo at the moment clears the measurement once the mouse is released.

Thanks for any help in advance.

Andy

xequte

38514 Posts

Posted - Aug 05 2015 :  18:27:15  Show Profile  Reply
Hi Andy

Please see the demo:

Demos\ImageAnalysis\MeasureIt\MeasureIt.dpr

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

AndyColmes

USA
351 Posts

Posted - Aug 06 2015 :  07:11:40  Show Profile  Reply
Hi Nigel,

Yes, I am using the MeasureIt demo. Do I still have to use SetScaleFromSelection, if I already use SetScaleFactor(10, 1) where I define 10 pixels for each mile (ieuMILES)?

Also, how do make the measurement stick as a line object after releasing the mouse? Is that possible?

Thanks Nigel.
Go to Top of Page

xequte

38514 Posts

Posted - Aug 06 2015 :  16:32:25  Show Profile  Reply
Hi Andy

All the Scale methods ultimately do the same thing which is to set the valuue for TImageEnVect.ScaleFactor:

http://www.imageen.com/help/TImageEnVect.ScaleFactor.html

If you want a visible line use a ruler object, e.g. change:

ImageEnVect1.MouseInteractVt := [ miDragLen ];

To:

ImageEnVect1.MouseInteractvt := [ miPutRuler ];



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: