Import Voxels - How to Assign Materials?
-
Hello,
I'm trying to import a complex voxel model into Sim4Life.
That part works, along with the "VIP Descriptor File". However, in the Simulation tab, I can't figure out how to drag the model into the simulation.
I get a "cross out" symbol when I try to drag it into either the main simulation, or the Materials tab.
Any ideas?
I did not try "Create Solids" - do I need to do that?
Also, is there any quick way to assign materials?
Thank you!
-
The simulations don't support imported voxels directly. Instead, the preferred workflow is to voxel solids or closed surface meshes.
You can enable "Create Solids" when you import the voxels. This will create solids by extruding contours in each slice.
However, instead I would recommend importing the voxels, extracting surfaces using the Surface Extraction tool. The surfaces will be a smoother representation of the geometry (anatomy). This is how we create the ViP models from an image segmentation.
-
Thank you very much!
I'll try this.
Just out of curiosity, is there a way to keep the imported voxels as-is and then force the simulation grid to match the existing voxels for that portion of the grid? i.e. effectively "skip" the voxelizing step since the voxels are already made?
-
As far as I know this is not possible. I think the reason is mainly
- many users use CAD or ViP models, these are represented as closed surfaces (solids)
- depending on the frequency/physics, you often need to adapt the resolution, which makes starting from smooth surface representations preferable
- mesh independency studies (increasing simulation grid resolution until numerical solution converges) are more natural if you start from a solid/closed surface model
- simulations often include electrodes, which are typically modeled using CAD. If the imported voxels are too coarse, the electrode may be exaggerated in size/or not voxeled at all
- padding could be added on the fly (so not a big issue)
On the other hand, starting from voxels should not be that difficult to implement. I will discuss with colleagues whether this could be targeted for upcoming releases.
-
Oh interesting, thank you very much!
So Generate Surfaces seems to work - then if I drag the whole model into the EM simulation, all of the materials go into a new Material Settings child node.
How can I make sure that the proper tissue properties are assigned to the materials? It seems like all the "Controller" tissue properties options are grayed out.
Making the voxels does show differentiation in the model; however I'm not sure that the proper conductivity/permittivity/etc. are being assigned.
Do I need to do this manually one by one (drag each material into the simulation separately)? Or is there another way to do this? I'm comfortable with Python if need be.
Thank you!
-
Answering my own question:
In the Modelling tab (not simulation), each imported label/voxel type can be assigned a material in the Controller window.
Auto Assign seems to work decently well if the materials in the file are well named.
Probably should be done before dragging the model into the Simulation.
-