<div dir="ltr">For vector components, the terminology I prefer is "packed" vs. "unpacked", where VTK uses the former -- unless one uses the new SOA data arrays ;)<br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 19, 2016 at 10:11 AM, Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">2016-09-19 17:28 GMT+02:00 Berk Geveci <<a href="mailto:berk.geveci@kitware.com">berk.geveci@kitware.com</a>>:<br>
> One thing that makes things a bit confusing is that, in the case of vectors,<br>
> the fastest growing is the vector component. So something like this:<br>
><br>
> (0, 0, 0) u, (0, 0, 0) v, (0, 0, 0) w, (1, 0, 0) u, (1, 0, 0) v, (1, 0, 0) w<br>
><br>
> This makes it a hybrid Fortran and C. Which is pain when mapping these to<br>
> numpy arrays :-)<br>
<br>
</span>Ah. Thankfully working only with single component data so far, but<br>
thanks for the heads up Berk :)<br>
<span class="HOEnZb"><font color="#888888"><br>
Elvis<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> -berk<br>
><br>
> On Mon, Sep 19, 2016 at 9:51 AM, Elvis Stansvik<br>
> <<a href="mailto:elvis.stansvik@orexplore.com">elvis.stansvik@orexplore.com</a>> wrote:<br>
>><br>
>> 2016-09-19 15:24 GMT+02:00 Cory Quammen <<a href="mailto:cory.quammen@kitware.com">cory.quammen@kitware.com</a>>:<br>
>> > Elvis,<br>
>> ><br>
>> > VTK image data arrays are stored such that the X dimension increases<br>
>> > fastest, followed by Y, followed by Z.<br>
>> > Concrete example where dimensions of the image are XDIM, YDIM, ZDIM:<br>
>> ><br>
>> > Array index : i,j,k indices<br>
>> > 0 : (0, 0, 0)<br>
>> > 1 : (1, 0, 0)<br>
>> > 2 : (2, 0, 0)<br>
>> > ...<br>
>> > XDIM : (0, 1, 0)<br>
>> > XDIM+1 : (1, 1, 0)<br>
>> > XDIM+2 : (2, 1, 0)<br>
>> > ...<br>
>> > XDIM*YDIM : (0, 0, 1)<br>
>> > XDIM*YDIM + 1 : (1, 0, 1)<br>
>> ><br>
>> > So I guess that is Fortran order?<br>
>><br>
>> Right, thanks for the clarification Cory.<br>
>><br>
>> Elvis<br>
>><br>
>> ><br>
>> > HTH,<br>
>> > Cory<br>
>> ><br>
>> > On Mon, Sep 19, 2016 at 1:40 AM, Elvis Stansvik<br>
>> > <<a href="mailto:elvis.stansvik@orexplore.com">elvis.stansvik@orexplore.com</a>> wrote:<br>
>> >> Hi all,<br>
>> >><br>
>> >> This is a simple question: I haven't been able to find any info on<br>
>> >> whether arrays (images, ...) are stored in row major (C) or column<br>
>> >> major (Fortran) order in VTK.<br>
>> >><br>
>> >> I assumed they are in C order, but then I saw this blog post:<br>
>> >><br>
>> >><br>
>> >> <a href="https://blog.kitware.com/developing-hdf5-readers-using-vtkpythonalgorithm/" rel="noreferrer" target="_blank">https://blog.kitware.com/<wbr>developing-hdf5-readers-using-<wbr>vtkpythonalgorithm/</a><br>
>> >><br>
>> >> In a comment the author says<br>
>> >><br>
>> >> # Note that we flip the dimensions here because<br>
>> >> # VTK's order is Fortran whereas h5py writes in<br>
>> >> # C order. We don't want to do deep copies so we write<br>
>> >> # with dimensions flipped and pretend the array is<br>
>> >> # C order.<br>
>> >><br>
>> >> which made me a little unsure. What is the array order of the data<br>
>> >> classes in VTK, and is it the same for all classes?<br>
>> >><br>
>> >> Thanks,<br>
>> >> Elvis<br>
>> >> ______________________________<wbr>_________________<br>
>> >> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
>> >><br>
>> >> Visit other Kitware open-source projects at<br>
>> >> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
>> >><br>
>> >> Please keep messages on-topic and check the VTK FAQ at:<br>
>> >> <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
>> >><br>
>> >> Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
>> >><br>
>> >> Follow this link to subscribe/unsubscribe:<br>
>> >> <a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > Cory Quammen<br>
>> > Staff R&D Engineer<br>
>> > Kitware, Inc.<br></div></div></blockquote></div></div></div>