[vtkusers] vtkImageReader2.cxx : FileLowerLeft default ?

David Gobbi david.gobbi at gmail.com
Sun Aug 17 07:55:19 EDT 2008


Hi OC,

Your explanation is correct, but there are two reasons why your change
cannot be done:

1) It would break backwards compatibility

2) Even though the default of FileLowerLeft=0 is against the VTK
convention of the Y coordinate starting at the lower left, it is still
the best default setting because most raw image file formats start at
the upper left, including raw video and photo images, and nearly all
medical images.

In other words, the FileLowerLeft=0 default works best for most people.

Cheers,

   David


On Fri, Aug 15, 2008 at 6:51 PM, oc-spam66 <oc-spam66 at laposte.net> wrote:
> Hello,
>
> I have a proposition :
>
> 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.
>
> Créez votre adresse électronique prenom.nom at laposte.net
> 1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list