Login  Register

Re: magic wand

Posted by Giorgio Cadoro on May 26, 2009; 7:25pm
URL: http://imagej.273.s1.nabble.com/magic-wand-tp3692147p3692159.html

There is this tools  based on wand
http://imagejdocu.tudor.lu/doku.php?id=plugin:segmentation:yawi_2d:start
, and we are currently working on a new plugin based on the grow from
initial selection.


Example:
Grow(int indexOfSeed,byte[] srcImage, ArrayList<Integer>
visitedPixel,boolean []bVisitedPixel){
                  Stack<Integer> stckPixel = new Stack<Integer>();
                        stckPixel.push(index of seed);
                        bVisitedPixel[ndex of seed]=true;
                        while(! stckPixel.empty()){
                                int pxSrc = stckPixel.pop();
                                ArrayList<Integer> Ad=NEIGHBORPIXEL(8|4);
                                for (int px : Ad){
                                                int srcByte = srcImage[px] & 0xff;
                                                if( !bVisitedPixel[px] && ( srcByte>=minThreshold &&
srcByte<=maxThreshold)
                                                        stckPixel.push(px);
                                                        Al.add(px);
                                                        }
                                }
                }
Cadoro Giorgio

2009/5/26 David Knecht <[hidden email]>:

> Is there an equivalent in ImageJ to using the magic wand in Photoshop?  In
> PS you can set the wand tolerance so you are not limited to single pixel
> value and after initial selection you can use the "grow" or "similar" to
> enlarge the selection.  Dave
>
> Dr. David Knecht
> Department of Molecular and Cell Biology
> Co-head Flow Cytometry and Confocal Microscopy Facility
> U-3125
> 91 N. Eagleville Rd.
> University of Connecticut
> Storrs, CT 06269
> 860-486-2200
> 860-486-4331 (fax)
>