slow to open split stacks

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

slow to open split stacks

Glen MacDonald-2
Hello,
Using this function to open 3-channel images then merge them into RGB is very fast with the setBatchMode().  

path=File.openDialog("Select a file");//path+filename, from calling macro
function doMerge(){
        setBatchMode(true);
        options="open=["+path+"] view=[Standard ImageJ] stack_order=Default split_channels autoscale"; //set options for bio-formats
        showStatus("opening file");
        run("Bio-Formats Importer",options);
      createtype="red=["+redc+"] green=["+grnc+"] blue=["+bluc+"] gray=["+gryc+"] "+create;
        run("Merge Channels...", createtype);
        setBatchMode(false);
//do some stuff
        }


But, using this function to open 3 channel images without merging is much slower . Using the setBatchMode() causes only the last channel to be opened.  Is there a way to speed this operation?  Is there a way to tell the LOCI plugin to only open a specific channel without merging?

function noMerge(){
        //setBatchMode(true);
        options="open=["+path+"] view=[Standard ImageJ] stack_order=Default split_channels autoscale";
        showStatus("opening file");
        run("Bio-Formats Importer",options);
        //setBatchMode(false);
//...other stuff
{

Thanks,
Glen


Glen MacDonald
Core for Communication Research
Virginia Merrill Bloedel Hearing Research Center
Box 357923
University of Washington
Seattle, WA 98195-7923  USA
(206) 616-4156
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: slow to open split stacks

Gabriel Landini
On Wednesday 09 December 2009 22:30:15 you wrote:
> But, using this function to open 3 channel images without merging is much
>  slower .
>  Using the setBatchMode() causes only the last channel to be
>  opened.  

Isn't that because the setBatchMode(false) only shows the last selected image?
Have a look in the macro functions page to find out how to use the command to
make all images appear.

Cheers

G.
Reply | Threaded
Open this post in threaded view
|

Re: slow to open split stacks

Glen MacDonald-2
Hi Gabriel,
Yes, I overlooked the "exit and display" argument.  Usually, I just roll my eyes when someone else misses what is in the manual.  :-O  

Thanks,
Glen
On Dec 9, 2009, at 3:31 PM, Gabriel Landini wrote:

> On Wednesday 09 December 2009 22:30:15 you wrote:
>> But, using this function to open 3 channel images without merging is much
>> slower .
>> Using the setBatchMode() causes only the last channel to be
>> opened.  
>
> Isn't that because the setBatchMode(false) only shows the last selected image?
> Have a look in the macro functions page to find out how to use the command to
> make all images appear.
>
> Cheers
>
> G.