Multi-labeled images to multiple manifold surface meshes

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Multi-labeled images to multiple manifold surface meshes

Sapphri
Hello,

I have a gray level image with multiple labels (1, 2, 3, ... ). I want to
form a surface mesh for each, such that the boundaries between labels are
aligned (e.g. what happens when running CGAL::make_mesh_3 on a domain with
multiple labels).

A similar post said to run CGAL::make_mesh_3 on the images and export them
to .off files:

http://cgal-discuss.949826.n4.nabble.com/Isosurfaces-from-Gray-level-image-td4661158.html

However, when I try this the outputs are not manifold and have to be
remeshed and many non-manifold regions have to be manually removed.

I have run the surface mesh generation on each individual label and have
gotten all manifold outputs, but the boundaries between labels are not
aligned.

Should I extract each surface from the mesh_complex_3_in_triangulation and
run polygonal mesh repair? Or is there a way to get the surface mesh
generation to mesh multiple surfaces at once?

Thanks!



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Multi-labeled images to multiple manifold surface meshes

Sebastien Loriot (GeometryFactory)
Did you pass the manifold()  option?

https://doc.cgal.org/latest/Mesh_3/group__PkgMesh3Parameters.html#ga67c9c42cfafc22044cc74c704c29aa76

Best,

Sebastien.

On 9/7/20 12:09 AM, Sapphri ([hidden email] via cgal-discuss Mailing
List) wrote:

> Hello,
>
> I have a gray level image with multiple labels (1, 2, 3, ... ). I want to
> form a surface mesh for each, such that the boundaries between labels are
> aligned (e.g. what happens when running CGAL::make_mesh_3 on a domain with
> multiple labels).
>
> A similar post said to run CGAL::make_mesh_3 on the images and export them
> to .off files:
>
> http://cgal-discuss.949826.n4.nabble.com/Isosurfaces-from-Gray-level-image-td4661158.html
>
> However, when I try this the outputs are not manifold and have to be
> remeshed and many non-manifold regions have to be manually removed.
>
> I have run the surface mesh generation on each individual label and have
> gotten all manifold outputs, but the boundaries between labels are not
> aligned.
>
> Should I extract each surface from the mesh_complex_3_in_triangulation and
> run polygonal mesh repair? Or is there a way to get the surface mesh
> generation to mesh multiple surfaces at once?
>
> Thanks!
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Multi-labeled images to multiple manifold surface meshes

Sapphri
Ah, no I wasn't. Thanks!

The description on the manifold tag indicates that make_mesh_3 can only
terminate if the input surface is manifold - how does this correspond to
voxel image inputs? As mentioned, I've been able to surface mesh each image
label independently with manifold output, but passing the manifold() option
into make_mesh_3 seems to not terminate (it takes ~8 minutes to generate a
volumetric mesh without the manifold() option, but has taken 2 hours so far
with the manifold() option).



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Multi-labeled images to multiple manifold surface meshes

Sebastien Loriot (GeometryFactory)
If it takes hours, it probably means that the input is not manifold
and the mesher cannot make something non-manifold manifold.

I think I already saw that while meshing grey images and it was due
to noise or a too large range of the grey level values.

If you provide a program we can compile and run somebody might be able
to have a look at it if you can't find out.

Best,

Sebastien

On 9/7/20 6:56 PM, Sapphri ([hidden email] via cgal-discuss Mailing
List) wrote:

> Ah, no I wasn't. Thanks!
>
> The description on the manifold tag indicates that make_mesh_3 can only
> terminate if the input surface is manifold - how does this correspond to
> voxel image inputs? As mentioned, I've been able to surface mesh each image
> label independently with manifold output, but passing the manifold() option
> into make_mesh_3 seems to not terminate (it takes ~8 minutes to generate a
> volumetric mesh without the manifold() option, but has taken 2 hours so far
> with the manifold() option).
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Multi-labeled images to multiple manifold surface meshes

Sapphri
That would be great!

Here is the code, with images:
https://github.com/Astroglia/temp_cgal_meshgen

The images are also there ( test_aligned.inr is what the c++ program uses).
test_aligned.tiff is there for visualization.

the main function is in Project2/Project2.cpp . Please change line 32 to
whatever your image path is. Otherwise it's essentially just from the volume
meshing tutorials.

The image stack in the repository is quite smooth, and just a small subset
(20) of the total images (900). However, it's still giving me issues. Is
there a subdomain limit? There are 4 separate labels in that imageset.



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss