[vtkusers] Pointer to VTK Volume

NullPointer skull2crush at hotmail.com
Thu Feb 5 07:22:31 EST 2009


Hi all,

I'd like to obtain a "raw" pointer (to be used in a native OpenGL
application) from a VTK volume
WITHOUT allocating memory (therefore doubling the space needed). The goal is
to implement
a texture shader...

I checked vtkImageExport but always get an application crash when used (even
when setting
an already allocated buffer).
...
vtkImageExport * exporter16Bit = vtkImageExport::New();
exporter16Bit->SetInput(
(*start).second.SeriesMetaObject_.VtkSigned16BitVolume );
(*start).second.SeriesMetaObject_.RawSigned16BitVolume =
(void*)malloc(exporter16Bit->GetDataMemorySize()/sizeof(short));
exporter16Bit->SetExportVoidPointer(
(*start).second.SeriesMetaObject_.RawSigned16BitVolume ); 
//exporter16Bit->Export(); // -> CRASH
...

Is there a better way to obtain something similar as I try to do with the
code snippet above?

Thank you very much for hints & tips.

Best Regards,
Peter


-- 
View this message in context: http://www.nabble.com/Pointer-to-VTK-Volume-tp21848802p21848802.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list