[vtkusers] Array order in VTK?

Elvis Stansvik elvis.stansvik at orexplore.com
Mon Sep 19 01:40:08 EDT 2016


Hi all,

This is a simple question: I haven't been able to find any info on
whether arrays (images, ...) are stored in row major (C) or column
major (Fortran) order in VTK.

I assumed they are in C order, but then I saw this blog post:

    https://blog.kitware.com/developing-hdf5-readers-using-vtkpythonalgorithm/

In a comment the author says

    # Note that we flip the dimensions here because
    # VTK's order is Fortran whereas h5py writes in
    # C order. We don't want to do deep copies so we write
    # with dimensions flipped and pretend the array is
    # C order.

which made me a little unsure. What is the array order of the data
classes in VTK, and is it the same for all classes?

Thanks,
Elvis


More information about the vtkusers mailing list