<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">The value difference is 1024, implying that bit 10 is unset.  Odd.<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF807954"><font color="#000000" size="2" face="Tahoma"><b>From:</b> vtkusers [vtkusers-bounces@vtk.org] on behalf of Matias Montroull [matimontg@gmail.com]<br>
<b>Sent:</b> Tuesday, 28 January 2014 2:05 p.m.<br>
<b>To:</b> David Gobbi<br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Subject:</b> Re: [vtkusers] vtkUnsignedShortArray question<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr"><span style="font-family:arial,sans-serif; font-size:13px">Well, the bottom if my image is this:</span>
<div style="font-family:arial,sans-serif; font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif; font-size:13px">
<div class="im">
<div>48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248</div>
<div>48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248</div>
<div>48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248</div>
<div>48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248</div>
<div>48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248</div>
</div>
<div>48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248</div>
<div class="im">
<div>48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248</div>
<div>48 248 48 248 48 248 48 248 48</div>
<div><br>
</div>
<div><span style="color:rgb(34,34,34)">I can't figure out, maybe is because some attribute the image has that vtk converts the bytes into ushort somewhat different?</span></div>
<div>I've attached an image sample in my last email but didn't go through..</div>
<div><br>
</div>
<div>Thanks!</div>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Mon, Jan 27, 2014 at 9:37 PM, Matias Montroull <span dir="ltr">
<<a href="mailto:matimontg@gmail.com" target="_blank">matimontg@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">Well, the bottom if my image is this:
<div><br>
</div>
<div>
<div class="im">
<div>48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248</div>
<div>48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248</div>
<div>48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248</div>
<div>48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248</div>
<div>48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248</div>
</div>
<div>48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248</div>
<div class="im">
<div>48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248</div>
<div>48 248 48 248 48 248 48 248 48</div>
</div>
</div>
<div><br>
</div>
<div>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?</div>
<div><br>
</div>
<div>Thanks,</div>
</div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Mon, Jan 27, 2014 at 8:55 PM, David Gobbi <span dir="ltr">
<<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
Hi Matias,<br>
<br>
When the vtkDICOMImageReader reads an image, it reads the bottom<br>
row of the image first.  That might be the cause of the difference that<br>
you are seeing.<br>
<br>
As far as I'm aware, all of the VTK image readers store the images<br>
bottom-to-top in the data array.  They do it this way in order to be<br>
consistent with each other, and to be consistent with VTK's display<br>
coordinate system.<br>
<span><font color="#888888"><br>
  David<br>
</font></span>
<div>
<div><br>
<br>
On Mon, Jan 27, 2014 at 3:30 PM, Matias Montroull <<a href="mailto:matimontg@gmail.com" target="_blank">matimontg@gmail.com</a>> wrote:<br>
> Why the vtkUnsignedShortArray returns a different ushort value than the one<br>
> in the image?<br>
><br>
> See the beginning of my image is: (2 bytes each pixel)<br>
><br>
> 48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248<br>
> 48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248<br>
> 48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248<br>
> 48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248<br>
> 48 248 48 248 48 248 48 248 48 248 48 248 48 248 48 248<br>
> 48 248 48 248 48 248<br>
><br>
> and vtk returns 62512 on every ushort when it should return 63536!<br>
><br>
> Can you explain why is this or am I missing something?<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>