[vtkusers] vtkImageData from a DLL

Mehmet Yiğitsoy mehmet.yigitsoy at gmail.com
Tue Nov 1 11:27:39 EDT 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111101/4c130ca5/attachment.htm>


More information about the vtkusers mailing list