Login  Register

slow to open split stacks

Posted by Glen MacDonald-2 on Dec 09, 2009; 10:30pm
URL: http://imagej.273.s1.nabble.com/slow-to-open-split-stacks-tp3690167.html

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]