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
 Measurement question

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
michaschumann Posted - Aug 12 2020 : 07:09:17
I just discovered the measurement functions and ask myself wether this is possible:

- A picture of something round/elliptical is taken together with a cm scale (10cm)
- Step 1 the user measures a distance of 10cm on the photo. The measurement should display no label.
- When the measurement 1 is complete I can read the ratio cm/pixels somehow and enable step 2
- Step 2 is a elliptical area measurement. Again I would like to display no label while measuring.
- When the second measurement is complete I display the calculated area and put it into the database.

Is this doable?

Thanks!

Micha Schumann
Marburg, Germany
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Aug 19 2020 : 18:23:14
Hi Micha

Glad you found a solution. We will look at an easier way to hide the ruler text for a later update.

Nigel
Xequte Software
www.imageen.com
michaschumann Posted - Aug 15 2020 : 07:38:02
I managed to achieve evetything I wanted using the standard measurement functionality. First I set font size to 1 on measuring the reference length, the label then is nearly invisible.

I detect the end of the measurement in onLayerNotify and set untis to mm and DPI for the IMabgeEnViewer appropriately, then measuring ellipsoid areas is displayed correctly. Great.

Thanks for that great library, I am really looking forward to using all the features. The only thing I am really angry about is that I did not buy a license years ago ;-)

Micha Schumann
Marburg, Germany
xequte Posted - Aug 12 2020 : 16:55:15
Hi Micha

Yes, it is very doable. The only difficult part is not displaying a label.

Probably what you'll want to do instead use formatted layers instead of a ruler:

- use miClickCreateLineLayer so user can add a line
- In OnNewLayer format line like like a measure, but without a label
- In OnLayerNotify event, detect end of line addition, get length and then remove line
- use miCreateShapeLayer so user can add an ellipse
- In OnNewLayer format shape layer
- In OnLayerNotify event, detect end of shape addition, get area and then remove shape
- Calculate and add to DB


Also, see these methods in iexLayers.pas. You may want to add them to your code:

function CalcRulerLength(Pt1, Pt2: TDPoint; Units: TIEUnits; DpiX, DpiY: Double): double;
function CalcRulerArea(AreaRect: TRect; Units: TIEUnits; DpiX, DpiY: Double; ZoomX, ZoomY: Double; Ellipse: Boolean = False): double;



Nigel
Xequte Software
www.imageen.com