[vtkusers] Importing third-party data -- Who owns the data when?

Nick Overdijk nick at astrant.net
Wed Jun 12 03:50:49 EDT 2013


Hello all,

I was wondering when vtkImageImport copies my data. What I have now, in
pseudocode:

// Our image class can be converted to an itk::ImportImageFilter
our::Image x;
itk::ImportImageFilter itkImage = create_itk_image(x);

// Prepare for export to VTK
itk::VTKImageExport exporter = itkImage.GetOutput();

// Import into VTK
vtkImageImport importer;
importer.SetAllCallbacks(exporter.callbacks);
importer.UpdateWholeExtent();
importer.ClearAllCallbacks();

Then, I have created an importer which holds all the data an no connection
to the exporter anymore? Is this an okay way to do this?

Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130612/237d23ac/attachment.htm>


More information about the vtkusers mailing list