Thanks for you reply. I have two main reasons for the floodfill thing. For one program, I need it for a picture editor, but I can't use IMAQ (hard to use) and I don't have quite all the commands. I also need to use the algorithm to tailor up a mask for a picture interface. I was also hoping to use something that doesn't require outside files (just in case it causes a computer failure, my LabVIEW doesn't seem to like them very much...). I will try the C-Code, but how would I implement it into LabVIEW? I am not very good at the DLL interface node, everytime I do it myself, I always mess up. Thanks for your help, and I look forward to your next email.
Oh, sorry, I forgot to specify the speed and other things.
I would prefer it to be a nice, fast, and simple algorithm.
Also, I need its sensitivity to be definable (4 and 8 connectivity). Sorry I forgot to say that!
Ok... It's not that hard. Just don't try to do it with recursion, that would complicate things a lot! I might want to use the algorithm myself, so I made the vi. Although it spoils your fun of making the vi, I'll post it here.
This implementation uses the naive, simple algorithm. The scanline algorithm should be much ("orders of magnitude", wikipedia) faster, but harder to implement. So simple and fast are, as often, mutualy exclusive.
I was trying to make something that would recursively follow the outline of the fill thing. Would that have worked as well? Thanks again!
By the way, I tried out the floodfill vi. It works great, but at first it seemed to have trouble coloring in a line when it got long. This was when the pixel selector was set to 8 and the line I tried to floodfill was at a 45 degree angle. It only partially colored it, then its like it got to a limit of pixels it could color in. Now it suddenly works. Maybe it was just me, but just in case, I thought you should know. Other than that, it works great! Thanks again!