Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Challenging:How can I COMBINE two CWIMAQPoints Collection in one - URGENT

I have two CWIMAQPoints collections and I want to combine them in one CWIMAQPoints in order to pass it as an argument to another function.
In order to do this I would like to avoid using a loop in where I would add each item one-by-one.

I would appreciate any help.
Iraklis
0 Kudos
Message 1 of 3
(3,211 Views)
There is definetly not an easy way to go about doing this in one step. This would require accessing with memory directly and using the windows API. Here is a good link to using pointers and memory allocation in VB. This should help you get started in the right direction. http://www.codeproject.com/useritems/how_to_do_pointers_in_visual_basic.asp

Also if you would like to do it point by point, you can use this function.

Private Function Concatenate(pointsA As CWIMAQPoints, pointsB As CWIMAQPoints)
Dim counter As Integer
Dim counter2 As Integer
counter2 = pointsA.Count + 1
pointsA.Add pointsB.Count
For counter = 1 To pointsB.Count
pointsB(counter).CopyTo pointsA(counter2)
counter2 = counter2 + 1
Next counter
End Functi
on
0 Kudos
Message 2 of 3
(3,211 Views)
Thank you for replying in my post.

Please take a look in my next post where I explain why I need this joint and if there is a way of avoiding it.

NEXT POST--->"Problem if using multi-concentric Annulus Region with CWIMAQVision.SPOKE -(follows previous post)URGENT"

Iraklis
0 Kudos
Message 3 of 3
(3,211 Views)