[vtk-developers] Memory-mapped files in VTK

David Gobbi david.gobbi at gmail.com
Fri May 16 13:21:07 EDT 2014


Hi All,

I've used memory mapped files with VTK in the past, using the python
"mmap" object to create the map and then passing the resulting pointer
to VTK via the SetVoidArray() method.  For large files (several GB) I've
found this to be many times faster than e.g. vtkImageReader2.

My question: has anyone used mmap with VTK in C++?  Specifically,
what I'm interested in doing is adding a new "delete method" to the
SetVoidPointer() method in vtkDataArrayTemplate.h: it already has
"delete methods" for "malloc" and "new", so the idea is to add another
delete method for "mmap" that will call munmap on the pointer.

  David


More information about the vtk-developers mailing list