[vtk-developers] vtkImageData, C versus Fortran ordering

Marcus D. Hanwell marcus.hanwell at kitware.com
Wed Jul 19 11:58:54 EDT 2017


We work on Tomviz, and one of its primary goals is to work with volumes in
an intuitive way making heavy use of the volume rendering code. It also
needs to interact with several libraries that operate on volumes, ideally
using our Python NumPy integration and zero copy approaches to process data
in place.

One of the challenges has been preserving the Fortran ordering of the
single component scalar data. We will also be adding support for
multi-component data soon. What are people's thoughts on potentially adding
some API to vtkImageData to mark it as C ordered?

That would largely just geometrically transform how the volume is rendered,
but ensure a contour is correctly extracted and aligned. It would then let
us use the default C ordering, simplifying our application code, and the
current order could remain the default. I would suggest considering the
same for the vtk.js work too.

It is feasible to make these changes in the application logic too, but this
feels like a fairly common problem that others would also hit from time to
time. Maybe I am missing more corner cases, so I am posting this in hopes
of feedback before writing any code (or asking someone else to).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170719/9b01da03/attachment.html>


More information about the vtk-developers mailing list