adjusting slice order in a stack

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

adjusting slice order in a stack

Chang, Yulin
Hi Everyone,
 
Another simple question. I have four images, let's call A, B, C, D, all in DICOM format. When I import them into imageJ in a stack, the order is ABDC. Is there any simple way I can change the order to ABCD? I will need this order when I make a montage of the images. One way I I tried and worked was to first create a substack of just C and D, then reverse the orders of these two, save, and then combine A and B. But this procedure is a little cumbersome when I have deal with a lot of image. Is there any simple way to set slice order within imageJ?
 
Thanks in advance for your help.
 
Yulin
Reply | Threaded
Open this post in threaded view
|

Re: adjusting slice order in a stack

Rasband, Wayne (NIH/NIMH) [E]
On Sep 19, 2011, at 4:12 PM, Chang, Yulin wrote:

> Hi Everyone,
>
> Another simple question. I have four images, let's call A, B, C, D, all in DICOM format. When I import them into imageJ in a stack, the order is ABDC. Is there any simple way I can change the order to ABCD? I will need this order when I make a montage of the images. One way I I tried and worked was to first create a substack of just C and D, then reverse the orders of these two, save, and then combine A and B. But this procedure is a little cumbersome when I have deal with a lot of image. Is there any simple way to set slice order within imageJ?

You can easily change the order of the images in a montage by using the Montage Shuffler tool, part of the Magic Montage toolset, which is available in the toolbar's >> menu.

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: adjusting slice order in a stack

ved sharma
In reply to this post by Chang, Yulin
I have used "Stack Sorter" plugin to reshuffle slices in a stack

http://www.optinav.com/Stack-Sorter.htm

Hope this helps,

Ved
Reply | Threaded
Open this post in threaded view
|

Re: adjusting slice order in a stack

Rudolf Oldenbourg
In reply to this post by Chang, Yulin
Is it possible to call a StackSorter function from a macro? Pressing a button in the StackSorter panel doesn't seem to be recorded in the Recorder.

Rudolf
Reply | Threaded
Open this post in threaded view
|

Re: adjusting slice order in a stack

Robert Dougherty
Rudolf,

Stack Sorter is not compatible with the macro language.  You may be able to use Gabriel Landini's IJ_Robot to drive it, but it might be tricky.  I have not tried. Another choice is to write macro functions for the stack operations that you need.  For example:

function moveSliceForward(){
        metaString = getMetadata("Label");
        run("Select All");
        run("Copy");
        run("Delete Slice");
        run("Next Slice [>]");
        run("Add Slice");
        run("Paste");
        run("Select None");
        setMetadata(metaString);
}
function moveSliceBack(){
        metaString = getMetadata("Label");
        run("Select All");
        run("Copy");
        run("Delete Slice");
        run("Previous Slice [<]");
        run("Add Slice");
        run("Paste");
        run("Select None");
        setMetadata(metaString);
}

Bob

On Sep 25, 2011, at 7:51 AM, Rudolf Oldenbourg wrote:

> Is it possible to call a StackSorter function from a macro? Pressing a button in the StackSorter panel doesn't seem to be recorded in the Recorder.
>
> Rudolf

Robert Dougherty, Ph.D.
President, OptiNav, Inc.
1414 127th Place NE #106
Bellevue, WA 98005
(425)891-4883
FAX (425)467-1119
www.optinav.com
[hidden email]