Author |
Topic |
|
jwest
Brazil
67 Posts |
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 |
|
fab
1310 Posts |
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. |
|
|
jwest
Brazil
67 Posts |
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
1310 Posts |
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. |
|
|
|
Topic |
|
|
|