Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
24 posts
|
Hello,
my plugin use a Wand method in order to get particles ROI for further processing . Some of these processing are done using IJ.run () calls, but it does not seem to be effective in results. Here is my code : // ipProcess is my source ImageProcessor containing particles // impProcess is my source ImagePlus containing particles // x and y are coordinate of my first particle WindowManager.setTempCurrentImage(impProcess); //show nothing Wand myWand = new Wand(ipProcess); myWand.autoOutline((int)x,(int)y); PolygonRoi myROI= new PolygonRoi(myWand.xpoints, myWand.ypoints,myWand.npoints, Roi.TRACED_ROI); impProcess.setRoi(myROI); IJ.run("Convex Hull"); --> do nothing ! IJ.run("Enlarge...", "enlarge=100"); --> do nothing ! Thanks |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
1631 posts
|
Hi,
On Thu, 30 Nov 2006, Eddie Iannuccelli wrote: > WindowManager.setTempCurrentImage(impProcess); //show nothing > Wand myWand = new Wand(ipProcess); myWand.autoOutline((int)x,(int)y); > PolygonRoi myROI= new PolygonRoi(myWand.xpoints, > myWand.ypoints,myWand.npoints, Roi.TRACED_ROI); > impProcess.setRoi(myROI); > IJ.run("Convex Hull"); --> do nothing ! > IJ.run("Enlarge...", "enlarge=100"); --> do nothing ! I suspect that you need to call impProcess.updateAndDraw() after IJ.run(...). Hth, Dscho |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
24 posts
|
Thanks for your response,
impProcess.updateAndDraw() still do nothing .... but if I show impProcess instead of masking it (by replacing WindowManager.setTempCurrentImage(impProcess) by impProcess.show() at the first line), it's fine ! My processing become a bit "verbose" but it does the job, I am still interested for a silent solution ... Thanks Johannes Schindelin a écrit : > Hi, > > On Thu, 30 Nov 2006, Eddie Iannuccelli wrote: > > >> WindowManager.setTempCurrentImage(impProcess); //show nothing >> Wand myWand = new Wand(ipProcess); myWand.autoOutline((int)x,(int)y); >> PolygonRoi myROI= new PolygonRoi(myWand.xpoints, >> myWand.ypoints,myWand.npoints, Roi.TRACED_ROI); >> impProcess.setRoi(myROI); >> IJ.run("Convex Hull"); --> do nothing ! >> IJ.run("Enlarge...", "enlarge=100"); --> do nothing ! >> > > I suspect that you need to call impProcess.updateAndDraw() after > IJ.run(...). > > Hth, > Dscho > > ... [show rest of quote]
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
24 posts
|
In reply to this post by Eddie Iannuccelli
Wayne,
you are right but it still does not "Convex Hull" or "enlarge" my roi when using setTempCurrentImage. Everything is ok when ImagePlus is shown . Here is there new snippet (ipProcess is impProcess imageProcessor): WindowManager.setTempCurrentImage(impProcess); //impProcess.show(); IJ.doWand((int)x,(int)y); IJ.run("Convex Hull"); IJ.run("Enlarge...", "enlarge=" + EXTENSION); PolygonRoi myROI= (PolygonRoi) impProcess.getRoi(); ipProcess.setValue(128); ipProcess.fillPolygon(myROI.getPolygon()); ipMask=impProcess.getMask(); ... Thanks Rasband, Wayne (NIH/NIMH) [E] a écrit : >> Hello, >> my plugin use a Wand method in order to get particles ROI for further processing . >> Some of these processing are done using IJ.run () calls, but it does not seem to be >> effective in results. Here is my code : >> > > >> // ipProcess is my source ImageProcessor containing particles >> // impProcess is my source ImagePlus containing particles >> // x and y are coordinate of my first particle >> > > >> WindowManager.setTempCurrentImage(impProcess); //show nothing >> Wand myWand = new Wand(ipProcess); myWand.autoOutline((int)x,(int)y); >> PolygonRoi myROI= new PolygonRoi(myWand.xpoints, myWand.ypoints,myWand.npoints, Roi.TRACED_ROI); >> impProcess.setRoi(myROI); >> IJ.run("Convex Hull"); --> do nothing ! >> IJ.run("Enlarge...", "enlarge=100"); --> do nothing ! >> > > This code seems to work okay and is simpler and easier to understand. > > IJ.doWand(x, y); > IJ.run("Convex Hull"); > IJ.run("Enlarge...", "enlarge=100"); > > -wayne > ... [show rest of quote]
|
Free forum by Nabble | Disable Popup Ads | Edit this page |