<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19154"></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Hello,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I have been using the vtkChartXY in previous release versions for a while now without any problems.&nbsp; However, I recently upgraded to VTK 5.8 and I having some difficulties.&nbsp; I am wondering if it has anything to do with the vtkChartXY::SetTitle being changed from a "const char* title"&nbsp;to a "const vtkStdString &amp;title" -- but I am just guessing.</DIV>
<DIV>&nbsp;</DIV>
<DIV>At any rate, I create the vtkChartXY using a vtkSmartPointer and the axis get their titles initialized to "X Axis" and "Y Axis" without any difficulties.&nbsp; However, when I go to change the Axis titles or the chart title to something useful, I get an unhandled exception: access violation.&nbsp; I tried to change the input from a quoted string to an actual vtkStdString but it crashes as well.&nbsp; I saw a post online (<A href="http://vtk.org/pipermail/vtkusers/2011-May/116473.html">http://vtk.org/pipermail/vtkusers/2011-May/116473.html</A>) that this is due to mismatched build types, but I build VTK with RelWithDebInfo and my project is build with RelWithDebInfo.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I am working with VTK 5.8 Release Tag, on Windows XP 32Bit and using MSVC2010 and Qt 4.7.2.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Here is my code:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp; <STRONG>In Header:</STRONG></DIV>
<DIV>&nbsp;&nbsp;&nbsp; <FONT face="Courier New">vtkSmartPointer&lt;vtkChartXY&gt; m_Chart;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;<STRONG> In Source:</STRONG></DIV>
<DIV><FONT face="Courier New">&nbsp; m_Chart = vtkSmartPointer&lt;vtkChartXY&gt;::New();</FONT></DIV>
<DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New">&nbsp; m_Chart-&gt;SetShowLegend(true);</FONT></DIV>
<DIV><FONT face="Courier New"></FONT><FONT face="Courier New"><BR>&nbsp; //const vtkStdString xAxisLabel = "Index";<BR>&nbsp; //m_Chart-&gt;GetAxis(vtkAxis::BOTTOM)-&gt;SetTitle(xAxisLabel);<BR>&nbsp; m_Chart-&gt;GetAxis(vtkAxis::BOTTOM)-&gt;SetTitle("Index");<BR>&nbsp; //const vtkStdString yAxisLabel = "Position (mm)";<BR>&nbsp; //m_Chart-&gt;GetAxis(vtkAxis::LEFT)-&gt;SetTitle(yAxisLabel);<BR>&nbsp; m_Chart-&gt;GetAxis(vtkAxis::LEFT)-&gt;SetTitle("Position (mm)");</FONT></DIV>
<DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New">&nbsp; if( this-&gt;getName().isEmpty() )&nbsp; // Note: getName() returns a QString<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; const vtkStdString title = "Position Data";<BR>&nbsp;&nbsp;&nbsp; m_Chart-&gt;SetTitle(title);<BR>&nbsp; }<BR>&nbsp; else<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; const vtkStdString title = "Position Data - " + this-&gt;getName().toStdString();<BR>&nbsp;&nbsp;&nbsp; m_Chart-&gt;SetTitle(title);<BR>&nbsp; }</FONT></DIV>
<DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV>Any help is appreciated!</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks.</DIV>
<DIV>Andrew</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<P>---------------------------------------------------------------<BR>1981-2011: Celebrating 30 Years of Innovation<BR>Follow us on Twitter: <A href="http://twitter.com/#!/NDIMedResearch">@NDIMedResearch</A></P>Andrew D. Wiles, PhD, PEng<BR>Research Scientist, Medical Division<BR>NDI<BR>103 Randall Drive<BR>Waterloo, ON, Canada, N2V 1C5<BR>Telephone: +1 (519) 884-5142 ext. 314<BR>Toll Free: +1 (877) 634-6340<BR>Global: ++ (800) 634-634-00<BR>Facsimile: +1 (519) 884-5184<BR>Website: <A href="http://www.ndigital.com/">www.ndigital.com</A></DIV>
<DIV><BR><IMG src="cid:EEHYWZVQZCFH.IMAGE_14.BMP"></DIV>
<DIV>--------------------</DIV></BODY></HTML>