ImagePro>Re: using IpBlbGet(GETPOINTS)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ImagePro>Re: using IpBlbGet(GETPOINTS)
- To: <imagepro-users[at]lists.mediacy.com> (Image-Pro Plus Users Email List)
- Subject: ImagePro>Re: using IpBlbGet(GETPOINTS)
- From: "Chris Tully" <ctully[at]mediacy.com>
- Date: Fri, 30 Nov 2001 13:40:27 -0500
- List-Archive: <http://lists.mediacy.com:80/Lists/imagepro-users/List.html>
- List-Unsubscribe: <mailto:imagepro-users-off@lists.mediacy.com>
- Reply-To: <imagepro-users[at]lists.mediacy.com> (Image-Pro Plus Users Email List)
- Sender: <imagepro-users[at]lists.mediacy.com> (Image-Pro Plus Users Email List)
John,
Add the following line to your macro:
ret = IpAnSet(GO_ATTR_CONNECT,1)
This will close the object by connecting the first and last points.
The following macro is one I have put together that converts Count/Size
outlines to Annotation objects:
'Converts a set of Count/Size Object outlines to Annotation objects.
Sub Blob2Annot()
Dim nObjects As Integer
Dim nPoints As Integer
Dim Points() As POINTAPI
Dim i As Integer
'delete hidden objects
ret = IpBlbUpdate(4)
'loop through the objects converting them to Annotations
ret = IpBlbGet(GETNUMOBJ, 0, 0, nObjects)
For i = 0 To nObjects - 1
'nPoints = 0
ret = IpBlbGet(GETNUMPTS, i, 0, nPoints)
ReDim Points(nPoints) As POINTAPI
ret = IpBlbGet(GETPOINTS, i, nPoints, Points(0))
ret = IpAnCreateObj(GO_OBJ_POLY)
ret = IpAnPolyAddPtArray(Points(0), nPoints-1)
ret = IpAnSet(GO_ATTR_CONNECT,1)
Next i
ret = IpBlbDelete()
End Sub
Chris Tully
Senior Technical Services Engineer and Quality Assurance Analyst
Media Cybernetics, Inc. "From Images to Answers"
8484 Georgia Avenue, Suite 200
Silver Spring, MD 20910
Tel: +1 (301) 495-3305 ext. 3 Fax: +1 (301) 495-5964
E-mail: TechSupport@mediacy.com
Media Cybernetics Website: www.mediacy.com
Media Cybernetics Solutions Zone: www.solutions-zone.com
-----Original Message-----
From: Image-Pro Plus Users Email List
[mailto:imagepro-users@lists.mediacy.com]On Behalf Of John McLaughlin
Sent: Friday, November 30, 2001 1:00 PM
To: Image-Pro Plus Users Email List
Subject: ImagePro>using IpBlbGet(GETPOINTS)
hi all,
i've encountered a problem where if i try to take the outlines from one
image and draw them on a different image the last point of each outline is
always missing. this is the code i'm using.
ret = IpAppSelectDoc(0)
numPoints = IpBlbGet(GETPOINTS, i, 1000, Outline(0))
ret = IpAppSelectDoc(1)
ret = IpAnCreateObj(GO_OBJ_POLY)
ret = IpAnPolyAddPtArray(Outline(0), numPoints)
ret = IpAnSet(GO_ATTR_PENWIDTH, 1)
ret = IpAnSet(GO_ATTR_PENCOLOR, 255)
if i use some code to look at the points the last pair in each outline
is always 0, 0.
Debug.Print numpoints
For i = 1 To numPoints
Debug.Print Outline(i).x
Debug.Print outline(i).y
Next i
Any suggestions?
thanks,
John McLaughlin
Rigel, Inc.
240 East Grand Avenue
South San Francisco, CA
94080
***********************************************************
Need an Image-Pro macro or driver? Find it at http://www.Solutions-Zone.com
Got an Image-Pro macro or driver? Add it to http://www.Solutions-Zone.com
***********************************************************
This message is sent to you because you are subscribed to <imagepro-users@lists.mediacy.com>.
To unsubscribe, email to: <imagepro-users-off@lists.mediacy.com>
To switch to the DIGEST mode, email to <imagepro-users-digest@lists.mediacy.com>
To switch to the INDEX mode, email to <imagepro-users-index@lists.mediacy.com>
Send administrative queries to <imagepro-users-request@lists.mediacy.com>
To subscribe or unsubscribe visit http://www.solutions-zone.com/ipednld/subscriber.asp