Login  Register

Paste stack macro suddenly doesn't work

Posted by AMValm on Apr 21, 2015; 5:42pm
URL: http://imagej.273.s1.nabble.com/Paste-stack-macro-suddenly-doesn-t-work-tp5012557.html

Hello,
I wrote a macro a while back to copy and paste two stacks together.  Basically I want to copy the first slice from one stack and paste it onto the first slice of the second stack.  Then copy the second slice from the first stack and paste it onto the second slice of the second stack and so on and so on.  The macro used to work just fine.  Now all of a sudden when I try to run the macro I get the following error:
"Undefined variable in line 4.
input1=<skeleton.;"

Any help is greatly appreciated! I have been banging my head on this for days!
Macro code below the line.

-----------------

run("Paste Control...");
setPasteMode("Min");
setBatchMode(true);
input1 = “skeleton”;
input2 = “threshimage”;
n = nSlices();
for (i=1; i<=n; i++) {
     showProgress(i, n);
     selectImage(input1);
     setSlice(i);
     run("Copy");
     selectImage(input2);
     setSlice(i);
     run("Paste");
     }
  run("Select None");
  setBatchMode(false);

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html