[vtkusers] vtkImageData from a DLL

Dženan Zukić dzenanz at gmail.com
Wed Nov 2 07:04:04 EDT 2011


You may be compiling the dll and the app using different compiler settings,
such as threading model and/or debug mode. You should check that first.
Also different compiler versions (VS2008 and VS2010) use different runtime
libraries, so that might be mixed up too.

2011/11/1 Mehmet Yiğitsoy <mehmet.yigitsoy at gmail.com>

> Hi,
>
> I have a dll where I do some processing and I do visualization in my
> application. A function in dll returns a vtkImageData pointer and I try to
> visualize it using vtkImageViewer2. However, it seems that vtkImageViewer2
> does not accept the vtkImageData pointer returned by the dll function.
> Following is a scenario where this problem occurs;
>
> MyDllClass* myDllObj = new MyDllClass();
> myDllObj->readImage();
> myDllObj->doProcessing();
>
> myViewer->SetInput( mydllObj->getOutput()) // no problem
>
>
> vtkImageData* result  = NULL;
>
> result = myViewer->GetInput();
>
> // result is still NULL
>
>
> It works fine if I include this function in my application, i.e. if I
> allocate the memory for this object within my application.
>
> I would be happy if someone could point out what the problem might be.
>
> Thanks,
> --
> Mehmet
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111102/e2d34988/attachment.htm>


More information about the vtkusers mailing list