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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Scale and ruler

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Janex Posted - Nov 14 2014 : 00:17:44
Hi all.
I have picture with some very small objects, viruses, for example.
I know picture scale, 1:100000 for example.
Is there some way to programmatic set ruler to display
real size of measured object ?

WBR
Janex
2   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - Nov 16 2014 : 12:18:46
For objects see:
ScaleFactor, SetScaleFromPixels and SetScaleFromSelectionLen

Declaration
property ScaleFactor: double;

Description
ScaleFactor specifies the scale factor (default 1).

In the common representation X:Y (ex. 1:100000) is the Y value (100000).
This value, with DpiX and DpiY (and measure unit MUnit), weight the measurements of areas and line lengths.

Example
// Sets a scale factor of 1:100000
ImageEnVect1.ScaleFactor:=100000;


Declaration
procedure SetScaleFromPixels(px:integer; mm:double);

Description
SetScaleFromPixels changes the ScaleFactor property such that px pixels correspond to one mm (MUnit).

Example
// This code makes so that 100 pixels are equals to 1 meter.
ImageEnVect1.MUnit:=ieuMETERS;
ImageEnVect1.SetScaleFromPixels(100,1);


Declaration
procedure SetScaleFromSelectionLen(mm:double);

Description
SetScaleFromSelectionLen makes the perimeter of the selection region correspond to one mm (MUnit) by changing ScaleFactor property.

Example
// This computes scalefactor so that the length of the current selection measures 5 millimeters.
TImageEnVect1.MUnit := ieuMILLIMETERS;
TImageEnVect1.SetScaleFromSelectionLen(5);

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
xequte Posted - Nov 15 2014 : 20:10:36
Hi Janex

Do you mean a ruler along the top/side of the image, or a ruler that the user can select the start and end of the object.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com