[vtkusers] vtkUnsignedShortArray question

David Gobbi david.gobbi at gmail.com
Mon Jan 27 18:55:56 EST 2014


Hi Matias,

When the vtkDICOMImageReader reads an image, it reads the bottom
row of the image first.  That might be the cause of the difference that
you are seeing.

As far as I'm aware, all of the VTK image readers store the images
bottom-to-top in the data array.  They do it this way in order to be
consistent with each other, and to be consistent with VTK's display
coordinate system.

  David


On Mon, Jan 27, 2014 at 3:30 PM, Matias Montroull <matimontg at gmail.com> wrote:
> Why the vtkUnsignedShortArray returns a different ushort value than the one
> in the image?
>
> See the beginning of my image is: (2 bytes each pixel)
>
> 48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248
> 48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248
> 48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248
> 48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248
> 48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248
> 48 248 48 248 48 248
>
> and vtk returns 62512 on every ushort when it should return 63536!
>
> Can you explain why is this or am I missing something?


More information about the vtkusers mailing list