Login  Register

Re: use the getDirectory command for DM3 images

Posted by Michael Schmid on Aug 20, 2008; 3:40pm
URL: http://imagej.273.s1.nabble.com/use-the-getDirectory-command-for-DM3-images-tp3695331p3695332.html

Hi Caro,

getDirectory("image") returns the path to the directory that
the active (foreground) image was loaded from.

As far as I see, the dm3 loader plugin on the ImageJ web site
uses the FileOpener, which calls imp.setFileInfo(fi), storing
the directory information of a file in the ImagePlus.
Thus, getDirectory("image") should work on dm3 images.

I don't have dm3 files to test, but you should see the
directory and filename with "Image>Show info..."
If it is not there, maybe the image was not the result of opening
a dm3 file from disk but e.g. created by "Duplicate"?


Michael
________________________________________________________________

On 20 Aug 2008, at 14:12, Caroline Petitjean wrote:

> Hello all,
>
> I have a very simple problem: I want to write a macro to open dm3  
> images, convert them all to 8-bit tiff images and save them in the  
> same folder again. But the command
>
> getDirectory("image")
>
> does not work on dm3 images (only on tiff, jpeg and so on). Can  
> somebody tell me why and/or give me a solution around this problem?
>
> Thanks a lot
> Caro