[vtkusers] Project crashes when linked to v5.8+, works with v5.6
Dženan Zukić
dzenanz at gmail.com
Tue Mar 13 07:21:47 EDT 2012
I solved the problem using advice from this post:
http://vtk.1045678.n5.nabble.com/Updating-and-destroying-the-pipeline-tp1243833p1243834.html
The crucial change is to make a copy disconnected from the pipeline (bold).
typedef itk::ImageToVTKImageFilter<VisualizingImageType> itkVtkConverter;
itkVtkConverter::Pointer conv=itkVtkConverter::New();
conv->SetInput(reader->GetOutput());
*conv->Update();*
*vtkSmartPointer<vtkImageData> vtkImage =
vtkSmartPointer<vtkImageData>::New();*
*vtkImage->ShallowCopy(conv->GetOutput());*
vtkSmartPointer<vtkGPUVolumeRayCastMapper> mapper =
vtkSmartPointer<vtkGPUVolumeRayCastMapper>::New();
mapper->SetInput(vtkImage);
volume->SetMapper( mapper );
2012/3/7 Dženan Zukić <dzenanz at gmail.com>
> Hi,
>
> 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).
>
> A self-contained mwe is attached. The first frame is rendered correctly,
> but any subsequent frame causes a crash in itkVTKImageExportBase.cxx,
> line 194 (UpdateInformationCallbackFunction). 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).
>
> Can someone verify this? If it is not a bug in VTK or itkVTKglue, what am
> I doing wrong?
>
> Regards,
> Dženan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120313/f49ea6a5/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bugTester.zip
Type: application/zip
Size: 2362 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120313/f49ea6a5/attachment.zip>
More information about the vtkusers
mailing list