[slicer-users] Displaying stdout in a packaged Slicer on Windows

Steve Pieper pieper at bwh.harvard.edu
Fri Apr 16 10:28:17 EDT 2010


Hi Ali -

Stdio on windows is tricky, and I don't think there's a general solution 
for what you need.  The interaction between a windows command prompt vs. 
the unix concepts of stdin and stdout isn't always well defined in my 
experience.

On thing I would strong suggest is using rxvt on cygwin rather than the 
cmd prompt or the standard windows console.  You can get rxvt (basically 
a port of xterm) through the cygwin setup.exe interface.

For code in slicer I would suggest using one of the methods below - the 
print to stdout, but also add to the slicer log window from which you 
can save them out to a file.  They also call a native window print 
function that will try to get the message into the console.

Best,
Steve

vtkSlicerApplication::InformationMessage(const char* message)
vtkSlicerApplication::WarningMessage(const char* message)
vtkSlicerApplication::ErrorMessage(const char* message)
vtkSlicerApplication::DebugMessage(const char* message)


On Apr/7/10 8:18 PM, Ali Uneri wrote:
> Hello,
>
> It seems that launch.tcl is suppressing stdout on Windows.
>
> Running bin/Slicer3.exe through launcher (as opposed to
> bin/Slicer3-real.exe) seems to pop up a Slicer3-real command prompt
> screen, but nothing is displayed, and there is no clear way to
> redirect the actual stdout to this console window. FYI, our package
> has been built against a version of Slicer with win32-console enabled.
>
> On the same line of thought, would it be possible to also redirect
> stdout to a log file?
>
> Thank you,
> Ali
> _______________________________________________
> slicer-users mailing list
> slicer-users at bwh.harvard.edu
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to slicer-users-request at massmail.spl.harvard.edu with unsubscribe as the subject



More information about the slicer-users mailing list