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
jwest Posted - Jun 12 2011 : 10:16:30
Hi,

When working with TimageenVect and dicom image the measurement tools such as length, perimeter and others will take account about zoom, scale ... embedded into the dicom image or do I have to set it by hand.

In this case, how to read this tag values and set them.


Regards,

Luiz
3   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Jun 19 2011 : 14:31:15
ScaleFactor must be set (calibrated) so that the measure becomes correct.
Often images have a line which indicates how much pixels corresponds to one centimeter (this is just an example).
For this reason exist the method SetScaleFromPixels and SetScaleFromSelectionLen. Look at "Measurement" section of the help file for more details and other related properties/methods.

Please look also the example at imageprocessing2\measureit.
jwest Posted - Jun 19 2011 : 14:04:12
Hi,

I am trying to set DpiX and DpiY, but the measure still results wrong. My ImageEnVect has Munit setting as ieuCENTIMETERS.
Here is what I am doing:
begin
tags:=ImageEnMView1.MIO.Params[ImageEnMView1.SelectedImage].DICOM_Tags;
s := tags.GetTagString( tags.IndexOf($0028,$0030) );
i:=pos('\',s);
dx:=StrToFloatDef(copy(s,1,i-1),1); //transform string to float
dy:=StrToFloatDef(copy(s,i+1,20),1); //transform string to float
with ImageEnVect1 do begin
DpiX:=round(dx/2.54);
DpiY:=round(dy/2.54);
ScaleFactor:=1;
end;

Please, what can be wrong?

Regards,

Luiz
fab Posted - Jun 12 2011 : 10:36:33
Hi,
you have to set manually DPI and scale, so ImageEn can calculate coefficients to convert pixels to selected measure unit.
You can set DPI with:

ImageEnVect.DpiX := ....
ImageEnVect.DpiY := ....
ImageEnVect.ScaleFactor := ....

Please look at the documentation and examples for more details.