Hello group,
does anyone know of way to (re-)compile all other plugins within the <ImageJ>/plugins/ directory? Any hints appreciated... --Wilhelm -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Wilhelm,
> does anyone know of way to (re-)compile all other plugins within the > <ImageJ>/plugins/ directory? Any hints appreciated... Presumably you have the source code for all such plugins in the plugins folder? You say "all other plugins" -- does that mean you want to recompile the other plugins from within a plugin of your own, at runtime? Or would it be sufficient to use something like "javac -cp '../jars/*' *.java" on the command line from the plugins folder? Regards, Curtis P.S. If externally recompiling is sufficient, but you don't like the command line, you could create an IDE project around your ImageJ folder, setting your plugins folder as the source folder, and all JARs in the jars folder as dependencies. On Tue, Jun 25, 2013 at 1:52 AM, Burger Wilhelm < [hidden email]> wrote: > Hello group, > > does anyone know of way to (re-)compile all other plugins within the > <ImageJ>/plugins/ directory? Any hints appreciated... > > --Wilhelm > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hello Curtis,
yes, the assumption is that I have a set of plugin source-files (.java) placed in multiple folders inside the 'plugins' folder. I thought of a command "Compile all..." command (similar to "Compile and run..") that simply compiles all these source files but does not run anything. Of course I guess one could also run javac from the command line. My IDE (Eclipse) is actually part of the problem. I wanted to distribute a structured set of plugins with .java and .class files side-by-side. My Eclipse project is already rooted at the ImageJ's plugins folder, each inner folder in 'plugins' is a source folder which is its own output folder - thereby .java and compiled .class files come to lie together, just as I want. However, since ImageJ plugins are not supposed to reside in packages - Eclipse cannot export these source folders to a JAR file other than as a flat container (removing all sub-folders). So I thought I let Eclipse only generate the source tree and then run the compiler over it with that intended ImageJ command. Weird idea? Thanks much for the hints, I think I'll try the command line approach now... --Wilhelm ________________________________________ From: ImageJ Interest Group [[hidden email]] On Behalf Of Curtis Rueden [[hidden email]] Sent: Tuesday, June 25, 2013 17:33 To: [hidden email] Subject: Re: Plugin for compiling all plugins? Hi Wilhelm, > does anyone know of way to (re-)compile all other plugins within the > <ImageJ>/plugins/ directory? Any hints appreciated... Presumably you have the source code for all such plugins in the plugins folder? You say "all other plugins" -- does that mean you want to recompile the other plugins from within a plugin of your own, at runtime? Or would it be sufficient to use something like "javac -cp '../jars/*' *.java" on the command line from the plugins folder? Regards, Curtis P.S. If externally recompiling is sufficient, but you don't like the command line, you could create an IDE project around your ImageJ folder, setting your plugins folder as the source folder, and all JARs in the jars folder as dependencies. On Tue, Jun 25, 2013 at 1:52 AM, Burger Wilhelm < [hidden email]> wrote: > Hello group, > > does anyone know of way to (re-)compile all other plugins within the > <ImageJ>/plugins/ directory? Any hints appreciated... > > --Wilhelm > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Wilhelm,
> ImageJ plugins are not supposed to reside in packages Why not? As long as you have a plugins.config defining which classes are plugins, they can live in packages, and they do not need an underscore in the name. Perhaps that would make your life easier? Regards, Curtis On Tue, Jun 25, 2013 at 12:50 PM, Burger Wilhelm < [hidden email]> wrote: > Hello Curtis, > > yes, the assumption is that I have a set of plugin source-files (.java) > placed in multiple folders inside the 'plugins' folder. I thought of a > command "Compile all..." command (similar to "Compile and run..") that > simply compiles all these source files but does not run anything. Of course > I guess one could also run javac from the command line. > > My IDE (Eclipse) is actually part of the problem. I wanted to distribute a > structured set of plugins with .java and .class files side-by-side. My > Eclipse project is already rooted at the ImageJ's plugins folder, each > inner folder in 'plugins' is a source folder which is its own output folder > - thereby .java and compiled .class files come to lie together, just as I > want. However, since ImageJ plugins are not supposed to reside in packages > - Eclipse cannot export these source folders to a JAR file other than as a > flat container (removing all sub-folders). So I thought I let Eclipse only > generate the source tree and then run the compiler over it with that > intended ImageJ command. Weird idea? > > Thanks much for the hints, I think I'll try the command line approach > now... > > --Wilhelm > > ________________________________________ > From: ImageJ Interest Group [[hidden email]] On Behalf Of Curtis > Rueden [[hidden email]] > Sent: Tuesday, June 25, 2013 17:33 > To: [hidden email] > Subject: Re: Plugin for compiling all plugins? > > Hi Wilhelm, > > > does anyone know of way to (re-)compile all other plugins within the > > <ImageJ>/plugins/ directory? Any hints appreciated... > > Presumably you have the source code for all such plugins in the plugins > folder? > > You say "all other plugins" -- does that mean you want to recompile the > other plugins from within a plugin of your own, at runtime? Or would it be > sufficient to use something like "javac -cp '../jars/*' *.java" on the > command line from the plugins folder? > > Regards, > Curtis > > P.S. If externally recompiling is sufficient, but you don't like the > command line, you could create an IDE project around your ImageJ folder, > setting your plugins folder as the source folder, and all JARs in the jars > folder as dependencies. > > > On Tue, Jun 25, 2013 at 1:52 AM, Burger Wilhelm < > [hidden email]> wrote: > > > Hello group, > > > > does anyone know of way to (re-)compile all other plugins within the > > <ImageJ>/plugins/ directory? Any hints appreciated... > > > > --Wilhelm > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
AH, I was not aware that this was possible! Can plugins with packages also be used if the code is not contained in a JAR file? Can they be re-compiled on demand, re-loaded and executed?
--Wilhelm ________________________________ From: [hidden email] [[hidden email]] On Behalf Of Curtis Rueden [[hidden email]] Sent: Tuesday, June 25, 2013 20:52 To: Burger Wilhelm Cc: [hidden email] Subject: Re: Plugin for compiling all plugins? Hi Wilhelm, > ImageJ plugins are not supposed to reside in packages Why not? As long as you have a plugins.config defining which classes are plugins, they can live in packages, and they do not need an underscore in the name. Perhaps that would make your life easier? Regards, Curtis On Tue, Jun 25, 2013 at 12:50 PM, Burger Wilhelm <[hidden email]<mailto:[hidden email]>> wrote: Hello Curtis, yes, the assumption is that I have a set of plugin source-files (.java) placed in multiple folders inside the 'plugins' folder. I thought of a command "Compile all..." command (similar to "Compile and run..") that simply compiles all these source files but does not run anything. Of course I guess one could also run javac from the command line. My IDE (Eclipse) is actually part of the problem. I wanted to distribute a structured set of plugins with .java and .class files side-by-side. My Eclipse project is already rooted at the ImageJ's plugins folder, each inner folder in 'plugins' is a source folder which is its own output folder - thereby .java and compiled .class files come to lie together, just as I want. However, since ImageJ plugins are not supposed to reside in packages - Eclipse cannot export these source folders to a JAR file other than as a flat container (removing all sub-folders). So I thought I let Eclipse only generate the source tree and then run the compiler over it with that intended ImageJ command. Weird idea? Thanks much for the hints, I think I'll try the command line approach now... --Wilhelm ________________________________________ From: ImageJ Interest Group [[hidden email]<mailto:[hidden email]>] On Behalf Of Curtis Rueden [[hidden email]<mailto:[hidden email]>] Sent: Tuesday, June 25, 2013 17:33 To: [hidden email]<mailto:[hidden email]> Subject: Re: Plugin for compiling all plugins? Hi Wilhelm, > does anyone know of way to (re-)compile all other plugins within the > <ImageJ>/plugins/ directory? Any hints appreciated... Presumably you have the source code for all such plugins in the plugins folder? You say "all other plugins" -- does that mean you want to recompile the other plugins from within a plugin of your own, at runtime? Or would it be sufficient to use something like "javac -cp '../jars/*' *.java" on the command line from the plugins folder? Regards, Curtis P.S. If externally recompiling is sufficient, but you don't like the command line, you could create an IDE project around your ImageJ folder, setting your plugins folder as the source folder, and all JARs in the jars folder as dependencies. On Tue, Jun 25, 2013 at 1:52 AM, Burger Wilhelm < [hidden email]<mailto:[hidden email]>> wrote: > Hello group, > > does anyone know of way to (re-)compile all other plugins within the > <ImageJ>/plugins/ directory? Any hints appreciated... > > --Wilhelm > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Wilhelm,
> Can plugins with packages also be used if the code is not contained in > a JAR file? Can they be re-compiled on demand, re-loaded and executed? Sure, give it a try. Just make sure the class name has an underscore in that case. It will be in a submenu named after the package. If you have any trouble with it, let us know. Regards, Curtis On Tue, Jun 25, 2013 at 2:17 PM, Burger Wilhelm < [hidden email]> wrote: > AH, I was not aware that this was possible! Can plugins with > packages also be used if the code is not contained in a JAR file? Can they > be re-compiled on demand, re-loaded and executed? > > --Wilhelm > > > ------------------------------ > *From:* [hidden email] [[hidden email]] On Behalf Of > Curtis Rueden [[hidden email]] > *Sent:* Tuesday, June 25, 2013 20:52 > *To:* Burger Wilhelm > *Cc:* [hidden email] > > *Subject:* Re: Plugin for compiling all plugins? > > Hi Wilhelm, > > > ImageJ plugins are not supposed to reside in packages > > Why not? As long as you have a plugins.config defining which classes are > plugins, they can live in packages, and they do not need an underscore in > the name. Perhaps that would make your life easier? > > Regards, > Curtis > > > On Tue, Jun 25, 2013 at 12:50 PM, Burger Wilhelm < > [hidden email]> wrote: > >> Hello Curtis, >> >> yes, the assumption is that I have a set of plugin source-files (.java) >> placed in multiple folders inside the 'plugins' folder. I thought of a >> command "Compile all..." command (similar to "Compile and run..") that >> simply compiles all these source files but does not run anything. Of course >> I guess one could also run javac from the command line. >> >> My IDE (Eclipse) is actually part of the problem. I wanted to distribute >> a structured set of plugins with .java and .class files side-by-side. My >> Eclipse project is already rooted at the ImageJ's plugins folder, each >> inner folder in 'plugins' is a source folder which is its own output folder >> - thereby .java and compiled .class files come to lie together, just as I >> want. However, since ImageJ plugins are not supposed to reside in packages >> - Eclipse cannot export these source folders to a JAR file other than as a >> flat container (removing all sub-folders). So I thought I let Eclipse only >> generate the source tree and then run the compiler over it with that >> intended ImageJ command. Weird idea? >> >> Thanks much for the hints, I think I'll try the command line approach >> now... >> >> --Wilhelm >> >> ________________________________________ >> From: ImageJ Interest Group [[hidden email]] On Behalf Of Curtis >> Rueden [[hidden email]] >> Sent: Tuesday, June 25, 2013 17:33 >> To: [hidden email] >> Subject: Re: Plugin for compiling all plugins? >> >> Hi Wilhelm, >> >> > does anyone know of way to (re-)compile all other plugins within the >> > <ImageJ>/plugins/ directory? Any hints appreciated... >> >> Presumably you have the source code for all such plugins in the plugins >> folder? >> >> You say "all other plugins" -- does that mean you want to recompile the >> other plugins from within a plugin of your own, at runtime? Or would it be >> sufficient to use something like "javac -cp '../jars/*' *.java" on the >> command line from the plugins folder? >> >> Regards, >> Curtis >> >> P.S. If externally recompiling is sufficient, but you don't like the >> command line, you could create an IDE project around your ImageJ folder, >> setting your plugins folder as the source folder, and all JARs in the jars >> folder as dependencies. >> >> >> On Tue, Jun 25, 2013 at 1:52 AM, Burger Wilhelm < >> [hidden email]> wrote: >> >> > Hello group, >> > >> > does anyone know of way to (re-)compile all other plugins within the >> > <ImageJ>/plugins/ directory? Any hints appreciated... >> > >> > --Wilhelm >> > >> > -- >> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hello Curtis,
thanks - so I did! I set up a plugin 'My_Inverter' in package 'p1' (in <ImageJ>/plugins/p1/My_Inverter.java), pre-compiled by Eclipse to p1/My_Inverter.class. After launching IJ, the subfolder p1 correctly appears in the plugins menu and the plugin executes flawlessly. However, when I try a 'Compile and Run..' (either the .java or the .class file) I get the following error: ------------------------------------------- Plugin or class not found: "My_Inverter" (java.lang.NoClassDefFoundError: My_Inverter (wrong name: p1/My_Inverter)) ------------------------------------------- Actually this is the behavior I remember. Could this be a class-loader problem? --Wilhelm ________________________________ From: [hidden email] [[hidden email]] On Behalf Of Curtis Rueden [[hidden email]] Sent: Tuesday, June 25, 2013 23:55 To: Burger Wilhelm Cc: ImageJ Interest Group Subject: Re: Plugin for compiling all plugins? Hi Wilhelm, > Can plugins with packages also be used if the code is not contained in > a JAR file? Can they be re-compiled on demand, re-loaded and executed? Sure, give it a try. Just make sure the class name has an underscore in that case. It will be in a submenu named after the package. If you have any trouble with it, let us know. Regards, Curtis On Tue, Jun 25, 2013 at 2:17 PM, Burger Wilhelm <[hidden email]<mailto:[hidden email]>> wrote: AH, I was not aware that this was possible! Can plugins with packages also be used if the code is not contained in a JAR file? Can they be re-compiled on demand, re-loaded and executed? --Wilhelm ________________________________ From: [hidden email]<mailto:[hidden email]> [[hidden email]<mailto:[hidden email]>] On Behalf Of Curtis Rueden [[hidden email]<mailto:[hidden email]>] Sent: Tuesday, June 25, 2013 20:52 To: Burger Wilhelm Cc: [hidden email]<mailto:[hidden email]> Subject: Re: Plugin for compiling all plugins? Hi Wilhelm, > ImageJ plugins are not supposed to reside in packages Why not? As long as you have a plugins.config defining which classes are plugins, they can live in packages, and they do not need an underscore in the name. Perhaps that would make your life easier? Regards, Curtis On Tue, Jun 25, 2013 at 12:50 PM, Burger Wilhelm <[hidden email]<mailto:[hidden email]>> wrote: Hello Curtis, yes, the assumption is that I have a set of plugin source-files (.java) placed in multiple folders inside the 'plugins' folder. I thought of a command "Compile all..." command (similar to "Compile and run..") that simply compiles all these source files but does not run anything. Of course I guess one could also run javac from the command line. My IDE (Eclipse) is actually part of the problem. I wanted to distribute a structured set of plugins with .java and .class files side-by-side. My Eclipse project is already rooted at the ImageJ's plugins folder, each inner folder in 'plugins' is a source folder which is its own output folder - thereby .java and compiled .class files come to lie together, just as I want. However, since ImageJ plugins are not supposed to reside in packages - Eclipse cannot export these source folders to a JAR file other than as a flat container (removing all sub-folders). So I thought I let Eclipse only generate the source tree and then run the compiler over it with that intended ImageJ command. Weird idea? Thanks much for the hints, I think I'll try the command line approach now... --Wilhelm ________________________________________ From: ImageJ Interest Group [[hidden email]<mailto:[hidden email]>] On Behalf Of Curtis Rueden [[hidden email]<mailto:[hidden email]>] Sent: Tuesday, June 25, 2013 17:33 To: [hidden email]<mailto:[hidden email]> Subject: Re: Plugin for compiling all plugins? Hi Wilhelm, > does anyone know of way to (re-)compile all other plugins within the > <ImageJ>/plugins/ directory? Any hints appreciated... Presumably you have the source code for all such plugins in the plugins folder? You say "all other plugins" -- does that mean you want to recompile the other plugins from within a plugin of your own, at runtime? Or would it be sufficient to use something like "javac -cp '../jars/*' *.java" on the command line from the plugins folder? Regards, Curtis P.S. If externally recompiling is sufficient, but you don't like the command line, you could create an IDE project around your ImageJ folder, setting your plugins folder as the source folder, and all JARs in the jars folder as dependencies. On Tue, Jun 25, 2013 at 1:52 AM, Burger Wilhelm < [hidden email]<mailto:[hidden email]>> wrote: > Hello group, > > does anyone know of way to (re-)compile all other plugins within the > <ImageJ>/plugins/ directory? Any hints appreciated... > > --Wilhelm > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Wilhelm,
ImageJ Compile&Run only works for plugins that are not in a package. If you compile the plugin externally (Eclipse or whatever) and make a jar with an appropriate plugins.config, you can have plugins in a package. Michael ________________________________________________________________ On Jun 26, 2013, at 09:28, Burger Wilhelm wrote: > Hello Curtis, > > thanks - so I did! I set up a plugin 'My_Inverter' in package 'p1' (in <ImageJ>/plugins/p1/My_Inverter.java), pre-compiled by Eclipse to p1/My_Inverter.class. > > After launching IJ, the subfolder p1 correctly appears in the plugins menu and the plugin executes flawlessly. However, when I try a 'Compile and Run..' (either the .java or the .class file) I get the following error: > > ------------------------------------------- > Plugin or class not found: "My_Inverter" > (java.lang.NoClassDefFoundError: My_Inverter (wrong name: p1/My_Inverter)) > ------------------------------------------- > > Actually this is the behavior I remember. Could this be a class-loader problem? > > --Wilhelm > > ________________________________ > From: [hidden email] [[hidden email]] On Behalf Of Curtis Rueden [[hidden email]] > Sent: Tuesday, June 25, 2013 23:55 > To: Burger Wilhelm > Cc: ImageJ Interest Group > Subject: Re: Plugin for compiling all plugins? > > Hi Wilhelm, > >> Can plugins with packages also be used if the code is not contained in >> a JAR file? Can they be re-compiled on demand, re-loaded and executed? > > Sure, give it a try. Just make sure the class name has an underscore in that case. It will be in a submenu named after the package. > > If you have any trouble with it, let us know. > > Regards, > Curtis > > > On Tue, Jun 25, 2013 at 2:17 PM, Burger Wilhelm <[hidden email]<mailto:[hidden email]>> wrote: > AH, I was not aware that this was possible! Can plugins with packages also be used if the code is not contained in a JAR file? Can they be re-compiled on demand, re-loaded and executed? > > --Wilhelm > > > ________________________________ > From: [hidden email]<mailto:[hidden email]> [[hidden email]<mailto:[hidden email]>] On Behalf Of Curtis Rueden [[hidden email]<mailto:[hidden email]>] > Sent: Tuesday, June 25, 2013 20:52 > To: Burger Wilhelm > Cc: [hidden email]<mailto:[hidden email]> > > Subject: Re: Plugin for compiling all plugins? > > Hi Wilhelm, > >> ImageJ plugins are not supposed to reside in packages > > Why not? As long as you have a plugins.config defining which classes are plugins, they can live in packages, and they do not need an underscore in the name. Perhaps that would make your life easier? > > Regards, > Curtis > > > On Tue, Jun 25, 2013 at 12:50 PM, Burger Wilhelm <[hidden email]<mailto:[hidden email]>> wrote: > Hello Curtis, > > yes, the assumption is that I have a set of plugin source-files (.java) placed in multiple folders inside the 'plugins' folder. I thought of a command "Compile all..." command (similar to "Compile and run..") that simply compiles all these source files but does not run anything. Of course I guess one could also run javac from the command line. > > My IDE (Eclipse) is actually part of the problem. I wanted to distribute a structured set of plugins with .java and .class files side-by-side. My Eclipse project is already rooted at the ImageJ's plugins folder, each inner folder in 'plugins' is a source folder which is its own output folder - thereby .java and compiled .class files come to lie together, just as I want. However, since ImageJ plugins are not supposed to reside in packages - Eclipse cannot export these source folders to a JAR file other than as a flat container (removing all sub-folders). So I thought I let Eclipse only generate the source tree and then run the compiler over it with that intended ImageJ command. Weird idea? > > Thanks much for the hints, I think I'll try the command line approach now... > > --Wilhelm > > ________________________________________ > From: ImageJ Interest Group [[hidden email]<mailto:[hidden email]>] On Behalf Of Curtis Rueden [[hidden email]<mailto:[hidden email]>] > Sent: Tuesday, June 25, 2013 17:33 > To: [hidden email]<mailto:[hidden email]> > Subject: Re: Plugin for compiling all plugins? > > Hi Wilhelm, > >> does anyone know of way to (re-)compile all other plugins within the >> <ImageJ>/plugins/ directory? Any hints appreciated... > > Presumably you have the source code for all such plugins in the plugins > folder? > > You say "all other plugins" -- does that mean you want to recompile the > other plugins from within a plugin of your own, at runtime? Or would it be > sufficient to use something like "javac -cp '../jars/*' *.java" on the > command line from the plugins folder? > > Regards, > Curtis > > P.S. If externally recompiling is sufficient, but you don't like the > command line, you could create an IDE project around your ImageJ folder, > setting your plugins folder as the source folder, and all JARs in the jars > folder as dependencies. > > > On Tue, Jun 25, 2013 at 1:52 AM, Burger Wilhelm < > [hidden email]<mailto:[hidden email]>> wrote: > >> Hello group, >> >> does anyone know of way to (re-)compile all other plugins within the >> <ImageJ>/plugins/ directory? Any hints appreciated... >> >> --Wilhelm >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Burger Wilhelm
Dear List,
in ImageJ (1.47q) I saved a 16bit TIF image with a Color-LUT. Problem: The LUT will not be stored in the file. Is the a something I can fix with configuration settings, is this feature not supported in ImageJ or is this not an option in the TIF format? Peter -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Michael Schmid
Thanks, Michael!
> ImageJ Compile&Run only works for plugins that are not in a package. Just wondering: is this a bug or a necessary feature? --Wilhelm > -----Original Message----- > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of > Michael Schmid > Sent: Wednesday, June 26, 2013 10:16 AM > To: [hidden email] > Subject: Re: Plugin for compiling all plugins? > > Hi Wilhelm, > > ImageJ Compile&Run only works for plugins that are not in a package. > > If you compile the plugin externally (Eclipse or whatever) and make a jar with > an appropriate plugins.config, you can have plugins in a package. > > Michael > __________________________________________________________ > ______ > On Jun 26, 2013, at 09:28, Burger Wilhelm wrote: > > > Hello Curtis, > > > > thanks - so I did! I set up a plugin 'My_Inverter' in package 'p1' (in > <ImageJ>/plugins/p1/My_Inverter.java), pre-compiled by Eclipse to > p1/My_Inverter.class. > > > > After launching IJ, the subfolder p1 correctly appears in the plugins menu > and the plugin executes flawlessly. However, when I try a 'Compile and Run..' > (either the .java or the .class file) I get the following error: > > > > ------------------------------------------- > > Plugin or class not found: "My_Inverter" > > (java.lang.NoClassDefFoundError: My_Inverter (wrong name: > p1/My_Inverter)) > > ------------------------------------------- > > > > Actually this is the behavior I remember. Could this be a class-loader > problem? > > > > --Wilhelm > > > > ________________________________ > > From: [hidden email] [[hidden email]] On Behalf Of > Curtis Rueden [[hidden email]] > > Sent: Tuesday, June 25, 2013 23:55 > > To: Burger Wilhelm > > Cc: ImageJ Interest Group > > Subject: Re: Plugin for compiling all plugins? > > > > Hi Wilhelm, > > > >> Can plugins with packages also be used if the code is not contained in > >> a JAR file? Can they be re-compiled on demand, re-loaded and executed? > > > > Sure, give it a try. Just make sure the class name has an underscore in that > case. It will be in a submenu named after the package. > > > > If you have any trouble with it, let us know. > > > > Regards, > > Curtis > > > > > > On Tue, Jun 25, 2013 at 2:17 PM, Burger Wilhelm <Wilhelm.Burger@fh- > hagenberg.at<mailto:[hidden email]>> wrote: > > AH, I was not aware that this was possible! Can plugins with packages also > be used if the code is not contained in a JAR file? Can they be re-compiled on > demand, re-loaded and executed? > > > > --Wilhelm > > > > > > ________________________________ > > From: [hidden email]<mailto:[hidden email]> > [[hidden email]<mailto:[hidden email]>] On Behalf > Of Curtis Rueden [[hidden email]<mailto:[hidden email]>] > > Sent: Tuesday, June 25, 2013 20:52 > > To: Burger Wilhelm > > Cc: [hidden email]<mailto:[hidden email]> > > > > Subject: Re: Plugin for compiling all plugins? > > > > Hi Wilhelm, > > > >> ImageJ plugins are not supposed to reside in packages > > > > Why not? As long as you have a plugins.config defining which classes are > plugins, they can live in packages, and they do not need an underscore in the > name. Perhaps that would make your life easier? > > > > Regards, > > Curtis > > > > > > On Tue, Jun 25, 2013 at 12:50 PM, Burger Wilhelm <Wilhelm.Burger@fh- > hagenberg.at<mailto:[hidden email]>> wrote: > > Hello Curtis, > > > > yes, the assumption is that I have a set of plugin source-files (.java) placed > in multiple folders inside the 'plugins' folder. I thought of a command > "Compile all..." command (similar to "Compile and run..") that simply > compiles all these source files but does not run anything. Of course I guess > one could also run javac from the command line. > > > > My IDE (Eclipse) is actually part of the problem. I wanted to distribute a > structured set of plugins with .java and .class files side-by-side. My Eclipse > project is already rooted at the ImageJ's plugins folder, each inner folder in > 'plugins' is a source folder which is its own output folder - thereby .java and > compiled .class files come to lie together, just as I want. However, since > ImageJ plugins are not supposed to reside in packages - Eclipse cannot export > these source folders to a JAR file other than as a flat container (removing all > sub-folders). So I thought I let Eclipse only generate the source tree and then > run the compiler over it with that intended ImageJ command. Weird idea? > > > > Thanks much for the hints, I think I'll try the command line approach now... > > > > --Wilhelm > > > > ________________________________________ > > From: ImageJ Interest Group > [[hidden email]<mailto:[hidden email]>] On Behalf Of > Curtis Rueden [[hidden email]<mailto:[hidden email]>] > > Sent: Tuesday, June 25, 2013 17:33 > > To: [hidden email]<mailto:[hidden email]> > > Subject: Re: Plugin for compiling all plugins? > > > > Hi Wilhelm, > > > >> does anyone know of way to (re-)compile all other plugins within the > >> <ImageJ>/plugins/ directory? Any hints appreciated... > > > > Presumably you have the source code for all such plugins in the plugins > > folder? > > > > You say "all other plugins" -- does that mean you want to recompile the > > other plugins from within a plugin of your own, at runtime? Or would it be > > sufficient to use something like "javac -cp '../jars/*' *.java" on the > > command line from the plugins folder? > > > > Regards, > > Curtis > > > > P.S. If externally recompiling is sufficient, but you don't like the > > command line, you could create an IDE project around your ImageJ folder, > > setting your plugins folder as the source folder, and all JARs in the jars > > folder as dependencies. > > > > > > On Tue, Jun 25, 2013 at 1:52 AM, Burger Wilhelm < > > [hidden email]<mailto:Wilhelm.Burger@fh- > hagenberg.at>> wrote: > > > >> Hello group, > >> > >> does anyone know of way to (re-)compile all other plugins within the > >> <ImageJ>/plugins/ directory? Any hints appreciated... > >> > >> --Wilhelm > >> > >> -- > >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html > >> > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Peter Haub
I don't think it is possible to save
TIFF<http://en.wikipedia.org/wiki/Tagged_Image_File_Format>with LUT inside the file. -- Rogoshchenkov Nikolay On Wed, Jun 26, 2013 at 5:01 AM, Peter Haub <[hidden email]> wrote: > Dear List, > > in ImageJ (1.47q) I saved a 16bit TIF image with a Color-LUT. > > Problem: The LUT will not be stored in the file. > > Is the a something I can fix with configuration settings, is this feature > not supported in ImageJ or is this not an option in the TIF format? > > Peter > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.**html<http://imagej.nih.gov/ij/list.html> > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Burger Wilhelm
Hi Wilhelm,
On Wed, 26 Jun 2013, Burger Wilhelm wrote: > Thanks, Michael! > > > ImageJ Compile&Run only works for plugins that are not in a package. > > Just wondering: is this a bug or a necessary feature? In Fiji, we have at least partial work-arounds to make classes in packages (that have the same name as the submenu of Plugins) work. Ciao, Johannes -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Nikolay
Hi Nikolay & everyone,
> I don't think it is possible to save TIFF with LUT inside the file. You can, but only for 8-bit indices. See the TIFF6 specification [1], Part 1, Section 5: "Palette-color Images". You can save such indexed color images using ImageJ's File > Save As > TIFF, or using the Bio-Formats Exporter plugin [2]. However, if you have 16-bit indices, TIFF does not support that. The funny thing is that TIFF's ColorMaps are actually 8-bit indices into 48-bit RGB triples (so each of red, green and blue range from 0-65535). But that is the "wrong direction" if you want to have a color table with 65536 elements mapped to either 24-bit or 48-bit RGB triples. Unfortunately, I do not know of any general image formats that support 16-bit color tables. There are some proprietary microscopy formats that do, and Bio-Formats supports importing them, but will not export to such formats. Neither of the two most promising common graphics formats, TIFF and PNG, support it. For ImageJ2 we can add some custom metadata to the TIFF (like ImageJ1 does for hyperstacks), to preserve the LUTs. But then they would only be written & read by SCIFIO-based software [3], not all image processing software. Regards, Curtis [1] http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf [2] http://fiji.sc/Bio-Formats [3] http://scif.io/ On Wed, Jun 26, 2013 at 7:24 AM, Nikolay Rogoshchenkov <[hidden email]>wrote: > I don't think it is possible to save > TIFF<http://en.wikipedia.org/wiki/Tagged_Image_File_Format>with LUT > inside the file. > > -- > Rogoshchenkov Nikolay > > > On Wed, Jun 26, 2013 at 5:01 AM, Peter Haub <[hidden email]> wrote: > > > Dear List, > > > > in ImageJ (1.47q) I saved a 16bit TIF image with a Color-LUT. > > > > Problem: The LUT will not be stored in the file. > > > > Is the a something I can fix with configuration settings, is this feature > > not supported in ImageJ or is this not an option in the TIF format? > > > > Peter > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.**html< > http://imagej.nih.gov/ij/list.html> > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by dscho
Hi Wilhelm,
> In Fiji, we have at least partial work-arounds to make classes in > packages (that have the same name as the submenu of Plugins) work. Indeed, in my tests, "Compile and Run" on such a plugin works in Fiji. Regards, Curtis On Wed, Jun 26, 2013 at 11:19 AM, Johannes Schindelin < [hidden email]> wrote: > Hi Wilhelm, > > On Wed, 26 Jun 2013, Burger Wilhelm wrote: > > > Thanks, Michael! > > > > > ImageJ Compile&Run only works for plugins that are not in a package. > > > > Just wondering: is this a bug or a necessary feature? > > In Fiji, we have at least partial work-arounds to make classes in packages > (that have the same name as the submenu of Plugins) work. > > Ciao, > Johannes > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by dscho
Hi Johannes,
this is good news! I assume that the new plugin mechanism in ImageJ2 will (among other things) take care of this issue too? --Wilhelm > -----Original Message----- > From: Johannes Schindelin [mailto:[hidden email]] > Sent: Wednesday, June 26, 2013 6:19 PM > To: Burger Wilhelm > Cc: [hidden email] > Subject: Re: Plugin for compiling all plugins? > > Hi Wilhelm, > > On Wed, 26 Jun 2013, Burger Wilhelm wrote: > > > Thanks, Michael! > > > > > ImageJ Compile&Run only works for plugins that are not in a package. > > > > Just wondering: is this a bug or a necessary feature? > > In Fiji, we have at least partial work-arounds to make classes in packages > (that have the same name as the submenu of Plugins) work. > > Ciao, > Johannes -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Burger Wilhelm
On Jun 26, 2013, at 3:28 AM, Burger Wilhelm wrote:
> Hello Curtis, > > thanks - so I did! I set up a plugin 'My_Inverter' in package 'p1' (in <ImageJ>/plugins/p1/My_Inverter.java), pre-compiled by Eclipse to p1/My_Inverter.class. > > After launching IJ, the subfolder p1 correctly appears in the plugins menu and the plugin executes flawlessly. However, when I try a 'Compile and Run..' (either the .java or the .class file) I get the following error: > > ------------------------------------------- > Plugin or class not found: "My_Inverter" > (java.lang.NoClassDefFoundError: My_Inverter (wrong name: p1/My_Inverter)) > ------------------------------------------- > > Actually this is the behavior I remember. Could this be a class-loader problem? This bug is fixed in the ImageJ 1.47v daily build. -wayne > ________________________________ > From: [hidden email] [[hidden email]] On Behalf Of Curtis Rueden [[hidden email]] > Sent: Tuesday, June 25, 2013 23:55 > To: Burger Wilhelm > Cc: ImageJ Interest Group > Subject: Re: Plugin for compiling all plugins? > > Hi Wilhelm, > >> Can plugins with packages also be used if the code is not contained in >> a JAR file? Can they be re-compiled on demand, re-loaded and executed? > > Sure, give it a try. Just make sure the class name has an underscore in that case. It will be in a submenu named after the package. > > If you have any trouble with it, let us know. > > Regards, > Curtis > > > On Tue, Jun 25, 2013 at 2:17 PM, Burger Wilhelm <[hidden email]<mailto:[hidden email]>> wrote: > AH, I was not aware that this was possible! Can plugins with packages also be used if the code is not contained in a JAR file? Can they be re-compiled on demand, re-loaded and executed? > > --Wilhelm > > > ________________________________ > From: [hidden email]<mailto:[hidden email]> [[hidden email]<mailto:[hidden email]>] On Behalf Of Curtis Rueden [[hidden email]<mailto:[hidden email]>] > Sent: Tuesday, June 25, 2013 20:52 > To: Burger Wilhelm > Cc: [hidden email]<mailto:[hidden email]> > > Subject: Re: Plugin for compiling all plugins? > > Hi Wilhelm, > >> ImageJ plugins are not supposed to reside in packages > > Why not? As long as you have a plugins.config defining which classes are plugins, they can live in packages, and they do not need an underscore in the name. Perhaps that would make your life easier? > > Regards, > Curtis > > > On Tue, Jun 25, 2013 at 12:50 PM, Burger Wilhelm <[hidden email]<mailto:[hidden email]>> wrote: > Hello Curtis, > > yes, the assumption is that I have a set of plugin source-files (.java) placed in multiple folders inside the 'plugins' folder. I thought of a command "Compile all..." command (similar to "Compile and run..") that simply compiles all these source files but does not run anything. Of course I guess one could also run javac from the command line. > > My IDE (Eclipse) is actually part of the problem. I wanted to distribute a structured set of plugins with .java and .class files side-by-side. My Eclipse project is already rooted at the ImageJ's plugins folder, each inner folder in 'plugins' is a source folder which is its own output folder - thereby .java and compiled .class files come to lie together, just as I want. However, since ImageJ plugins are not supposed to reside in packages - Eclipse cannot export these source folders to a JAR file other than as a flat container (removing all sub-folders). So I thought I let Eclipse only generate the source tree and then run the compiler over it with that intended ImageJ command. Weird idea? > > Thanks much for the hints, I think I'll try the command line approach now... > > --Wilhelm > > ________________________________________ > From: ImageJ Interest Group [[hidden email]<mailto:[hidden email]>] On Behalf Of Curtis Rueden [[hidden email]<mailto:[hidden email]>] > Sent: Tuesday, June 25, 2013 17:33 > To: [hidden email]<mailto:[hidden email]> > Subject: Re: Plugin for compiling all plugins? > > Hi Wilhelm, > >> does anyone know of way to (re-)compile all other plugins within the >> <ImageJ>/plugins/ directory? Any hints appreciated... > > Presumably you have the source code for all such plugins in the plugins > folder? > > You say "all other plugins" -- does that mean you want to recompile the > other plugins from within a plugin of your own, at runtime? Or would it be > sufficient to use something like "javac -cp '../jars/*' *.java" on the > command line from the plugins folder? > > Regards, > Curtis > > P.S. If externally recompiling is sufficient, but you don't like the > command line, you could create an IDE project around your ImageJ folder, > setting your plugins folder as the source folder, and all JARs in the jars > folder as dependencies. > > > On Tue, Jun 25, 2013 at 1:52 AM, Burger Wilhelm < > [hidden email]<mailto:[hidden email]>> wrote: > >> Hello group, >> >> does anyone know of way to (re-)compile all other plugins within the >> <ImageJ>/plugins/ directory? Any hints appreciated... >> >> --Wilhelm >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
> This bug is fixed in the ImageJ 1.47v daily build.
It works beautifully and makes my IDE setup a *lot* simpler! Thanks, Wayne!! --Wilhelm ________________________________________ From: ImageJ Interest Group [[hidden email]] On Behalf Of Rasband, Wayne (NIH/NIMH) [E] [[hidden email]] Sent: Sunday, June 30, 2013 04:05 To: [hidden email] Subject: Re: Plugin for compiling all plugins? On Jun 26, 2013, at 3:28 AM, Burger Wilhelm wrote: > Hello Curtis, > > thanks - so I did! I set up a plugin 'My_Inverter' in package 'p1' (in <ImageJ>/plugins/p1/My_Inverter.java), pre-compiled by Eclipse to p1/My_Inverter.class. > > After launching IJ, the subfolder p1 correctly appears in the plugins menu and the plugin executes flawlessly. However, when I try a 'Compile and Run..' (either the .java or the .class file) I get the following error: > > ------------------------------------------- > Plugin or class not found: "My_Inverter" > (java.lang.NoClassDefFoundError: My_Inverter (wrong name: p1/My_Inverter)) > ------------------------------------------- > > Actually this is the behavior I remember. Could this be a class-loader problem? This bug is fixed in the ImageJ 1.47v daily build. -wayne > ________________________________ > From: [hidden email] [[hidden email]] On Behalf Of Curtis Rueden [[hidden email]] > Sent: Tuesday, June 25, 2013 23:55 > To: Burger Wilhelm > Cc: ImageJ Interest Group > Subject: Re: Plugin for compiling all plugins? > > Hi Wilhelm, > >> Can plugins with packages also be used if the code is not contained in >> a JAR file? Can they be re-compiled on demand, re-loaded and executed? > > Sure, give it a try. Just make sure the class name has an underscore in that case. It will be in a submenu named after the package. > > If you have any trouble with it, let us know. > > Regards, > Curtis > > > On Tue, Jun 25, 2013 at 2:17 PM, Burger Wilhelm <[hidden email]<mailto:[hidden email]>> wrote: > AH, I was not aware that this was possible! Can plugins with packages also be used if the code is not contained in a JAR file? Can they be re-compiled on demand, re-loaded and executed? > > --Wilhelm > > > ________________________________ > From: [hidden email]<mailto:[hidden email]> [[hidden email]<mailto:[hidden email]>] On Behalf Of Curtis Rueden [[hidden email]<mailto:[hidden email]>] > Sent: Tuesday, June 25, 2013 20:52 > To: Burger Wilhelm > Cc: [hidden email]<mailto:[hidden email]> > > Subject: Re: Plugin for compiling all plugins? > > Hi Wilhelm, > >> ImageJ plugins are not supposed to reside in packages > > Why not? As long as you have a plugins.config defining which classes are plugins, they can live in packages, and they do not need an underscore in the name. Perhaps that would make your life easier? > > Regards, > Curtis > > > On Tue, Jun 25, 2013 at 12:50 PM, Burger Wilhelm <[hidden email]<mailto:[hidden email]>> wrote: > Hello Curtis, > > yes, the assumption is that I have a set of plugin source-files (.java) placed in multiple folders inside the 'plugins' folder. I thought of a command "Compile all..." command (similar to "Compile and run..") that simply compiles all these source files but does not run anything. Of course I guess one could also run javac from the command line. > > My IDE (Eclipse) is actually part of the problem. I wanted to distribute a structured set of plugins with .java and .class files side-by-side. My Eclipse project is already rooted at the ImageJ's plugins folder, each inner folder in 'plugins' is a source folder which is its own output folder - thereby .java and compiled .class files come to lie together, just as I want. However, since ImageJ plugins are not supposed to reside in packages - Eclipse cannot export these source folders to a JAR file other than as a flat container (removing all sub-folders). So I thought I let Eclipse only generate the source tree and then run the compiler over it with that intended ImageJ command. Weird idea? > > Thanks much for the hints, I think I'll try the command line approach now... > > --Wilhelm > > ________________________________________ > From: ImageJ Interest Group [[hidden email]<mailto:[hidden email]>] On Behalf Of Curtis Rueden [[hidden email]<mailto:[hidden email]>] > Sent: Tuesday, June 25, 2013 17:33 > To: [hidden email]<mailto:[hidden email]> > Subject: Re: Plugin for compiling all plugins? > > Hi Wilhelm, > >> does anyone know of way to (re-)compile all other plugins within the >> <ImageJ>/plugins/ directory? Any hints appreciated... > > Presumably you have the source code for all such plugins in the plugins > folder? > > You say "all other plugins" -- does that mean you want to recompile the > other plugins from within a plugin of your own, at runtime? Or would it be > sufficient to use something like "javac -cp '../jars/*' *.java" on the > command line from the plugins folder? > > Regards, > Curtis > > P.S. If externally recompiling is sufficient, but you don't like the > command line, you could create an IDE project around your ImageJ folder, > setting your plugins folder as the source folder, and all JARs in the jars > folder as dependencies. > > > On Tue, Jun 25, 2013 at 1:52 AM, Burger Wilhelm < > [hidden email]<mailto:[hidden email]>> wrote: > >> Hello group, >> >> does anyone know of way to (re-)compile all other plugins within the >> <ImageJ>/plugins/ directory? Any hints appreciated... >> >> --Wilhelm >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Burger Wilhelm
Hello, all,
I downloaded ImageJ 1.47v daily build to try this new feature. When I run "Compile and Run" from the editor I still get this error message " Plugin or class not found... ", as it used to be before 1.47v. But then, when I call the plugin from the Plugins Control Panel it calls the correct plugin. So, it compiled in the correct folder. Maybe eventually, somebody can remove that error message? I am working under Windows xp, and my plugins are "buried" in the folder structure ImageJ plugins (subfolder) DIPDBVlab (subsubfolder) v031 (subsubsubfolder) my_program.java --Angelika -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hello Angelika,
the plugin files are allowed to be nested no deeper than one subfolder. In your case, 'my_program.java' should be in the 'DIPDBVlab' folder, not any deeper. --Wilhelm ________________________________________ From: ImageJ Interest Group [[hidden email]] On Behalf Of Angelika Erhardt [[hidden email]] Sent: Tuesday, July 02, 2013 17:29 To: [hidden email] Subject: Re: Plugin for compiling all plugins? Hello, all, I downloaded ImageJ 1.47v daily build to try this new feature. When I run "Compile and Run" from the editor I still get this error message " Plugin or class not found... ", as it used to be before 1.47v. But then, when I call the plugin from the Plugins Control Panel it calls the correct plugin. So, it compiled in the correct folder. Maybe eventually, somebody can remove that error message? I am working under Windows xp, and my plugins are "buried" in the folder structure ImageJ plugins (subfolder) DIPDBVlab (subsubfolder) v031 (subsubsubfolder) my_program.java --Angelika -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Burger, Angelika & everyone,
> the plugin files are allowed to be nested no deeper than one subfolder The Fiji distribution of ImageJ allows plugins to be nested more deeply. I tested with ImageJ 1.47u with a plugin called blah.foo.bar.Blah_ in source file plugins/blah/foo/bar/Blah_.java, and was able to compile and run it without errors using Fiji's Script Editor as well as with the built-in "Compile and Run" command. It appears in the menu at Plugins > blah > foo > bar > Blah. Regards, Curtis On Tue, Jul 2, 2013 at 10:51 AM, Burger Wilhelm < [hidden email]> wrote: > Hello Angelika, > > the plugin files are allowed to be nested no deeper than one subfolder. In > your case, 'my_program.java' should be in the 'DIPDBVlab' folder, not any > deeper. > > --Wilhelm > > ________________________________________ > From: ImageJ Interest Group [[hidden email]] On Behalf Of Angelika > Erhardt [[hidden email]] > Sent: Tuesday, July 02, 2013 17:29 > To: [hidden email] > Subject: Re: Plugin for compiling all plugins? > > Hello, all, > I downloaded ImageJ 1.47v daily build to try this new feature. > When I run "Compile and Run" from the editor I still get this error > message " Plugin or class not found... ", as it used to be > before 1.47v. But then, when I call the plugin from the Plugins Control > Panel it calls the correct plugin. So, it compiled in the correct folder. > > Maybe eventually, somebody can remove that error message? > I am working under Windows xp, and my plugins are "buried" in the folder > structure > ImageJ > plugins (subfolder) > DIPDBVlab (subsubfolder) > v031 (subsubsubfolder) > my_program.java > > --Angelika > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |