[vtk-developers] vtkImageReader2.cxx : FileLowerLeft default ?

oc-spam66 oc-spam66 at laposte.net
Sun Aug 17 06:33:03 EDT 2008


[Sorry for my first post to vtkusers at vtk.org instead of here]

Hello,

Could you change the default of "FileLowerLeft" in vtkImageReader2.cxx ?
The default is currently "0" and I think it should be "1".

Explanation :

Consider a file containing a 3D structured points dataset of scalars (the file is the succession of scalar values S_i, i = 1...(Nx*Ny*Nz)). Suppose the file is created with the following order : x increases first, then y increases and then z increases.

When I read this file with vtkImageReader, the data are arranged in the vtkDataArray with the following order : x increases first, then y DECREASES and then z increases.

I finally found that it is necessary to use "FileLowerLeftOn()" in order to have the expected order for y. I think that the current situation (where x,z increase and y decreases) is a gotcha. So if there is no side effect, could you consider changing the default ? this may prevent others from falling in this gotcha.

Regards,

O.C.

Note : I attach a short and self contained python script showing the behavior.

 Créez votre adresse électronique prenom.nom at laposte.net 
 1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20080817/6ca55e32/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestImportVTK.py
Type: text/x-python
Size: 1298 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20080817/6ca55e32/attachment-0001.py>


More information about the vtk-developers mailing list