[vtkusers] Data cannot transfer between different dll when link VTK in static mode

yirui1210 523480317 at qq.com
Sat Jul 21 04:08:42 EDT 2018


I build VTK 8.0 in static mode in Windows 10, VS2015, and I write a simple demo which has two dll modules. The data is transferred as following: 
(1) read data in module 1 and save it, this is no problem.
(2) transfer the data in module 1 to module 2.
(3) write the data in module 2, but there is error, the saved data is empty.
I have traced the code in VTK roughly, the image extent is [0, -1, 0, -1, 0, -1], but I can retrieve the pixel, the pixel value can be get correctly. The demo code I used is attached in this email, any help or tips will be appreciated, thank you!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180721/efeaab61/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: demo_link_vtk_in_static_mode.zip
Type: application/octet-stream
Size: 230881 bytes
Desc: not available
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180721/efeaab61/attachment-0001.obj>

More information about the vtkusers mailing list