> Running Image Calculator in the code box provided in the dialogue produces
> the correct 32 bit result image. I can rename this result image "Result" and
> append the current Slice number of the virtual stacks to generate a unique
> filename, e.g. Result.001, Result.002...
>
> However, what ends up being saved by the Batch Process as "Result.*" is not
> the 32-bit result image, but the current slice of one of the virtual stacks
> used as input to the Image calculator. Furthermore, specifying the Output
> folder seems to serve no function, as an explicit SaveAs command requires a
> fully qualified path.
>
> The simple macro code I have written in the code box is
>
> run("Image Calculator...", "image1=[B 340 backsub] operation=Divide
> image2=[B 380 backsub] 32-bit"); // do the division with 32 bit result
> rename ("Result") ;
> selectWindow("B 340 backsub") ; // select one of the virtual stacks
> n = getSliceNumber() ; // get the current slice index
> nString = toString(n, 0); // convert the index to a
> string
> MyImage = "ratio." + nString ; // create a string for the
> output filename with the index as the extension
> selectWindow("Result") ; // select the result image
> SaveAsString = "Y:\\human brain\\june 28 2011 cold\\B ratio\\" +
> MyImage ; // create the string with the fully qualitifed path
> saveAs("Tiff", SaveAsString); // save the result image
> close() ; // close the result image
>
>
> Have I misunderstood how this batch functionality with Virtual Stacks is
> intended to be used?
> Any help would be very much appreciated.
> Jeremy Marks
> University of Chicago
>
> --
> View this message in context:
http://imagej.588099.n2.nabble.com/Using-Image-Calculator-with-Virtual-Stacks-tp6539611p6539611.html> Sent from the ImageJ mailing list archive at
Nabble.com.