<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">OK, it clicked.  I realised that this line is not needed:<br>
<span style=" color:#008000;">id</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">=</span><span style=" color:#c0c0c0;">
</span><span style=" color:#008000;">vtkImageData::New();<br>
</span>I commented it out and it still works fine, and presumably a bit faster.<br>
<br>
Thanks<br>
Gib<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF653385"><font color="#000000" size="2" face="Tahoma"><b>From:</b> David Gobbi [david.gobbi@gmail.com]<br>
<b>Sent:</b> Monday, 16 November 2015 4:24 p.m.<br>
<b>To:</b> Gib Bogle<br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Subject:</b> Re: [vtkusers] vtkImageData problem<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">In VTK 6 the data objects don't have an Update method.  You
<div>have to call Update on the filter that generates the data.</div>
<div><br>
</div>
<div>w2i->Modified();</div>
<div>w2i->Update();</div>
<div>id = w2i->GetOutput();</div>
<div><br>
</div>
<div>On an unrelated note, did you mean to do a DeepCopy here?</div>
<div><br>
</div>
<div>
<div>id = vtkImageData::New();</div>
<div>id = w2i->GetOutput();</div>
</div>
<div><br>
</div>
<div> - David</div>
<div><br>
</div>
<div><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Nov 15, 2015 at 8:17 PM, Gib Bogle <span dir="ltr">
<<a href="mailto:g.bogle@auckland.ac.nz" target="_blank">g.bogle@auckland.ac.nz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-color:rgb(204,204,204); border-left-style:solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:rgb(0,0,0); font-size:10pt">
Having got my program to build and run with VTK-6.3, I am now encountering a problem with its behaviour.  The 3D display of the scene is working fine, but code that captures the image (for creating a video) is failing.<br>
<br>
Previously I have been doing this with VTK-5.10:<br>
<br>
<span style="color:rgb(192,192,192)"></span><font color="000000">id = vtkImageData::New();
</font>
<pre style="margin:0px; text-indent:0px"><font color="000000">id = w2i->GetOutput();</font></pre>
<font color="000000"></font>
<pre style="margin:0px; text-indent:0px"><font color="000000">w2i-><span style="font-style:italic">Modified</span>();</font></pre>
<font color="000000">id->Update(); </font>
<pre style="margin:0px; text-indent:0px"><font color="000000">imwidth = id->GetDimensions()[0];</font></pre>
<font color="000000"></font>
<pre style="margin:0px; text-indent:0px"><font color="000000">imheight = id->GetDimensions()[1];</font></pre>
<span style="color:rgb(0,0,0)">if (</span><span style="color:rgb(0,0,0)">imwidth</span><span style="color:rgb(192,192,192)">
</span><span style="color:rgb(0,0,0)">==</span><span style="color:rgb(192,192,192)">
</span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">)</span><span style="color:rgb(192,192,192)">
</span><span style="color:rgb(0,0,0)">{</span>
<pre style="margin:0px; text-indent:0px"><span style="color:rgb(192,192,192)">    </span>LOG_QMSG<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,128,0)">"ERROR:</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">recorder:</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">vtkImageData</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">dimension</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">0"</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin:0px; text-indent:0px"><span style="color:rgb(192,192,192)">    </span>exit<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">1</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin:0px; text-indent:0px"><span style="color:rgb(192,192,192)"></span><span style="color:rgb(0,0,0)">}<br><font face="Arial"><br>To get this to compile now I have to comment out the id->Update().  When the program executes it stops with the error that imwidth=0.<br><br>Should I replace id->Update() with something else?<br><br>Thanks<span class=""><font color="#888888"><br>Gib</font></span></font></span></pre>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>