How can I get a progress bar

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I get a progress bar

Chethan S-2
Hi all,

I am using 'nlfilter' to carry out an image processing operation. As the image is very large the operation takes about half an hour to complete and show the output. But to ascertain the progress of the operation I find no way except to look at the blinking cursor at the terminal. For such operations MATLAB displays a small dialog box which shows the progress. Can I enable such a functionality in Octave? At least a progress line (a line from 0 moving towards 100 %) instead of blinking cursor would be OK.

Thanks and regards,

Chethan S.

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

RE: How can I get a progress bar

Mike G

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chethan S
Sent: Monday, May 16, 2011 5:22 AM
To: Octave Help
Subject: How can I get a progress bar

 

Hi all,

I am using 'nlfilter' to carry out an image processing operation. As the image is very large the operation takes about half an hour to complete and show the output. But to ascertain the progress of the operation I find no way except to look at the blinking cursor at the terminal. For such operations MATLAB displays a small dialog box which shows the progress. Can I enable such a functionality in Octave? At least a progress line (a line from 0 moving towards 100 %) instead of blinking cursor would be OK.

Thanks and regards,

Chethan S.
 

 

Hi Chethan,

You might want to reconsider having a progress bar running. It looks nice, but the overhead will add to the time it takes for the reported function to complete. There is significant overhead in setting up the bar, calculating the position, and displaying it. However, if a function does take 30 minutes to complete, then the overhead required for the progress bar may very well get lost in the noise.

Regards,

Mike G.

 


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How can I get a progress bar

David Bateman
On 05/16/2011 07:28 PM, Mike wrote:

>  
>
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Chethan S
> Sent: Monday, May 16, 2011 5:22 AM
> To: Octave Help
> Subject: How can I get a progress bar
>
>  
>
> Hi all,
>
> I am using 'nlfilter' to carry out an image processing operation. As the image is very large the operation takes about half an hour to complete and show the output. But to ascertain the progress of the operation I find no way except to look at the blinking cursor at the terminal. For such operations MATLAB displays a small dialog box which shows the progress. Can I enable such a functionality in Octave? At least a progress line (a line from 0 moving towards 100 %) instead of blinking cursor would be OK.
>
> Thanks and regards,
>
> Chethan S.  
>
>  
>
> Hi Chethan,
>
> You might want to reconsider having a progress bar running. It looks nice, but the overhead will add to the time it takes for the reported function to complete. There is significant overhead in setting up the bar, calculating the position, and displaying it. However, if a function does take 30 minutes to complete, then the overhead required for the progress bar may very well get lost in the noise.
>
> Regards,
>


The miscellaneous package of octave-forge has the waitbar function, but
its implemented using the termcap library that has certain compatibility
issues, particularly with windows. Without the termcap library it prints
a fairly ugly wait bar to stdio

Once we have proper ui functionality this should be reimplemented as an
octave core function.

D.
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Fwd: How can I get a progress bar

Carnë Draug-2
In reply to this post by Chethan S-2
I forgot to send this to the mailing list when I answered before. The
patch does not show a status bar but displays a message about the
percentage of done. Looking back, you should replace round by floor on
the patch.

Carnë


---------- Forwarded message ----------
From: Carnë Draug <[hidden email]>
Date: 2011/5/16
Subject: Re: How can I get a progress bar
To: Chethan S <[hidden email]>


On 16 May 2011 13:22, Chethan S <[hidden email]> wrote:
>
> I am using 'nlfilter' to carry out an image processing operation. As the
> image is very large the operation takes about half an hour to complete and
> show the output. But to ascertain the progress of the operation I find no
> way except to look at the blinking cursor at the terminal. For such
> operations MATLAB displays a small dialog box which shows the progress. Can
> I enable such a functionality in Octave? At least a progress line (a line
> from 0 moving towards 100 %) instead of blinking cursor would be OK.

Hi,

that function is part of the image package, not of octave core. I
attached a patch that should prints a message every 5%. You can change
that value in the following line (after applying the patch)

   if(rem(percent_done, 5)==0 && percent_done != seen)

By the way, you can look into the function file to modify it to your
needs. You are now free to do so.

Carnë

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave

verbose.patch (956 bytes) Download Attachment