[Insight-developers] QuadEdgeMesh related filters

Alexandre GOUAILLARD agouaillard at gmail.com
Wed Oct 6 00:11:57 EDT 2010


hi mahnaz,

I would be a good person to direct your questions regarding
QuadEdgeMesh. Please copy them to the developper mailing list too, to
give opportunity to other to answer your questions, so you get more
chance to a quick and good answer.

Yes, your mesh is not a surface. the error message you are getting is
telling you that a given point is already locally a surface (i.e. the
0-ring is full, i.e. there are faces using this point and connected
among themselves such that you cannot add another face using this
point and still have a surface).

Now, in this case, QuadEdgeMesh currently just do not add the face.

Yet it should not crash the filters. I'm going to investigate the crash for you.

regards,

alex.


On Wed, Oct 6, 2010 at 6:56 AM, Mahnaz Maddah <mmaddah at synapse.sri.com> wrote:
>
> Seems my mesh is not a 2D surface somehow as I get the following warnings
> when reading the mesh:
>
> Debug: In
> /fs/corpus1/mahnaz/slicer_debug_release/Slicer3-lib/Insight/Code/Review/itkGeometricalQuadEdge.txx,
> line 312
>  (0x4a052f0): Internal point.
>
> Debug: In
> /fs/corpus1/mahnaz/slicer_debug_release/Slicer3-lib/Insight/Code/Review/itkGeometricalQuadEdge.txx,
> line 399
>  (0x4a052f0): This point is yet surrounded by faces.
>
> I'm not sure if that's what causing the smoothing and decimation filters to
> crash ...
> -Mahnaz
>
>
> On 10/05/2010 01:39 PM, Mahnaz Maddah wrote:
>>
>> Hi Alex,
>>
>>     First of all, please let me know if I should direct these issues to
>> someone else.
>>
>>     I have created a triangulated quad edge mesh with the
>> itkAutomaticTopologyMeshSource filter but both quad edge decimation and
>> smoothing filters crash when being applied (somewhere in inline  functions
>>  of QuadEdge.h). I've attached the vtk file of the mesh, on which I can do
>> such processing in Paraview. My codes work fine for processing another
>> structure, but not for this specific mesh.
>>
>>     Is there any thing that I have to check about the topology of the mesh
>> before calling the decimation filter for instance?
>>
>> Thanks,
>> -Mahnaz
>>
>>
>> On 09/27/2010 10:47 PM, Alexandre GOUAILLARD wrote:
>>>
>>> hi ,
>>>
>>> sorry for the delay.
>>>
>>> Point have a pointer to ONE (arbitrary) edge on their 0-ring (all the
>>> edges that use this point). From there a simple GetONext() gets you to
>>> the next edge in the ring, *with respect to orientation*. It is an
>>> ordered list. In your case you don't care, you just call ONext(), get
>>> the opposite point, untill you reach back the original edge.
>>>
>>> you have the corresponding code copied all over the filters as it is
>>> quite common to do that. For example, you can look at the smoothing
>>> filter and get that:
>>>
>>>     // for each point
>>>     for ( it = points->Begin(); it != points->End(); ++it )
>>>       {
>>>       // get the point
>>>       p = it.Value();
>>>
>>>       // access an edge in the ring
>>>       qe = p.GetEdge();
>>>
>>>       // sanity check: the point must be used by at least an edge for
>>> it to make sense
>>>       if ( qe != 0 )
>>>         {
>>> [...]
>>>
>>>           // need to keep a reference to the original edge to check
>>> the end of the loop
>>>           qe_it = qe;
>>>
>>>           // QuadEdges are oriented, they have thus an Origin and a
>>> Destination point
>>>           // by default, the edges in the ring have the point as Origin
>>>           // get the opposite point (the point
>>>           q = mesh->GetPoint( qe->GetDestination() );
>>>
>>> [...]
>>>           // just get the next edge
>>>           qe_it = qe_it->GetOnext();
>>>           }
>>>
>>>         // while we are not back to the original edge we started from
>>>         while ( qe_it != qe );
>>>
>>> [...]
>>>
>>> hope that helps.
>>>
>>> alex.
>>>
>>>
>>>
>>> On Thu, Sep 9, 2010 at 7:23 AM, Mahnaz Maddah<mmaddah at synapse.sri.com>
>>>  wrote:
>>>>
>>>>  Hi Alex,
>>>>
>>>>     Is there any example code for how to access all the neighbouring
>>>> points
>>>> from a given point on a quad-edge mesh?
>>>>
>>>> Thanks,
>>>> -Mahnaz
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>
>


More information about the Insight-developers mailing list