The image data is always a reference to an image in memory. Even if you branch the wire, you still have only one version of the image in memory. Any vi that modifies the image will modify the only copy that exists. You can get a big headache if you run an analysis routine parallel with a modification routine. You never know which will happen first, so you don't know if your analysis is of the original image or the modified image.
The solution is to use IMAQ copy to duplicate the image, or feed a different image in as the destination image for your processing.
I typically use several images at a time. I have Original, Processed, and Display. I copy Original to Processed during the first step of the analysis. When I am all done processing, I copy Processed to Display and show it on the screen. If I don't do this, the display often shows a half processed version of the next image instead of the completed version of the previous image. It can cause a lot of flickering on the display.
You don't have to free (dispose) all your images at the end of your program. If you allocated a large number of images, it is a good idea to free them. If you don't free them, they will be reused the next time you run the program. IMAQ create will just use the existing image if the name matches. This lets you view your image after the program has stopped. I guess my policy would be to always free any undisplayed images, and leave freeing the displayed images as a decision to be made for each program.
Bruce
Bruce Ammons
Ammons Engineering