Søren, Why wouldn't you allocate a 'zorder' to each mask, corresponding to a layer nb. That way, if a same pixel is shared by 2 masks or more, you take the one with the highest zorder. That could be done as easily as definind a `maskstack` list, with element `i` the mask with zorder `i`. Now, the global mask is simply np.logical_or.reduce(maskstack). That way, you could leave any masked data in the original dataset alone and not mix it with your stack of patches. Let me know how it goes.
On Wednesday 29 October 2008 21:10:34 Søren Nielsen wrote: > Hi, > > I'm making a masking function that can mask out certain areas of an image > using different types of masks, and display them using patches. I want to > add a function where a user can move a mask that has already been created. > > I can use the picker = True to have it return the patch being clicked on.. > but how do I know which mask was clicked on if I have two identical masks? > or even worse, if I have two identical masks almost lying ontop of each > other.. returning both patches at the same time?? I've tried different > things using == to compare.. but that didn't work.. any suggestions?? > > Soren ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users