NIFTI image to tensor/3d matrix representation

You can use GetScalarPointer to get raw memory pointer to voxel data.

Note that VTK supports different memory layouts, so when you use the memory area check that it has the layout that you expect.