open dv files from macro

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

open dv files from macro

danibodor
i have a problem when i want to open a dv file with 3 channels from a macro. the thing is, when I open one of these files (manually), I get a Bio-Format Import Options window. I then unselect everything and it opens the way i want it to. macro recorder then tells me:

--open("C:\\Documents and Settings\\Whatever\\MyDVFile.dv] view=[Standard ImageJ] stack_order=Defaul");

However, in my macro I assign a name to the specified file i want to open:

--dvFile = dir+substring(list[i],0,lengthOf(list[i])-1)+File.separator+slist[j];

now I want to open dvFile and use the options: view=[Standard ImageJ] stack_order=Defaul". However, I don't know how to substitute the C:\\Documents and Settings\\Whatever\\MyDVFile.dv for the dvFile that I assigned. I have tried a few permutations, but haven't found it yet. It works if I leave out the arguments of view and stack_order, but then I manually have  to accept the options for each file that is opened.

Can anyone help?
Reply | Threaded
Open this post in threaded view
|

Re: open dv files from macro

Wayne Rasband
You need to open the DV file using the Plugins>LOCI>Bio-Formats
Importer command to correctly record the Bio-Formats plugin. This is
what was recorded when I opened an LSM file using
Plugins>LOCI>Bio-Formats Importer:

    run("Bio-Formats Importer", "open=/Users/wayne/Images/LSM/Cntrl3.lsm
view=[Standard ImageJ] stack_order=Default split_channels autoscale");

And this is what it looks like when you make the file path a variable:

    path = "/Users/wayne/Images/LSM/Cntrl3.lsm";
    run("Bio-Formats Importer", "open=["+path+"] view=[Standard ImageJ]
stack_order=Default split_channels autoscale");

In your case, 'path' would defined using:

    path = "C:\\Documents and Settings\\Whatever\\MyDVFile.dv";

-wayne


On Apr 17, 2009, at 1:58 PM, danibodor wrote:

> i have a problem when i want to open a dv file with 3 channels from a
> macro. the thing is, when I open one of these files (manually), I get
> a Bio-Format Import Options window. I then unselect everything and it
> opens the way i want it to. macro recorder then tells me:
>
> --open("C:\\Documents and Settings\\Whatever\\MyDVFile.dv]
> view=[Standard ImageJ] stack_order=Defaul");
>
> However, in my macro I assign a name to the specified file i want to
> open:
>
> --dvFile =
> dir+substring(list[i],0,lengthOf(list[i])-1)+File.separator+slist[j];
>
> now I want to open dvFile and use the options: view=[Standard ImageJ]
> stack_order=Defaul". However, I don't know how to substitute the
> C:\\Documents and Settings\\Whatever\\MyDVFile.dv for the dvFile that
> I assigned. I have tried a few permutations, but haven't found it yet.
> It works if I leave out the arguments of view and stack_order, but
> then I manually have  to accept the options for each file that is
> opened.
>
> Can anyone help?
> --
> View this message in context:
> http://n2.nabble.com/open-dv-files-from-macro-tp2652108p2652108.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>