When I try to use the MaskImageFilter, I get an error that there is no member named &quot;SetMaskImage.&quot;  Is there something that has changed in this class since the online examples were written?  I&#39;m using ITK 3.20<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">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 class="im">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 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>