Hi,
In an imagej macro I have an open stack; I select batch mode true, duplicate a slice, then when I exit batch mode the original stack is not open anymore. I have not issued any command to close the stack. This is part of a macro that does some tedious processing on each slice , it runs many times faster so long as batch mode and hidden mode are used, but I would rather have the original stack open at the end of the macro. I thin I have a workaround that I would rather not use as it adds some confusing code to what should be a little macro that students can use and modify. The workaround is that if you selectImage(original); setBatchMode("show"); selectImage(duplicate); setBatchMode(false) ; then the original window is not closed and the duplicate is on top, but this is a bit awkward. Thanks! Robert -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Robert,
Try: setBatchMode("exit and display"); Kees -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Robert Atwood Sent: 15 October 2014 13:39 To: [hidden email] Subject: Imagej Macro Batch Mode -- file unexpectedly closed Hi, In an imagej macro I have an open stack; I select batch mode true, duplicate a slice, then when I exit batch mode the original stack is not open anymore. I have not issued any command to close the stack. This is part of a macro that does some tedious processing on each slice , it runs many times faster so long as batch mode and hidden mode are used, but I would rather have the original stack open at the end of the macro. I thin I have a workaround that I would rather not use as it adds some confusing code to what should be a little macro that students can use and modify. The workaround is that if you selectImage(original); setBatchMode("show"); selectImage(duplicate); setBatchMode(false) ; then the original window is not closed and the duplicate is on top, but this is a bit awkward. Thanks! Robert -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Kees:
Great! Thanks Robert > -----Original Message----- > From: Straatman, Kees (Dr.) [mailto:[hidden email]] > Sent: 15 October 2014 16:23 > To: [hidden email] > Subject: Re: Imagej Macro Batch Mode -- file unexpectedly closed > > Dear Robert, > > Try: setBatchMode("exit and display"); > > Kees > > -----Original Message----- > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of > Robert Atwood > Sent: 15 October 2014 13:39 > To: [hidden email] > Subject: Imagej Macro Batch Mode -- file unexpectedly closed > > Hi, > In an imagej macro I have an open stack; I select batch mode true, > duplicate a slice, then when I exit batch mode the original stack is > not open anymore. I have not issued any command to close the stack. > > > > This is part of a macro that does some tedious processing on each slice > , it runs many times faster so long as batch mode and hidden mode are > used, but I would rather have the original stack open at the end of the > macro. > > I thin I have a workaround that I would rather not use as it adds some > confusing code to what should be a little macro that students can use > and modify. > > The workaround is that if you > selectImage(original); > setBatchMode("show"); > selectImage(duplicate); > setBatchMode(false) ; > > then the original window is not closed and the duplicate is on top, > but this is a bit awkward. > > Thanks! > Robert > > > > > -- > This e-mail and any attachments may contain confidential, copyright and > or privileged material, and are for the use of the intended addressee > only. If you are not the intended addressee or an authorised recipient > of the addressee please notify us of receipt by returning the e-mail > and do not use, copy, retain, distribute or disclose the information in > or attached to the e-mail. > Any opinions expressed within this e-mail are those of the individual > and not necessarily of Diamond Light Source Ltd. > Diamond Light Source Ltd. cannot guarantee that this e-mail or any > attachments are free from viruses and we cannot accept liability for > any damage which you may sustain as a result of software viruses which > may be transmitted in or with the message. > Diamond Light Source Limited (company no. 4375679). Registered in > England and Wales with its registered office at Diamond House, Harwell > Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United > Kingdom > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |