Login  Register

Re: macro with many stacks

Posted by Herbie on Nov 11, 2017; 1:52pm
URL: http://imagej.273.s1.nabble.com/macro-with-many-stacks-tp5019684p5019685.html

Well Duerna,

you must put the processing steps in the loop, i.e. *after*

  run("Image Sequence...", "open=" + path + " sort");

and I would strongly recommend to close each stack after its processing.


Because I have no experience with

  run("wrMTrck ", ...

I can't help you with the processing itself.


Good luck

Herbie

::::::::::::::::::::::::::::::::::::
Am 11.11.17 um 14:42 schrieb duerna:

> Dear all,
>
> With some kindly help, I could open many sub-folder as many stacks now,
> but I could not go further, I want analysis all the stacks and save the
> result.
>
> Please see the code:
>
> -----------------------------------------------------------------
> input = getDirectory("choose the input directory");
> output = getDirectory("choose the output directory");
>
> listdir = getFileList( input );
> for (i = 0; i < listdir.length; i++) {
>          path = input + listdir[i];
>          if ( File.isDirectory(  path  )  ) {
>                  run("Image Sequence...", "open=" + path + " sort");
>          }
> }
> ------------------------------------------------------------------------------
> ------------------------------------------------------------------------------
> run("Enhance Contrast", "saturated=0.35");
> run("Apply LUT", "stack");
> setAutoThreshold("Otsu dark");
> setThreshold(60, 255);
> run("wrMTrck ", "minsize=50 maxsize=10000 maxvelocity=300 maxareachange=100
> mintracklength=0 bendthreshold=0 binsize=0 saveresultsfile showpathlengths
> showlabels showpositions showpaths showsummary roundcoord smoothing
> plotbendtrack rawdata=1 benddetect=0 fps=0 backsub=0 threshmode=Otsu
> fontsize=50 * save=[" + output + file + "]")*
> ----------------------------------------------------------------------------------------------------------------
> ----------------------------------------------------------------------------------------------------------------
>
> Between the double dotline, is what I want to deal with my stacks,
> however, I could only analysis the last stacks, and could not save the
> analysis .txt data.
>
> would you please help me ?
> I have a lot of stacks, more than hunders, I need macro to save me.
>
> Thank you in advance.
>
> Best regards.
> Duerna
>
>      
>
>
>
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html