All,
I put this into some Java code that first creates a Stack and inserts it into an ImagePlus object. but, say I had more than 1 Stack/ImagePlus combo, how does IJ.run("Abs", "stack") know which stack to use? David Webster |
> I put this into some Java code that first creates a Stack
> and inserts it into an ImagePlus object. but, say I had more > than 1 Stack/ImagePlus combo, how does IJ.run("Abs", > "stack") know which stack to use? Use the version of the run method that takes an ImagePlus object as an argument, for example IJ.run(imp, "Abs", "stack"); -wayne |
Wayne,
If I wanted to do this with a specific ImageProcessor or ImageStack object, would I then just use appropriate object name? David On Sun, Oct 4, 2009 at 4:01 PM, Wayne Rasband <[hidden email]> wrote: > > I put this into some Java code that first creates a Stack > > and inserts it into an ImagePlus object. but, say I had more > > than 1 Stack/ImagePlus combo, how does IJ.run("Abs", > > "stack") know which stack to use? > > Use the version of the run method that takes an ImagePlus object as an > argument, for example > > IJ.run(imp, "Abs", "stack"); > > -wayne > |
Hi david,
I´m not sure what you refer to as "name"?!: if you are talking of Java objects, imp is the "name" to the respective ImagePlus here (or to be more exact, a variable that holds a reference to it) On the macro level, (which can also apply to Java "objects"), each image (ImagePlus) has also a numerical id to identify it or you can search for the "title" of the "image" (which is not necessarily unique) Also, in the case you do not specify any imp/id, there is always an "active", resp. "current" or topmost image that IJ will use. Cheers Mit freundlichen Grüßen / Best regards Leica Microsystems CMS GmbH | GmbH mit Sitz in Wetzlar | Amtsgericht Wetzlar HRB 2432 Geschäftsführer: Dr. Stefan Traeger | Dr. Wolf-Otto Reuter | Dr. David Roy Martyr | Colin Davis www.leica-microsystems.com David Webster <dwwebster00@GMAI L.COM> An Gesendet von: [hidden email] ImageJ Interest Kopie Group <[hidden email]. Thema GOV> Re: IJ.run("Abs", "stack") 05.10.2009 02:36 Bitte antworten an ImageJ Interest Group <[hidden email]. GOV> Wayne, If I wanted to do this with a specific ImageProcessor or ImageStack object, would I then just use appropriate object name? David On Sun, Oct 4, 2009 at 4:01 PM, Wayne Rasband <[hidden email]> wrote: > > I put this into some Java code that first creates a Stack > > and inserts it into an ImagePlus object. but, say I had more > > than 1 Stack/ImagePlus combo, how does IJ.run("Abs", > > "stack") know which stack to use? > > Use the version of the run method that takes an ImagePlus object as an > argument, for example > > IJ.run(imp, "Abs", "stack"); > > -wayne > ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |
I think the problem I was having was that I migrqted my Java code from the
macro recorder and the macro documentation doesn'r show inputting an ImagePlus object as an option. When I broke down and read the API documentation, I saw that option. Thanks to all David Webster On Wed, Oct 7, 2009 at 6:50 AM, Joachim Wesner < [hidden email]> wrote: > Hi david, > > I´m not sure what you refer to as "name"?!: > > if you are talking of Java objects, imp is the "name" to the respective > ImagePlus here (or to be more exact, a variable that holds a reference to > it) > > On the macro level, (which can also apply to Java "objects"), each image > (ImagePlus) has also a numerical id to identify it or you can search for > the "title" of the > "image" (which is not necessarily unique) > > Also, in the case you do not specify any imp/id, there is always an > "active", resp. "current" or topmost image that IJ will use. > > Cheers > > Mit freundlichen Grüßen / Best regards > > Leica Microsystems CMS GmbH | GmbH mit Sitz in Wetzlar | Amtsgericht > Wetzlar HRB 2432 > Geschäftsführer: Dr. Stefan Traeger | Dr. Wolf-Otto Reuter | Dr. David Roy > Martyr | Colin Davis > www.leica-microsystems.com > > > > > David Webster > <dwwebster00@GMAI > L.COM <http://l.com/>> > An > Gesendet von: [hidden email] > ImageJ Interest Kopie > Group > <[hidden email]. Thema > GOV> Re: IJ.run("Abs", "stack") > > > 05.10.2009 02:36 > > > Bitte antworten > an > ImageJ Interest > Group > <[hidden email]. > GOV> > > > > > > > Wayne, > > If I wanted to do this with a specific ImageProcessor or ImageStack object, > would I then just use appropriate object name? > > David > > On Sun, Oct 4, 2009 at 4:01 PM, Wayne Rasband <[hidden email]> wrote: > > > > I put this into some Java code that first creates a Stack > > > and inserts it into an ImagePlus object. but, say I had more > > > than 1 Stack/ImagePlus combo, how does IJ.run("Abs", > > > "stack") know which stack to use? > > > > Use the version of the run method that takes an ImagePlus object as an > > argument, for example > > > > IJ.run(imp, "Abs", "stack"); > > > > -wayne > > > > > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > |
Free forum by Nabble | Edit this page |