Re: use the getDirectory command for DM3 images
Posted by
Ben Tupper on
URL: http://imagej.273.s1.nabble.com/use-the-getDirectory-command-for-DM3-images-tp3695331p3695333.html
On Aug 20, 2008, at 2:16 PM, Michael Schmid wrote:
> 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"?
>
>
Hi,
I can't speak to the image format issues, but perhaps you are looking
to get a list of the files contained in the specified directory? If
so then take a look at...
http://rsb.info.nih.gov/ij/macros/ListFilesRecursively.txtor use the macro command getFileList(directory) ...
http://rsb.info.nih.gov/ij/developer/macro/functions.html#FCheers,
ben
> 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
Ben Tupper
[hidden email]
I GoodSearch for Ashwood Waldorf School.
Raise money for your favorite charity or school just by searching the
Internet with GoodSearch - www.goodsearch.com - powered by Yahoo!