[Insight-users] question about image and mesh interaction

wanlin wanlinzhu at gmail.com
Sun Mar 6 20:32:42 EST 2011


It's easier to get them if you are using itk::QuadEdgeMesh. Basically it
looks like

For each input point
QEType *       edge = mesh->FindEdge(inputPointId);
QEType *       temp = edge;

  do
 {
cell_id = temp->GetLeft();
point_id = temp->GetDestination();
temp = temp->GetOnext();
}
while ( temp != edge );



wanlin

On Mon, Mar 7, 2011 at 11:35 AM, Alexander Taghva <alextaghva at gmail.com>wrote:

> 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.
>
>
> On Sat, Mar 5, 2011 at 6:03 PM, wanlin <wanlinzhu at gmail.com> wrote:
>
>>
>> Hi, Alexander,
>>
>> On Sun, Mar 6, 2011 at 2:22 AM, Alexander Taghva <alextaghva at gmail.com>wrote:
>>
>>> Hello,
>>> 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:
>>>
>>
>> 1. Calculate statistics (e.g. median intensity) for all image points
>>> inside the mesh.
>>>
>> You can use itk::TriangleMeshToBinaryImageFilter to get binary image of
>> your mesh, then perform statistics operation using
>>  itk::StatisticsLabelMapFilter. (Not sure the performance, i guest you
>> will do it in each iteration).
>>
>>>
>>> 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).
>>>
>>> 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)?
>>
>>
>>> 3. Extract the final brain image (specifically, label all points outside
>>> the mesh 0) after deformation.
>>>
>>>  itk::TriangleMeshToBinaryImageFilter and itk::MaskImageFilter
>>
>> Sorry for the length of this post.  Thanks for your help.
>>>
>>>
>>>
>>
>> wanlin
>>
>>
>
>
> --
> Alexander Taghva, MD
> Department of Neurological Surgery
> Keck School of Medicine, University of Southern California
> Fellow, Functional Neurosurgery at Ohio State University
> 614-366-2420
> alextaghva at gmail.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110307/8978ec37/attachment.htm>


More information about the Insight-users mailing list