[vtkusers] vtkUnsignedShortArray question
Matias Montroull
matimontg at gmail.com
Mon Jan 27 20:05:15 EST 2014
Well, the bottom if my image is this:
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 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
I can't figure out, maybe is because some attribute the image has that vtk
converts the bytes into ushort somewhat different?
I've attached an image sample in my last email but didn't go through..
Thanks!
On Mon, Jan 27, 2014 at 9:37 PM, Matias Montroull <matimontg at gmail.com>wrote:
> Well, the bottom if my image is this:
>
> 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 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
>
> I attach a sample, I can't figure out, maybe is because some attribute the
> image has that vtk converts the bytes into ushort somewhat different?
>
> Thanks,
>
>
> On Mon, Jan 27, 2014 at 8:55 PM, David Gobbi <david.gobbi at gmail.com>wrote:
>
>> 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?
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140127/207beeba/attachment.html>
More information about the vtkusers
mailing list