Longitudinal Slice plug-in

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

Longitudinal Slice plug-in

Daniel Lélis Baggio
Hi ImageJers,
does anyone know about a plugin that can make a longitudinal cut out of a
stack of images, like a longitudinal cut in a Coronary IVUS?
The plugin would take as input the stack of images and would output a single
image with the pixels of the cut of each image of the stack along the
longitudinal cut made.

Thanks in advance,
Daniel
Reply | Threaded
Open this post in threaded view
|

Re: Longitudinal Slice plug-in

Wayne Rasband
> Hi ImageJers,
> does anyone know about a plugin that can make a longitudinal cut
> out of a stack of images, like a longitudinal cut in a Coronary IVUS?
> The plugin would take as input the stack of images and would output
> a single image with the pixels of the cut of each image of the stack
> along the longitudinal cut made.

Create a line selection and press the "/" key (Image>Stacks>Reslice).

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

Re: Longitudinal Slice plug-in

Daniel Lélis Baggio
That's great!
And is there an easy way to use ImageJ built-in functions inside plug-ins,
or should I look for the code that made it and call it? Or... run some
macro?
Thanks!

On 10/6/06, Wayne Rasband <[hidden email]> wrote:

>
> > Hi ImageJers,
> > does anyone know about a plugin that can make a longitudinal cut
> > out of a stack of images, like a longitudinal cut in a Coronary IVUS?
> > The plugin would take as input the stack of images and would output
> > a single image with the pixels of the cut of each image of the stack
> > along the longitudinal cut made.
>
> Create a line selection and press the "/" key (Image>Stacks>Reslice).
>
> -wayne
>
Reply | Threaded
Open this post in threaded view
|

Re: Longitudinal Slice plug-in

Wayne Rasband
Run the Reslice command with the command recorder  
(Plugins>Macro>Record) running and ImageJ will generate the code.  
Here is an example:

     makeLine(0, 80, 512, 80);
     run("Reslice [/]...", "input=5 output=5 slice=1 flip");

Add "IJ." to convert the macro function calls generated by the  
recorder into plugin-compatible method calls:

     IJ.makeLine(0, 80, 512, 80);
     IJ.run("Reslice [/]...", "input=5 output=5 slice=1 flip");

Use string concatenation to use variables with run method calls:

     int x1=0, y1=80, x2=512, y2=80;
     double inSpacing = 5.0;
     double outSpacing = 5.0;
     int count = 1;
     boolean flipVertically = true;
     IJ.makeLine(x1, y1, x2, y2);
     IJ.run("Reslice [/]...", "input="+inSpacing+" output="+
        outSpacing+" slice="+count+" "+(flipVertically?"true":"false"));

-wayne


On Oct 6, 2006, at 6:40 PM, Daniel Lelis Baggio wrote:

> That's great!
> And is there an easy way to use ImageJ built-in functions inside
> plug-ins, or should I look for the code that made it and call it?
> Or... run some macro?
> Thanks!
>
> On 10/6/06, Wayne Rasband <[hidden email]> wrote:
>>
>> > Hi ImageJers,
>> > does anyone know about a plugin that can make a longitudinal cut
>> > out of a stack of images, like a longitudinal cut in a Coronary  
>> IVUS?
>> > The plugin would take as input the stack of images and would output
>> > a single image with the pixels of the cut of each image of the  
>> stack
>> > along the longitudinal cut made.
>>
>> Create a line selection and press the "/" key (Image>Stacks>Reslice).
>>
>> -wayne
>>