[vtk-developers] vtkImageData, C versus Fortran ordering

Marcus D. Hanwell marcus.hanwell at kitware.com
Wed Jul 26 15:57:34 EDT 2017


On Thu, Jul 20, 2017 at 12:57 PM, Berk Geveci <berk.geveci at kitware.com> wrote:
> My approach with this kind of change has been to create a new subclass of
> vtkDataSet. If you add some meta-data to vtkImageData that is then ignored
> by all or most of algorithms, you will end up with confused users. You could
> potentially do something at the executive layer that can automatically
> transform this new dataset to vtkImageData when using vtkImageData
> algorithms. It should be trivial to add support to the volume rendering code
> after that.

Yes, that was my concern about doing it little by little and
potentially confusing many when it is ignored by filters not aware of
ordering/orientation. There is also the question of how much time is
involved and whether it is worth it - we have a working solution but
it can be a pain, and from some of the responses it seems there are
others feeling the pain. For our application we only need a limited
set of classes to support it, and then it would hopefully act as a
good starting point for other contributors to extend it as they feel
the need.
>
> Given that we are looking at VTK-m for much of the future algorithm, I would
> suggest that VTK-m natively supports both ordering. Then if we replace any
> VTK algorithms with VTK-m implementations, it would work out of box.
>
Certainly, and integration between VTK and VTK-m should be able to
adapt to the different layouts fairly seamlessly. Most of the toolkits
I work with outside of VTK use the C ordering, offering Fortran
ordering by passing in an extra parameter usually. VTK-m and vtk.js
seem like good opportunities to support both out of the box as they
are newer, I will see if we can pursue an additional type so that we
can ensure it either works right or complains upfront.

Thanks,

Marcus


More information about the vtk-developers mailing list