macros - ImageJ stack to images & rename images -


i have small problem imagej: have .tif files in folder, consist of 3 different files (blue channel, green channel, red channel). convert them separate pictures, keep green 1 want macro, can't work. can open .tif, convert separate images (image-0001, image-0002 , image-0003). want rename them blueimage, greenimage , redimage.

googling got me this, 1 saves images separate files , gives error.

macro split_color{      dir1 = getdirectory("inputdir");      list = getfilelist(dir1);      dir2 = getdirectory("outpurdir");      (i=0; i<list.length; i++) {          open(dir1+list[i]);          title1=file.namewithoutextension;          (j=1; j<=3; j++){              run("stack images")             "  slices="+j);              run("8-bit");              if (j==1) c = "blue";              else if(j==2) c = "green";              else c = "red";              saveas("tif", dir2+title1+"-"+c+".tif");              wait(100);              close();          }          close();      }      showmessage("macro finished");  }  

i can't work, me?

thanks


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -