<font><font face="verdana,sans-serif">I solved the problem using advice from this post:</font></font><div><font face="verdana, sans-serif"><a href="http://vtk.1045678.n5.nabble.com/Updating-and-destroying-the-pipeline-tp1243833p1243834.html">http://vtk.1045678.n5.nabble.com/Updating-and-destroying-the-pipeline-tp1243833p1243834.html</a></font><div>
<br></div><div>The crucial change is to make a copy disconnected from the pipeline (bold).</div><div><br></div><div><div><font face="'courier new', monospace">typedef itk::ImageToVTKImageFilter<VisualizingImageType> itkVtkConverter;</font></div>
<div><font face="'courier new', monospace">itkVtkConverter::Pointer conv=itkVtkConverter::New();</font></div><div><font face="'courier new', monospace">conv->SetInput(reader->GetOutput());</font></div>
<div><font face="'courier new', monospace"> </font></div><div><font face="'courier new', monospace"><b>conv->Update();</b></font></div><div><font face="'courier new', monospace"><b>vtkSmartPointer<vtkImageData> vtkImage = vtkSmartPointer<vtkImageData>::New();</b></font></div>
<div><font face="'courier new', monospace"><b>vtkImage->ShallowCopy(conv->GetOutput());</b></font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">vtkSmartPointer<vtkGPUVolumeRayCastMapper> mapper =</font></div>
<div><font face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkGPUVolumeRayCastMapper>::New();</font></div><div><font face="'courier new', monospace">mapper->SetInput(vtkImage); </font></div>
<div><font face="'courier new', monospace">volume->SetMapper( mapper );</font></div></div><div><br><div class="gmail_quote">2012/3/7 Dženan Zukić <span dir="ltr"><<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font><font face="verdana,sans-serif">Hi,</font></font><div><font><font face="verdana,sans-serif"><br></font></font></div>
<div><font><font face="verdana,sans-serif">I am trying to migrate to latest VTK, but my project crashes when using git version of VTK (also v5.8). Currently I am using v5.6.1. Win7 x64, ITK4 (but I think the same was happening with 3.20 last year), VS2010, QT 4.8 (similarly with 4.7).</font></font></div>
<div><font><font face="verdana,sans-serif"><br></font></font></div><div><font><font face="verdana,sans-serif">A self-contained mwe is attached. The first frame is rendered correctly, but any subsequent frame causes a crash in </font></font><font face="verdana, sans-serif">itkVTKImageExportBase.cxx, line 194 (UpdateInformationCallbackFunction</font><span style="font-family:verdana,sans-serif">). I tested this at home, which is a pretty clean system (only one version each of dev libs and tools, not 3-5 versions each like at university).</span></div>
<div><span style="font-family:verdana,sans-serif"><br></span></div><div><span style="font-family:verdana,sans-serif">Can someone verify this? If it is not a bug in VTK or itkVTKglue, what am I doing wrong?</span></div><div>
<span style="font-family:verdana,sans-serif"><br></span></div><div><span style="font-family:verdana,sans-serif">Regards,</span></div><div><span style="font-family:verdana,sans-serif">Dženan</span></div>
</blockquote></div><br></div></div>