Dear All,
I don't know what I am missing but I could not make the simple progress bar (and 'status') working. The operation ran at least 2 minutes (i.e > 1 second, so it should be displayed). I tried in the following way(s): ... import ij.gui.*; // each file has 88 slices to be processed and there are around 36 such files ... ... for (int i = 0; i < my_file_names.size(); i++) { .... for (page = stack.getSize(); page > 0; page--) { ... IJ.showStatus("Slice/Image-file: " + page + "/" + stack.getSize()) ; IJ.showProgress(i, my_file_names.size()); // Or, IJ.showProgress((double)i/my_file_names.size()); ... } } Do I have to make anything enabled in the option menu (where?) or do I have to set the property progressbar visible (how?) ... ? Thanks Tamjid |
Hi Tamjid,
your code should work, although I don't understand why you don't call showProgress in the outer loop. You won't see the progress bar if you run it in a BatchMode macro. In BatchMode, only the showProgress macro command has an effect; progress bars of plugins are suppressed. Michael ________________________________________________________________ On 25 May 2010, at 02:49, Md Tamjidul Hoque wrote: > Dear All, > > I don't know what I am missing but I could not make the > simple progress bar (and 'status') working. > The operation ran at least 2 minutes (i.e > 1 second, so it should > be displayed). I tried in the following way(s): > > ... > import ij.gui.*; // each file has 88 slices to be processed and > there are around 36 such files > ... > ... > for (int i = 0; i < my_file_names.size(); i++) > { .... for (page = stack.getSize(); page > 0; page--) > { ... > IJ.showStatus("Slice/Image-file: " + page + "/" + > stack.getSize()) ; > IJ.showProgress(i, my_file_names.size()); // Or, > IJ.showProgress((double)i/my_file_names.size()); > ... > } > } > > Do I have to make anything enabled in the option menu (where?) or > do I have to set the property progressbar visible (how?) ... ? > > > Thanks > Tamjid |
Thanks Michael
it surprises me as well that why it is not working - and it is a java applications (not BatchMode macro) ... the call to showProgress was also in the outerloop but did not work and I thought it needs to be called frequently to refresh and that also did not work ... . Also, some other process is writing some progress 'Percentage Done x%, ... Esc' to abort' at the bottom left corner and I was thinking that this might be causing the problem ... Anyway, I am calling a form and I will try to call the java progress bar on that form area if I can not find the solution of the current problem. - Tamjid Michael Schmid wrote: > Hi Tamjid, > > your code should work, although I don't understand why you don't call > showProgress in the outer loop. > You won't see the progress bar if you run it in a BatchMode macro. In > BatchMode, only the showProgress macro command has an effect; progress > bars of plugins are suppressed. > > Michael > ________________________________________________________________ > > On 25 May 2010, at 02:49, Md Tamjidul Hoque wrote: > >> Dear All, >> >> I don't know what I am missing but I could not make the >> simple progress bar (and 'status') working. >> The operation ran at least 2 minutes (i.e > 1 second, so it should >> be displayed). I tried in the following way(s): >> >> ... >> import ij.gui.*; // each file has 88 slices to be processed and there >> are around 36 such files >> ... >> ... >> for (int i = 0; i < my_file_names.size(); i++) >> { .... for (page = stack.getSize(); page > 0; page--) >> { ... >> IJ.showStatus("Slice/Image-file: " + page + "/" + >> stack.getSize()) ; >> IJ.showProgress(i, my_file_names.size()); // Or, >> IJ.showProgress((double)i/my_file_names.size()); >> ... >> } >> } >> >> Do I have to make anything enabled in the option menu (where?) or do >> I have to set the property progressbar visible (how?) ... ? >> >> >> Thanks >> Tamjid > |
Free forum by Nabble | Edit this page |