02-22-2011 04:09 PM
Brian,
I do not have an answer to your question, but I noticed something else which you may wish to consider. The use of Build Array inside the for loops which generate the XY Graphs cause frequent memory reallocations and slow down the program dramatically. I replaced those with Initialized Arrays and Replace Array Subset and then split the resulting arrays to get the pieces with replaced data after the for loop. The time to execute the program dropped from about 20 minutes to a few seconds. You should do something similar in the Duplicate Mask N times loop, although because N is small, it is not so much of an issue there.
I am including an image of the changes I made. The two for loops are identical. The upper one shows the True case while the lower one shows the False case. This could be made into a subVI since it is used more than once.
Lynn
02-23-2011 07:17 AM
Thanks for that memory suggestion. After things were accurate, I was going to tackle the memory issues.
02-23-2011 06:06 PM - edited 02-23-2011 06:06 PM
I won't vouch for absolute mathematical certainty, but as long as the graph is reasonably large, my old friend the 1-bit pixmap can be used to find enclosed points. I have attached a couple of VIs, not fully cleaned up, but functional. If I cared about the points near the origin I would create the picture from the individual masks (note the regions are connected), does not matter with the points you show as typical data.
Note: I only show the enclosed points, you can change the format of the points if you want to show multiple plots.