[vtkusers] Link between ITK-VTK and QT

Malsoaz James jmalsoaz at yahoo.fr
Wed Nov 25 05:27:26 EST 2009


Hello, I'm quite new in the world of ITK/VTK and I'm trying to apply a threshold on an image. Then, I would like to display the result on a Qt window (without saving it in a new file).

Hopefully, I have no problem to apply a threshold on an image, my question is more related to the link between ITK, VTK and Qt.

First, in order to link ITK and VTK, I have been using itk::VTKImageExport and vtkImageImport as follow:

typedef itk::VTKImageExport< ImageType > ExportFilterType;
ExportFilterType::Pointer itkExporter = ExportFilterType::New();
itkExporter->SetInput(filter->GetOutput());
vtkImageImport* vtkImporter = vtkImageImport::New();
ConnectPipelines(itkExporter, vtkImporter);

I think this is correct and I guess I have now my result "from a VTK view". 

The next step is to do the link between VTK and Qt. Unfortunately, I'm quite lost. I guess I should use QVTKWidget. But I don't know how to use it properly and I don't really find any interesting help.
1) Should I convert my vtkImporter to a texture or something similar ?
2) How to display it on a Qt window ? on a window using a Pixmap ?
3) I would really appreciate a small sample to show how to do that.

4) One last question, I read about the possibility to do a threshold with VTK, what would be the best ? using ITK or VTK ?

Thank you for your help.
Best
James





      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091125/804046e4/attachment.htm>


More information about the vtkusers mailing list