nipy / mindboggle

Automated anatomical brain label/shape analysis software (+ website)
http://mindboggle.info
Other
145 stars 54 forks source link

Defining surface patch boundaries #18

Closed binarybottle closed 11 years ago

binarybottle commented 11 years ago

Martin Reuter (6/12/2013):

I think you can define a boudnary vertex as one where any of its edges is on the boundary. A boundary edge is one that only is in a single triangle.

The other way does not work: and edge with both vertices on the boundary is not necessarily a boundary edge!

binarybottle commented 11 years ago

forrest -- perhaps you could use our find_faces_at_edges() function in mesh.py? the sublists with a single entry would be edges with a single face. a possible alternative would be to use our find_neighbors() function and simply find the sublists with fewer than three neighbors, corresponding to vertices with a maximum of two connected vertices -- would this work, martin?

martin -- why doesn't the other way work? if two vertices are on the boundary, wouldn't their shared edge be a boundary edge for a triangular surface mesh?

binarybottle commented 11 years ago

Martin Reuter (6/14/2013): you need to find boundary edges first and then boundary vertices (It does not matter if you use a label to define your surface patch, that's a pre-step). The labels are defined for triangles right? So they determine if a triangle is inside or outside? Or is it for vertices (would be weird, because vertices are the boundaries of edges, which are the boundaries of triangles, so they are in several triangles and can therefore be in several patches, or do you not cut along edges?

Anyway to the other question, it happens that two vertices are on the boundary, but the edge connecting them is not a boundary edge (e.g. the diagonal of a square).

binarybottle commented 11 years ago

we are using labeled vertices! this is how they were manually assigned within freesurfer for the mindboggle-101 data, and it is how we represent the label data in our vtk files (one label per vertex). i assume that the coordinates for the vertices are label samples, and that the edges are artifacts of the meshing procedure.

binarybottle commented 11 years ago

Martin Reuter (6/14/2013): This way the full surface will not be equal to the union of patches, there will be a strip of triangles between each two labels that separates the patches. Seems that's the way FS does it. Well anyway, you still can define your patches that way (include only triangles where all three vertices are the same label). You could even include triangles where at least 2 vertices have the same label, that way you'd only lose a few triangles where 3 labels touch.