Reputation: 1
I try to progamm a PET/CT-matching algorithm, and now I have a very difficult question to answer. Is it possible to add some stacks to one big stack? Ich have 55 Stacks with 55 Frames, where in each Stack two images with different alpha-values are combined.
Now I would like to create one big stack, when I slide from left to right the transparency of the image is changing and when I slide from the bottom to the top I want to see the different slices of the stack ......Is this possible or should I try another method?!
Thanks in Advance
Taepsi
Upvotes: 0
Views: 1260
Reputation: 1079
ImageJ has support for multidimensional (up to 5 dimensions) stacks. On a higher level you can use Image->Hyperstacks->Stack to Hyperstack
or Image->Stacks->Tools->Concatenate
menu commands.
For use in a plugin, there is the function ImagePlus#setStack(ImageStack stack, int nChannels, int nSlices, int nFrames)
and others. See documentation for ImagePlus
class.
Here is a macro that demonstrates the use on a stack from ImageJ samples:
run("MRI Stack (528K)");
run("Duplicate...", "title=mri-stack-1.tif duplicate range=1-27");
run("Gaussian Blur...", "sigma=1 stack");
selectWindow("mri-stack.tif");
run("Duplicate...", "title=mri-stack-2.tif duplicate range=1-27");
run("Gaussian Blur...", "sigma=2 stack");
run("Concatenate...", " title=[Concatenated Stacks] open image1=mri-stack.tif image2=mri-stack-1.tif image3=mri-stack-2.tif image4=[-- None --]");
Upvotes: 2