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.<br>
<br><div class="gmail_quote">On Sat, Mar 5, 2011 at 6:03 PM, wanlin <span dir="ltr"><<a href="mailto:wanlinzhu@gmail.com">wanlinzhu@gmail.com</a>></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 class="im">On Sun, Mar 6, 2011 at 2:22 AM, Alexander Taghva <span dir="ltr"><<a href="mailto:alextaghva@gmail.com" target="_blank">alextaghva@gmail.com</a>></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 class="im">
<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 class="im"><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 class="im">
<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>-- <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>