[Insight-users] Genus
alex gouaillard
Alexandre_Gouaillard at hms.harvard.edu
Sun Jun 21 17:18:37 EDT 2009
hi eleni,
look at the code of the method. Comments give you all the infos.
/**
* Number of points
*
* There are two methods to get the number of points.
* 1. itk::QuadEdgeMesh::ComputeNumberOfPoints()
* 2. itk::Mesh::GetNumberOfPoints()
*
* As an itk::QuadEdgeMesh is an itk::Mesh by inheritance, the user
* can use both. 1. will returned the number of points actually
* **USED** by at least one edge, while 2. will give you the number
* of points in the container. Number of unused points can be found
* by making the difference between the two values.
*/
// The euler formula states:
// numFaces - numEdges + numPoints == 2 - 2 * genus - numBounds
// hence ( 2 - numBounds - numFaces + numEdges - numPoints ) must
...
to be able to compute the genus via the euler constant, you need the
number of components and the number of borders on top of the usual
number of vertices edges and faces. The last three are given by the
Mesh API, but not the first two.
There is a BorderInformation class for QEMeshes that does exactly
that. It is used in the ValidateEuler method I mentioned earlier.
Now, this code is not complicated but a little bit tricky (everything
about topology is). You can recode it in your structure if you want
and compare with the result of the existing code. There are good
structures for triangular surfaces meshes, better than QuadEdge
structures, and I encourage you to use them if you are sure to deal
only with those. If you might use polygonal surface meshes, or if you
want to use euler operators, or if you want to work indifferently with
primal / dual ( triangular / simplex ), you might want to consider
QuadEdgeMesh.
alex.
On Jun 21, 2009, at 5:08 PM, Sgouritsa, Eleni wrote:
> Thank you,
> I took a fast look to this class last week.
> Actually I use a derived class of itkMesh for my mesh,
> indexedtrianglemesh that somebody had proposed in the list before.
> For the checker class the ValidateEulerCharacteristic() method
> returns true or false. How can I get the genus of my mesh?
>
> Yes, Kishore solved most of the problems for the Chan & Vese. We are
> still discussing for the remaining.
>
> Regards,
> Eleni
>
> -----Original Message-----
> From: alex gouaillard [mailto:alexandre_gouaillard at hms.harvard.edu]
> Sent: Sun 6/21/2009 3:36 PM
> To: Sgouritsa, Eleni
> Cc: insight-users at itk.org
> Subject: Re: [Insight-users] Genus
>
> hi eleni,
>
> the genus of a mesh, or of it's dual, is the same.
>
> If you use a QuadEdgeMesh, note that you have the primal *and* dual
> mesh connectivity stored in the surface. You have only one geometry
> though (up to you to decide if it is the primal or dual, as it's
> reversible, it's up to the user to decide which one is the primal and
> which one is the dual.)
>
> Again, if you use a QuadEdgeMEsh (which I recommend if you;re going to
> work with surfaces and want to handle topology nicely), you can take a
> look at the itkQuadEdgeMeshTopologyChecker class, and specifically the
> ValidateEulerCharacteristic() method.
> http://www.itk.org/Doxygen/html/classitk_1_1QuadEdgeMeshTopologyChecker.html
> the doxygen documentation is not great (our bad), but the .txx is
> documented.
>
> BTW is everything alright with Chan & Vesse ? I think kishore solved
> most of the problems, right?
>
> let me know if that helps.
>
> alex.
>
>
> On Jun 21, 2009, at 4:14 PM, Sgouritsa, Eleni wrote:
>
> > Hello,
> > is there an itk class to use that gives me the genus of a volume (or
> > its dual mesh)?
> >
> > Regards,
> > Eleni
> >
> > <ATT00001.txt>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090621/133833b8/attachment.htm>
More information about the Insight-users
mailing list