<br>Hi, Alexander,<div><br><div class="gmail_quote">On Sun, Mar 6, 2011 at 2:22 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;">
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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">1. Calculate statistics (e.g. median intensity) for all image points inside the mesh.<br></blockquote><div>
You can use itk::TriangleMeshToBinaryImageFilter to get binary image of your mesh, then perform statistics operation using </div><div> itk::StatisticsLabelMapFilter<font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="font-size: 12px;">. (Not sure the performance, i guest you will do it in each iteration).</span></font></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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>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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
3. Extract the final brain image (specifically, label all points outside the mesh 0) after deformation. <br><br></blockquote><div> itk::TriangleMeshToBinaryImageFilter and itk::MaskImageFilter</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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>wanlin </div></div><br></div>