Hi:
I've working on a subVI in which circles are drawn on an existing intensity graph in order to demarcate regions of the intensity graph. A mouse click on a region should result in a filled region (selection) overlay, and a subsequent click on the same region should result in unfilling the region (deselection). I have created a VI to do this (at least the selection portion), but the method I am using requires repeated circular draws using the 'Draw Oval' command from the picture control pallette. The drawn oval is then transferred to an intensity graph using the 'Plot Images.Front' property node. The number of circles drawn is based on the value of the 'Levels' control. I have not fully completed the deselection procedure yet, but can demonstrate it below.
If you would like to run the attached VI, mouse click inside the second circular region, and you can see the fill. Mouse click on the same region again, and a deselection will occur. The VI is somewhat complicated in terms of calculations for the circles, but in looking at the code, mainly see the "FFT: Mouse Down" case and you will see how this works.
I am wondering if there is a better (faster) way to do this using picture control mask function. The container does not necessarily have to be the intensity graph (it can be the picture control), but I have mostly standardized on the intensity graph due to the massive number of property nodes that are available for that container. But even using the mask function to develop the overlay concept, I have a question about how quickly the mask is generated - remember that the number of levels selected will change the nature of the overlay.
Any strategy ideas would be quite helpful. Additionally, a way to provide some transparency to the overlay would be interesting such as one can do with the 'PlotImages.Middle' property node available for waveform graphs.
Thanks,
Don