<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="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 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-CA link=blue vlink=purple>
<div class=Section1><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>Hi,<o:p></o:p></span></font></pre><pre><font size=2
face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>your code crashes because the Renderer ivar is not set.<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>The contour representation should be added to a vtkContourWidget<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>and the widget should have its vtkRenderWindowInteractor set <o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>before trying to use it. The widget will set up the representation’s<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>renderer ivar.<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>Dean<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>int main()<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>{<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> vtkOrientedGlyphFocalPlaneContourRepresentation* cr = vtkOrientedGlyphFocalPlaneContourRepresentation::New();<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> double wp[3] = {1.0, 1.0, 1.0};<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> cr->AddNodeAtWorldPosition(wp); //crash here - access violation reading location 0x00000000<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> return 0;<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>}<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>The crash goes down to vtkcontourrepresentation.cxx, line 1106<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>//----------------------------------------------------------------------<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>void vtkContourRepresentation<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>::<i><span
style='font-style:italic'>GetRendererComputedDisplayPositionFromWorldPosition( double worldPos[3],<o:p></o:p></span></i></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> double * vtkNotUsed(worldOrient[9]), double displayPos[2] )<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=FR-CA style='font-size:10.0pt'>{<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=FR-CA style='font-size:10.0pt'> double pos[4];<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=FR-CA style='font-size:10.0pt'> pos[0] = worldPos[0];<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=FR-CA style='font-size:10.0pt'> pos[1] = worldPos[1];<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span lang=FR-CA style='font-size:10.0pt'> </span>pos[2] = worldPos[2];<o:p></o:p></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> pos[3] = 1.0;<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> <o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> this->Renderer->SetWorldPoint( pos ); //crashes here<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> this->Renderer->WorldToDisplay();<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> this->Renderer->GetDisplayPoint( pos );<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> <o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> displayPos[0] = pos[0];<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> displayPos[1] = pos[1];<o:p></o:p></span></font></pre>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>}</span></font><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>