Hi Marcel,
you can use the ImageJ built-in command File>Import>AVI.
The macro recorder (Plugins>Macros>Record) records the options, e.g.
run("AVI...", "select=["+dir+list[i]+"] first=2 last=4 use");
There, 'first' gives the slice number of the first slice to use,
'last' the last one, and 'use' stands for 'use virtual stack').
If you omit the 'first' or 'last' it takes the default, i.e., first=1
and last=the last frame of the movie.
If you have opened the movie, you can use the nSlices function to get
the number of frames in the movie.
http://rsb.info.nih.gov/ij/developer/macro/functions.html#nSlicesMichael
________________________________________________________________
On 1 Mar 2011, at 23:33, Marcel Krzan wrote:
> Hello,
>
> I tried to construct the "Batch Macro" (or some plugin) for
> conversion of
> huge no. of .avi files for .tiff format.
>
> But I have problem with the "open" AviReader function ...
>
> open(dir+list[i]);
>
> it works properly, the AviReader is opening the file....
> but I couldn't find the way to measure the lenght of the stack in the
> Virtual Stack. What is the proper function?
>
> The ImageSequence give the answer - no slides in stack.
> However the slides exist - and could be extract i.e. be the function
> "Stack to Slide"
>
> I have 3 question?
> - exist possibility to open by some construction : run
> (AviReader ....);?
> - could be AviReader by used automatic with marked function
> "Virtual Stack" ?
> - in which way I can use the function : stack.getSize in Macro?
>
> Regards,
> Marcel Krzan