[Insight-developers] a question

Zhijun Zhang zjzhang at ee.cuhk.edu.hk
Thu Jun 23 12:04:28 EDT 2005


Dear  vtk&itkers:

        I have two problem with vtk itk and MFC integration.  I have a 
registration program which was formerly written by using  vtk4 and MFC.   I 
use a MFC document and view structure to implement this. I open a MFC window 
and then pass the handle to a vtkRenderwindow, then the 2D slice of the 
registered image (vtkImageData files) can be shown in a window ,  this works 
good for the registration although the MFC message loop processes many 
message which should be processed by the vtkRenderwindow, and some operation 
such as zoom and shift are void in these MFC window. I am wondering how to 
solve this and whether there is an example for this?
          Then the second problem is a more serious problem, I met it when I 
am trying to combine the registration method into my former vtk+MFC 
registration program. For example, I want to use the demons method to 
register two 3D image, I use itkimagereader to read these images, then use 
itkimageexport -->vtkImageImport to transfer to my former vtkImageData to be 
shown in the former program.  But the program generate a error each time 
when I try to open the images, it will occured when the itkimagereader 
updates,  the error stops when executing this function:

void VTKImageExportBase::UpdateInformationCallbackFunction(void* userData)
{
  static_cast<VTKImageExportBase*>(userData)->
    UpdateInformationCallback();
}
I have seen a similar error at 
http://public.kitware.com/pipermail/insight-users/2003-April/003226.html  , 
it seems the problem has been solved, but I have tried the most newest 
vtk4.4 and itk2.01 to build the program, the program still exists,
I don't know whether you have these kind of problem or maybe some of you can 
give some hints.


regards,
Alex





More information about the Insight-developers mailing list