Hi I have 2 issues that I do not seem to be able to resolve.
1. I am writing a LUT plugin applier so one can see the LUTs available before applying it. I am having trouble to direct the LUT importer because under linux, the path is expected to be described in full. For example, it does not find: IJ.run("LUT... ", "path='\\ImageJ\\plugins\\Color\\LUTs\\"+LUTffile.lut+"'"); but expects IJ.run("LUT... ", "path='\\home\\gabriel\\ImageJ\\plugins\\Color\\LUTs\\"+LUTffile.lut+"'"); This is less than ideal, because it will run only in those IJ users running linux and called "gabriel" :-) Is there a way to make the directory relative to the IJ directory (so it is independent of user or platform? Or what is the path of IJ at run time without having to use the Open Dialog? 2. In my List_LUTs plugin I had to put some delay to allow an image to apply an LUT before converting it to RGB. IJ.run("LUT... ", "path='"+dir+list[i]+"'"); IJ.wait(200); IJ.run("RGB Color"); It seems that the plugin sends the command to import the LUT, but the image conversion to RGB can take place before the LUT has been applied (and thus gives an error as the file is not 8bit grey anymore. Is there a solution to this other than inserting the delay as above? Many thanks. Gabriel |
> 1. I am writing a LUT plugin applier so one can see the LUTs
> available before applying it. > I am having trouble to direct the LUT importer because under > linux, the path is expected to be described in full. > > For example, it does not find: > IJ.run("LUT... ", > "path='\\ImageJ\\plugins\\Color\\LUTs\\"+LUTffile.lut+"'"); > > but expects > IJ.run("LUT... ", > "path='\\home\\gabriel\\ImageJ\\plugins\\Color\\LUTs\\"+LUTffile.lut+"' > "); > > This is less than ideal, because it will run only in those IJ > users running linux and called "gabriel" :-) > > Is there a way to make the directory relative to the IJ directory > (so it is independent of user or platform? Or what is the path > of IJ at run time without having to use the Open Dialog? Use the getDirectory() macro function, or IJ.getDirectory() method, to get the path to the ImageJ plugins directory: dir = getDirectory("plugins") + "Color/LUTs/"; run("LUT... ", "path=["+dir+"LUTffile.lut]"); The "/" path separator works on all platforms, including windows. A "/" is always added to the end of paths returned by getDirectory(). The brackets ("[" and "]") are needed if the path contains spaces. The getDirectory() function can also get the path to the ImageJ ("startup"), macros, home and temp folders, and to the folder that the current image was loaded from. > 2. In my List_LUTs plugin I had to put some delay to allow an image > to apply an LUT before converting it to RGB. > > IJ.run("LUT... ", "path='"+dir+list[i]+"'"); > IJ.wait(200); > IJ.run("RGB Color"); > > It seems that the plugin sends the command to import the LUT, but > the image conversion to RGB can take place before the LUT has > been applied (and thus gives an error as the file is not 8bit grey > anymore. Is there a solution to this other than inserting the delay as > above? I do not see this problem on Mac OS X and Windows XP. -wayne |
I just loaded the ImageJ software from the website and noticed that
the application has no menu bar (only tools) - but I cannot load any of my images. The documentation says that I need to load Raw File Opener.class to the input/output plugin section yet I cannot find the source code. Does anyone know if this exists as I cannot find it? Thanks so much in advance Robert |
Robert, the ImageJ control panel does have a tool bar. It should look
like it does at this link. --- Mike http://rsb.info.nih.gov/ij/docs/concepts.html -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Robert Martin Sent: Sunday, January 08, 2006 7:51 PM To: [hidden email] Subject: Opening files in ImageJ I just loaded the ImageJ software from the website and noticed that the application has no menu bar (only tools) - but I cannot load any of my images. The documentation says that I need to load Raw File Opener.class to the input/output plugin section yet I cannot find the source code. Does anyone know if this exists as I cannot find it? Thanks so much in advance Robert |
Free forum by Nabble | Edit this page |