Posted by
duerna on
Nov 11, 2017; 2:13pm
URL: http://imagej.273.s1.nabble.com/macro-with-many-stacks-tp5019684p5019686.html
Hi Herbie,
thank you again.
I am a self-learning code beginner,
just for my data analysis.
Please forgive me if I made funny mistakes.
As you said,
"put the processing steps in the loop",
I think now I understand why only the last stack was analysis before, thank
you.
If you please help me to see the follwing modified code, that will greatly
help me again.
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 + "]")*
run("Close")
> }
> }
or
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("AVI... ", "compression=None frame=1.96 save=[" + output + file +
"]")*
run("Close")
run("Close")
> }
> }
I write this two codes, in case the upper one can not save the data,
if the upper one do not work, then I need save each stacks into AVI.
Looking forward to hearing from you.
Best Regards.
Duerna
--
Sent from:
http://imagej.1557.x6.nabble.com/--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html