<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoPlainText">One method I use (on windows) is to add this to the main application<o:p></o:p></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">int main(int argc, char* argv[])<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">{ <o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">#ifdef WIN32<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">AllocConsole();<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">freopen("conin$", "r", stdin);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">freopen("conout$", "w", stdout);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">freopen("conout$", "w", stderr);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New"">#endif<o:p></o:p></span></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">and then you can use std::cout to write to a terminal window.<o:p></o:p></p>
<p class="MsoPlainText">Note that the paraview main is generated from an *.in file so it's better to modify the *.in file which generates paraview_main.cxx<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">JB<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><span lang="EN-US" style="mso-fareast-language:EN-GB">-----Original Message-----<br>
From: paraview-developers-bounces@paraview.org [mailto:paraview-developers-bounces@paraview.org] On Behalf Of Utkarsh Ayachit<br>
Sent: 15 December 2011 20:34<br>
To: Joe Ping-Lin Hsiao<br>
Cc: paraview-developers@paraview.org<br>
Subject: Re: [Paraview-developers] How to write to the output window?</span></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Try using the vtkErrorMacro() or vtkWarningMacro() ( or use qWarning(), qCritical(), qDebug() in Qt code)<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Utkarsh<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">On Thu, Dec 15, 2011 at 2:30 PM, Joe Ping-Lin Hsiao <<a href="mailto:phsiao@cs.unc.edu"><span style="color:windowtext;text-decoration:none">phsiao@cs.unc.edu</span></a>> wrote:<o:p></o:p></p>
<p class="MsoPlainText">> Hi,<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> I'd like to output debug information to the ParaView output windows
<o:p></o:p></p>
<p class="MsoPlainText">> for my C++ plugin.<o:p></o:p></p>
<p class="MsoPlainText">> I tried to use cout but nothing shows up. Does anybody know how to do it?<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> Thanks,<o:p></o:p></p>
<p class="MsoPlainText">> Joe<o:p></o:p></p>
<p class="MsoPlainText">> _______________________________________________<o:p></o:p></p>
<p class="MsoPlainText">> Paraview-developers mailing list<o:p></o:p></p>
<p class="MsoPlainText">> <a href="mailto:Paraview-developers@paraview.org"><span style="color:windowtext;text-decoration:none">Paraview-developers@paraview.org</span></a><o:p></o:p></p>
<p class="MsoPlainText">> <a href="http://public.kitware.com/mailman/listinfo/paraview-developers">
<span style="color:windowtext;text-decoration:none">http://public.kitware.com/mailman/listinfo/paraview-developers</span></a><o:p></o:p></p>
<p class="MsoPlainText">_______________________________________________<o:p></o:p></p>
<p class="MsoPlainText">Paraview-developers mailing list<o:p></o:p></p>
<p class="MsoPlainText"><a href="mailto:Paraview-developers@paraview.org"><span style="color:windowtext;text-decoration:none">Paraview-developers@paraview.org</span></a><o:p></o:p></p>
<p class="MsoPlainText"><a href="http://public.kitware.com/mailman/listinfo/paraview-developers"><span style="color:windowtext;text-decoration:none">http://public.kitware.com/mailman/listinfo/paraview-developers</span></a><o:p></o:p></p>
</div>
</body>
</html>