<meta http-equiv="content-type" content="text/html; charset=utf-8">It&#39;s easier to get them if you are using itk::QuadEdgeMesh. Basically it looks like<div><br></div><div>For each input point<br><div><div>QEType *       edge = mesh-&gt;FindEdge(inputPointId);</div>
<div>QEType *       temp = edge;</div><div><br></div><div>  do</div><div> {</div><div>cell_id = temp-&gt;GetLeft();</div><div>point_id = temp-&gt;GetDestination();</div><div>temp = temp-&gt;GetOnext();</div><div>}</div><div>
while ( temp != edge );</div></div><div><br></div><div><br></div><div><br></div><div>wanlin<br><br><div class="gmail_quote">On Mon, Mar 7, 2011 at 11:35 AM, Alexander Taghva <span dir="ltr">&lt;<a href="mailto:alextaghva@gmail.com">alextaghva@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Thank you for your reply.  What I mean by getting the connection of points in the mesh is that each vertex will be part of multiple triangle faces in the mesh.  For example, you may have one triangle face made up of points numbered 1, 2, 3 and another made of points 1, 4, 5.  Therefore, point 1 is connected to 2, 3, 4, 5.  I guess I am trying to figure out if there is a built-in way to get all edges associated with a vertex in a mesh as well as all faces in the mesh containing a particular vertex.<div>
<div></div><div class="h5"><br>
<br><div class="gmail_quote">On Sat, Mar 5, 2011 at 6:03 PM, wanlin <span dir="ltr">&lt;<a href="mailto:wanlinzhu@gmail.com" target="_blank">wanlinzhu@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">

<br>Hi, Alexander,<div><br><div class="gmail_quote"><div>On Sun, Mar 6, 2011 at 2:22 AM, Alexander Taghva <span dir="ltr">&lt;<a href="mailto:alextaghva@gmail.com" target="_blank">alextaghva@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
Hello,<br>I am relatively new to ITK so I apologize if this is a basic question.  I am working on implementing an algorithm to extract the brain from non-brain on an MRI.  In order to do this, I am using a deformable mesh model.  Specifically, I am using RegularSphereMeshSource and expanding it to match the image.  There are a few things I am trying to figure out how to do efficiently:<br>


 </blockquote><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">1. Calculate statistics (e.g. median intensity) for all image points inside the mesh.<br>

</blockquote></div><div>
You can use itk::TriangleMeshToBinaryImageFilter to get binary image of your mesh, then perform statistics operation using </div><div> itk::StatisticsLabelMapFilter<font face="monospace"><span style="font-size:12px">. (Not sure the performance, i guest you will do it in each iteration).</span></font></div>

<div>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><br>2. Iterate through the mesh to figure out all points connected to any given vertex (when I implemented the algorithm in Matlab/C++ mex files, I built an adjacency list for each vertex).<br>


<br></blockquote></div><div>What is your given vertex, is it a voxel? what is the meaning of connection of points to vertex (if for voxel, is it all points inside a voxel cube)?</div><div><div> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">


3. Extract the final brain image (specifically, label all points outside the mesh 0) after deformation. <br><br></blockquote></div><div> itk::TriangleMeshToBinaryImageFilter and itk::MaskImageFilter</div><div>
<div><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
Sorry for the length of this post.  Thanks for your help.<br>
<br><br></blockquote><div><br></div><div><br></div></div><div>wanlin </div></div><br></div>
</blockquote></div><br><br clear="all"><br></div></div><font color="#888888">-- <br>Alexander Taghva, MD<br>
Department of Neurological Surgery<br>
Keck School of Medicine, University of Southern California<br>
Fellow, Functional Neurosurgery at <span style="border-bottom:2px dotted rgb(54, 99, 136)">Ohio State University</span><br>
<span style="border-bottom:2px dotted rgb(54, 99, 136)">614-366-2420</span><br>
<a href="mailto:alextaghva@gmail.com" target="_blank">alextaghva@gmail.com</a><br>
</font></blockquote></div><br></div></div>