Use of 3D slicer for creating surface meshes of wood from micro tomograph imagery

Hello,
I am not a current user of slicer3D but I am looking for a software to transform the output of a college doing microtomograph to, ideally a surface mesh of different sections of a scan of wood.

the scans are generated in .tiff format so they are a stack of images, I have experience in meshing but engineering models from CAD or from pre-existing surface meshes so, even thought it is a new world for me I have a slight understanding of it.

currently i am looking for ideally an open source solution to go from the stack of images up to a volumetric mesh for doing numerical simulations, FEM/FVM. as a long time user of paraview, i came across slicer 3D which looks like the correct tool for what i am looking for but i have some questions:
the images looks like this:

some clarification for better understanding of anyone reading for better communication:

  • surface mesh: a triangular (or quadrilateral) mesh of a 3D object, it is on 3D space but it is only the shell of the object.
  • watertight mesh: a surface mesh that one can define an inside and outside of it (closed volume).
  • conformal mesh: a mesh that does not have any non manifold elements, such as hanging elements of surfaces elements that do not close into a volume
  • volumetric mesh: a tetrahedral (or hexahedral/polyhedral) mesh of a 3D object, it is on 3D space but in difference to the surface mesh it is filled up with elements.

my questions about the software are:

  1. from the tiff images can i generate 3D surfaces meshes?

  2. as it can be seen in the image, there are different sections on a wood material, is it possible to divide it by grey scale to distinguish the different ‘materials’ inside the wood and generate separated meshes? (for example if the images are circular with half white half black, can i generate automatically (by setting some thresholds) 2 meshes where each of them will be half a cylinder?

  3. surface meshes (ideally with separated regions question 2.) would allow me to develop the complete workflow, i have other tools to generate the volumetric mesh, but is it possible to generate them in 3D slicer directly? what are the algorithms integrated in case there exists?

  4. is the procedure I mentioned in 1. multi-thread? or GPU accelerated or something similar, where i can speed it up with a workstation? the imagery is quite large in weight as the resolution is really fine

  5. are the surfaces meshes generated, water tight? ideally conformal?

  6. there are scans that are over time, to measure the penetration of liquid inside the material, is something that the software can work on? like deform the surface mesh/ remesh it at each time step?

  7. how easy is the python scripting of slicer 3D? I use almost daily paraview with python, is it similar to it to program with?

  8. to what extend would this kind of work fully automatizable with slicer 3D? (I mean up to the point of getting a watertight surface mesh for each region separately.)

  9. is there any similar tutorials or applications that have been explored already in this kind of application? i saw only medical imagery, but slicer 3D looks quite promising for this kind of application

sorry if i have not being clear enough about any of my questions please do not hesitate as i can complete them with more information if necessary. sadly right now i dont have a file to provide as it is a work i will do in the following months.

thanks in advance,

Big picture is yes, Slicer could be a good tool since many of the features you listed are standard. But your domain is enough different that you may need to adapt things. Slicer is quite configurable, finding application in topics from geology to astrology and many fields of medicine so probably it can do what you want but only you will be able to know the details by trying.

  1. from the tiff images can i generate 3D surfaces meshes?

Yes, see, for example, the ImageStacks feature of SlicerMorph.

  1. as it can be seen in the image, there are different sections on a wood material, is it possible to divide it by grey scale to distinguish the different ‘materials’ inside the wood and generate separated meshes? (for example if the images are circular with half white half black, can i generate automatically (by setting some thresholds) 2 meshes where each of them will be half a cylinder?

Yes, see the Threshold effect in the Segment Editor. Also the Islands too.

  1. surface meshes (ideally with separated regions question 2.) would allow me to develop the complete workflow, i have other tools to generate the volumetric mesh, but is it possible to generate them in 3D slicer directly? what are the algorithms integrated in case there exists?

See the SegmentMesher extension. It’s not perfect at making volumetric meshes for all purposes but it’s a good start and you can compare with other tools.

  1. is the procedure I mentioned in 1. multi-thread? or GPU accelerated or something similar, where i can speed it up with a workstation? the imagery is quite large in weight as the resolution is really fine

Surface mesh generation in Slicer is multithreaded and the new SurfaceNets option is very fast.

  1. are the surfaces meshes generated, water tight? ideally conformal?

Segment surfaces are independent by default in Slicer are primarily for visualization so close but not assured to be watertight in the extreme (look up the JointSmoothing option for details). The Cleaver tool in SegmentMesher will give you a single mesh with material labels. Volumetric meshing in Slicer is an evolving topic, with lots of interest as more simulation tools are being integrated.

  1. there are scans that are over time, to measure the penetration of liquid inside the material, is something that the software can work on? like deform the surface mesh/ remesh it at each time step?

You can certainly do that with a script.

  1. how easy is the python scripting of slicer 3D? I use almost daily paraview with python, is it similar to it to program with?

Slicer python scripting is very powerful. It’s different from Paraview but not hugely. See these examples.

  1. to what extend would this kind of work fully automatizable with slicer 3D? (I mean up to the point of getting a watertight surface mesh for each region separately.)

Yes, this shouldn’t be a problem.

  1. is there any similar tutorials or applications that have been explored already in this kind of application? i saw only medical imagery, but slicer 3D looks quite promising for this kind of application

Tons of different examples, too many to list here. I think you can just browse slicer.org, slicermorph.github.io, and projectweek.na-mic.org to get ideas. Yes, mostly medical but really what you describe is not that much different.

Please do share example data and we can be much more specific about what might or might not be easy to do in Slicer.

1 Like

enormous thanks @pieper , your answer is exactly what i was looking for, deep, and with a good insight on the capabilities (it happened to me so many times that the features were not clear in other softwares but the community was not really active and i spend a lot of time to realize it was not the good tool, well they help on other applications at the end :slight_smile: )

anyways, regarding your answer:

>Segment surfaces are independent by default in Slicer are primarily for visualization so close but not assured to be watertight in the extreme (look up the JointSmoothing option for details). The Cleaver tool in SegmentMesher will give you a single mesh with material labels. Volumetric meshing in Slicer is an evolving topic, with lots of interest as more simulation tools are being integrated.

so if i understand correctly, the volumetric mesh (as everywhere i would say) is something in development (is it tetra? hexa? poly? is generated by octee from what i can see?.

>Slicer python scripting is very powerful. It’s different from Paraview but not hugely. See these examples.

this is awsome, i will check when the time comes, just 2 small questions in this regards:

  1. would you say that it will be possible to fully script it, from a to z (i mean input tiff output surface mesh separated in regions or mesh with different regions in stl?) (i know that you commented that it was not a problem but just to be sure)

  2. does slicer3D have a feature similar to for example paraview, trace tool? where you turn it on, you do whatever you want on the interface (lets say open the tiff file and extract the surface mehs), and then turn off the trace tool, you get a python script that will reproduce what ever you did in the GUI. this is an awsome tool in paraview that helps fast creation of script

>Yes, mostly medical but really what you describe is not that much different.

yeah is what i thought also!

>Please do share example data and we can be much more specific about what might or might not be easy to do in Slicer.

I will try to get the data from my collegues and upload it, keep you in touch,

thanks a LOT!

Most work is on tetrahedera, since that’s what many solvers expect, but Slicer/VTK support hex as well. We have been generating meshes with the external tooling (e.g Cleaver and TetGen) but people have also been experimenting with gmsh and also just making the meshes directly in VTK. Really many things are possible since you can bridge to almost any external software.

I don’t see why not. Sometimes people use external tools like Blender or MeshMixer for specialized tasks. Most things are scriptable except often the segmentation and some mesh repair.

Unfortunately no, that’s not available. Instead we rely on examples (lots of extensions and script snippets) and lately the AI tools are getting to be very useful but they do make mistakes.

1 Like

Thanks a lot for your insight, as you asked me before, here you can find what kind of input file i would have for the slicer3D

if you have a minute or two to see and give me your opinion i would appreciate it.

regards,

That looks like nice data. It loads fine from the multiframe tiff (it seems to get the spacing correct). It’s clean and sharp, but depending one which structures exactly you are trying to segment you may need to experiment a bit. I’ll bet nnInteractive would work to isolate the substructures, but you may also be able to come up with something fully automated. Perhaps for your purposes you can get away with simple thresholding.

1 Like

thanks a lot for taking your time, in two weeks i beging working in this subject and slicer3D will be on one of the top things to work on. I will try to do everything i asked in my first step, but also knowing how the data looks, i think a polycube method could spit out a great hexa mesh. will keep you update!