GetFeretsDiameter example for Visual Basic
Dim RasterProc As New LEADRasterProcess
Dim Top, Bottom, Left, Right As Integer
Dim i As Integer
Top = LEADRasterView1.Raster.BitmapHeight / 4
Bottom = LEADRasterView1.Raster.BitmapHeight * 6 / 4
Left = LEADRasterView1.Raster.BitmapWidth / 4
Right = LEADRasterView1.Raster.BitmapWidth * 3 / 4
LEADRasterView1.Raster.SetRgnEllipse Left, Top, Right, Bottom, L_RGN_SET
RasterProc.GetRgnContourPoints LEADRasterView1.Raster
For i = 0 To RasterProc.ContoursCount
MsgBox "(" + Str(RasterProc.ContourX(i)) + "," + Str(RasterProc.ContourY(i)) + ")"
Next i
RasterProc.GetFeretsDiameter
MsgBox "Ferets Diameter Length :" + Str(RasterProc.FeretsDiameterLength) + Chr$(13) + _
"Ferets First Index:" + Str(RasterProc.FeretsFirstIndex) + Chr$(13) + _
"Ferets Second Index:" + Str(RasterProc.FeretsSecondIndex) + Chr$(13)