Posted by
Adrian Daerr-2 on
Feb 25, 2015; 3:46pm
URL: http://imagej.273.s1.nabble.com/Concatenate-bug-in-macro-tp5011685p5011767.html
Hi Djoere,
On 02/19/2015 02:29 PM, Djoere Gaublomme wrote:
> In a macro, I am trying to create an image stack with 10 identical
> slices (based on 1 non-z-stack image).
> Since I don't know a very elegant solution to this problem, [...]
Here's what I do in that case, in three steps:
1) reslice my image into a stack of 1 pixel high images
(Image->Stacks->Reslice..., using "start=Top" and avoiding interpolation)
2) Scale the resulting stack to a height of 10 pixels (Image->Scale...,
10 for the Y scale, Interpolation: none, create new image (scale does
not seem to work in place for stacks))
3) reslice that new stack (same parameters as in step 1) to exchange y
and z directions again
HTH,
cheers,
Adrian
Example macro recorded by performing the steps above on a sample image:
run("AuPbSn 40 (56K)");
run("Reslice [/]...", "output=1.000 start=Top avoid");
run("Scale...", "x=1.0 y=10 z=1.0 width=600 height=10 depth=412
interpolation=None average process create title=[Reslice of AuPbSn40-1]");
run("Reslice [/]...", "output=1.000 start=Top avoid");
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html