Macro - operation on the slices in the AVI file .... ?

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

Macro - operation on the slices in the AVI file .... ?

nckrzan
Hi again,

I have new question, - now with the operation on the AVI slices

I want to compare two following slices. The best if it will be possible to
do something similar:



run("AVI...", "select=["+dir1+list[m]+"] use");
{

for (i=1; i<nSlices; i++) {

setSlice(i);
run("Duplicate...", "title=[A.tif]");
setSlice(i+1);
run("Duplicate...", "title=[B.tif]");

imageCalculator("Difference create","A.tif","B.tif");

......
}
}

my problem - it is impossible to work in the loop with the slice(i+1). How
to solve it ?

Best regards
Marcel Krzan






___ The message was checked by EMS.___
Reply | Threaded
Open this post in threaded view
|

Re: Macro - operation on the slices in the AVI file .... ?

Michael Schmid
Hi Marcel,

the loop must run to i<nSlices-1; otherwise you can't access i+1 of the last element. Obviously, if you have n images, there are only n-1 differences between successive images.

Michael
____________________________________________________________________________________
On 2011-Aug-30, at 19:41, Marcel Krzan wrote:

> Hi again,
>
> I have new question, - now with the operation on the AVI slices
>
> I want to compare two following slices. The best if it will be possible to
> do something similar:
>
>
>
> run("AVI...", "select=["+dir1+list[m]+"] use");
> {
>
> for (i=1; i<nSlices; i++) {
>
> setSlice(i);
> run("Duplicate...", "title=[A.tif]");
> setSlice(i+1);
> run("Duplicate...", "title=[B.tif]");
>
> imageCalculator("Difference create","A.tif","B.tif");
>
> ......
> }
> }
>
> my problem - it is impossible to work in the loop with the slice(i+1). How
> to solve it ?
>
> Best regards
> Marcel Krzan
>
>
>
>
>
>
> ___ The message was checked by EMS.___