MRtrix3 / mrtrix3

MRtrix3 provides a set of tools to perform various advanced diffusion MRI analyses, including constrained spherical deconvolution (CSD), probabilistic tractography, track-density imaging, and apparent fibre density
http://www.mrtrix.org
Mozilla Public License 2.0
281 stars 176 forks source link

ProgressBar: Simple update method where stderr is pipe #2935

Closed Lestropie closed 1 week ago

Lestropie commented 1 week ago

Likely resolves #1980.

Discovered that mrinfo-ing to a file produced the simplified progress bar, whereas using 2>&1 | tee used the dynamic progress bar, producing a whole lot of junk at the head of the file if opened in a text editor.

This change means that MRtrix3 C++ commands invoked by a MRtrix3 Python command, where the latter is invoked with -info or -debug (and therefore shows dynamic information about executed processes), will now show the simplified progress bar; this is perfectly fine by me. Similarly if the stdout / stderr contents of a failed command are written to text file in the scratch directory, they will also have the simplified appearance, as they ideally should.

Not 100% happy with the appearance of the simplified progress bar (see eg. #1744), but not the top priority right now.