<div dir="ltr">yes, odd.. I haven't tested other dicom readers but I can't figure out why vtk converts the 2 bytes to ushort this way.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 27, 2014 at 10:18 PM, Gib Bogle <span dir="ltr"><<a href="mailto:g.bogle@auckland.ac.nz" target="_blank">g.bogle@auckland.ac.nz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">The value difference is 1024, implying that bit 10 is unset.  Odd.<br>
<div style="font-size:16px;font-family:Times New Roman">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b> vtkusers [<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>] on behalf of Matias Montroull [<a href="mailto:matimontg@gmail.com" target="_blank">matimontg@gmail.com</a>]<br>

<b>Sent:</b> Tuesday, 28 January 2014 2:05 p.m.<br>
<b>To:</b> David Gobbi<br>
<b>Cc:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Subject:</b> Re: [vtkusers] vtkUnsignedShortArray question<br>
</font><br>
</div><div><div class="h5">
<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>
<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>
<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>
<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>
<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>
<div>
<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></div>
</div>
</div>

</blockquote></div><br></div>