Hi,<br><br>I forgot one detail. Not the distance between any voxels, but the distance between the 2 white (255) farthest voxels on a black (0) background!<br><br>Thank you.<br><br>Regards,<br><br><div class="gmail_quote">2011/6/12 Terry Yoo <span dir="ltr"><<a href="mailto:tyoo@mail.nih.gov">tyoo@mail.nih.gov</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
Pedro:<br>
<br>
x^2 + y^2 + z^2 = d^2<br>
<br>
Simply: The farthest distance is from one corner to the opposite corner of a rectangular volume.<br>
<br>
max-distance = Sqrt((x-max * x-max) + (y-max * y-max) + (z-max * z-max))<br>
<br>
Or am I missing something, Pedro? Were you asking something else?<br>
<br>
-Terry<br>
<br>
Terry S. Yoo, PhD<br>
Office of High Performance Computing and Communications<br>
National Library of Medicine<br>
National Institutes of Health<br>
<a href="mailto:tyoo@mail.nih.gov">tyoo@mail.nih.gov</a><br>
<div><div></div><div class="h5"><br>
<br>
<br>
On Jun 11, 2011, at 4:54 PM, Pedro Névoa wrote:<br>
<br>
> Hello,<br>
><br>
> Does anyone know a method to calculate the distance between the 2 farthest voxels of an image?<br>
><br>
> Thank you.<br>
><br>
> Regards,<br>
><br>
> --<br>
> Pedro Névoa<br>
><br>
</div></div>> <ATT00001..txt><br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Pedro Névoa<br><br>