I have a loop where I call Make Substack to process a select group of frames from a single stack array. So looking at https://imagej.net/Introduction_into_Macro_Programming#Using_variables I want to pass two integer variables pointing at the parts of the array to make the substack, lets call them J, K. Macro Recorder: run("Make Substack...", " slices=1-8"); //Manually this works run("Make Substack...", "slices=J-K"); // Nope This method works for some plug-ins but not this one. run("Make Substack...", "slices= J" - "K"); //Nope run("Make Substack...", "slices=J"<->"K"); //Nope run("Make Substack...", "slices=J"-"K"); //Nope run("Make Substack...", "slices= [+J+] - [+K+] "); //Nope run("Make Substack...", "slices="J" - "K" "); //Nope Suggestions. Ethan Cohen, Ph.D. Div of Biomedical Physics, WO62 Rm 1204 Office of Science and Engineering Labs, FDA Center for Devices and Radiological Health White Oak Federal Res Ctr. 10903 New Hampshire Ave. Silver Spring, MD 20993 Web: http://go.usa.gov/cegV3 Office: 301-796-2485 Lab:301-796-2762 Fax: 301-796-9927 Cell: 301-538-7544 [cid:image001.png@01D1C57E.DFA022A0]<http://www.fda.gov/>Excellent customer service is important to us. Please take a moment to provide feedback regarding the customer service you have received: https://www.research.net/s/cdrhcustomerservice?ID=6040&S=E "THIS MESSAGE FROM ETHAN COHEN IS INTENDED ONLY FOR THE USE OF THE PARTY TO WHOM IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL, AND PROTECTED FROM DISCLOSURE UNDER LAW. If you are not the addressee, or a person authorized to deliver the document to the addressee, you are hereby notified that any review, disclosure, dissemination, copying, or other action based on the content of this communication is not authorized. If you have received this document in error, please immediately notify the sender immediately by e-mail or phone." ________________________________ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Ethan,
Try the following. run("Make Substack...", "slices="+J+"-"+K); best, George On Thu, Nov 14, 2019 at 7:51 PM Cohen, Ethan D <[hidden email]> wrote: > > > I have a loop where I call Make Substack to process a select group of > frames from a single stack array. > > So looking at > https://imagej.net/Introduction_into_Macro_Programming#Using_variables > > I want to pass two integer variables pointing at the parts of the array to > make the substack, lets call them J, K. > > Macro Recorder: > > run("Make Substack...", " slices=1-8"); //Manually this works > > run("Make Substack...", "slices=J-K"); // Nope This method works for some > plug-ins but not this one. > > run("Make Substack...", "slices= J" - "K"); //Nope > > run("Make Substack...", "slices=J"<->"K"); //Nope > > run("Make Substack...", "slices=J"-"K"); //Nope > > run("Make Substack...", "slices= [+J+] - [+K+] "); //Nope > > run("Make Substack...", "slices="J" - "K" "); //Nope > > Suggestions. > Ethan Cohen, Ph.D. > Div of Biomedical Physics, WO62 Rm 1204 > Office of Science and Engineering Labs, > FDA Center for Devices and Radiological Health > White Oak Federal Res Ctr. > 10903 New Hampshire Ave. > Silver Spring, MD 20993 > Web: http://go.usa.gov/cegV3 > Office: 301-796-2485 > Lab:301-796-2762 > Fax: 301-796-9927 > Cell: 301-538-7544 > > [cid:image001.png@01D1C57E.DFA022A0]<http://www.fda.gov/>Excellent > customer service is important to us. Please take a moment to provide > feedback regarding the customer service you have received: > https://www.research.net/s/cdrhcustomerservice?ID=6040&S=E > "THIS MESSAGE FROM ETHAN COHEN IS INTENDED ONLY FOR THE USE OF THE PARTY > TO WHOM IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, > CONFIDENTIAL, AND PROTECTED FROM DISCLOSURE UNDER LAW. If you are not the > addressee, or a person authorized to deliver the document to the addressee, > you are hereby notified that any review, disclosure, dissemination, > copying, or other action based on the content of this communication is not > authorized. If you have received this document in error, please immediately > notify the sender immediately by e-mail or phone." > ________________________________ > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |