Paste stack macro suddenly doesn't work

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

Paste stack macro suddenly doesn't work

AMValm
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
Reply | Threaded
Open this post in threaded view
|

Re: Paste stack macro suddenly doesn't work

Jerome Mutterer-3
Dear Alex,
it looks like your double quote is not the expected " character. Try
retyping it.

Jerome.


On 21 April 2015 at 19:42, Valm, Alex (NIH/NIGMS) [F] <[hidden email]>
wrote:

> 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
>



--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
12, rue du Général Zimmer
67084 Strasbourg Cedex
www.ibmp.cnrs.fr

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Paste stack macro suddenly doesn't work

AMValm
In reply to this post by AMValm
That worked!
Thanks!

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