FEM Mesh Analysis & Visualization in Model Module

FEM Mesh Analysis & Visualization in Model Module (refers below picture :-))

in other words, for example.

each mesh, i want to calculate mesh volume and display different color corresponding to the volume.

Does “Information” section shows the correct volume?
You can color each mesh using a solid color (Display/Visibility/Color) or you can use scalars to color different parts of a model with different colors.

Does “Information” section shows the correct volume?
==> yes^^

You can color each mesh using a solid color (Display/Visibility/Color)
==> all of the mesh was drawn by same color ^^;
i want to color each mesh with different color.
each mesh, i want to calculate mesh volume and display different color corresponding to each mesh(not all of the mesh)

    i think that Threshold in Scalars section can be used to calcuate color(0~255)
    i am now finding the source code related to this issue.

I found source code inqMRMLModelDisplayNodeWidget.cxx.
in this source code. i can calcuate and set the color on each mesh from the input of Value in Model Display Widget UI ex. Threshold(Scalors section)

You can assign a color to each mesh cell or point by assigning a scalar array to them and then configuring coloring in Models module’s Scalars section.

1 Like

Scalar Array? for example?
It means only editing Scalar Section in Model module can differentiate color each mesh or point?

Normally you assign scalar values to points or cells of your mesh when generate the mesh (e.g., you can have a scalar attribute to specify material or a physical quantity).

How did you generate the mesh?

How did you generate the mesh?
==>Tetzen(Segment Mesher) on segmented surface of Brain Volume^^. I described in detail. plz refer below texts

Normally you assign scalar values to points or cells of your mesh when generate the mesh (e.g., you can have a scalar attribute to specify material or a physical quantity).
==> i am now reading manual_tezen.pdf :slight_smile: Would u plz introduce using Scalar Array by example code? . My Mesh Analysis is related with Laplacian Equation, so i want to calculate laplacian function on each mesh cell(or point)

You can assign a color to each mesh cell or point by assigning a scalar array to them and then configuring coloring in Models module’s Scalars section.
==> I found it Scalars section, Active Scalar
image

===========================================================

Finite Element Mesh Generation & Visualization for Brain Volume Analysis

Input : Brain MR Volume

Output : FE Mesh Generation

Workflow :
1.DICOM Import
2.Segment Editor
3.Segment Mesher
4.Models

After 1.DICOM Import

2.Segment Editor -> Choose Interested RT Structure(Surface Segment)


image

3.Segment Mesher -> Meshing method(TetGen) -> Apply

4.Models

You need to use Cleaver to generate multi-material meshes.

Tetgen could probably generate multi-material meshes too, but since it seemed quite complicated to set it up, and Tetgen had some stability issues, and comes with restrictive (GPL-type or commercial) license, we did not spend much time with improving Tetgen support. Cleaver works nicely, supports multiple materials, and freely usable, with non-restrictive license.

Thank you so much, i am now reading cleaver mesh rendering process

Normally you assign scalar values to points or cells of your mesh when generate the mesh

(e.g., you can have a scalar attribute to specify material or a physical quantity).
==> How can i set a scalar attribute… would introduce sample code(or workflow). i want to set individual color on each mesh(or point) by scalar array eg. laplacian equation y=ax+b )

(i didn’t find the corresponding source code or document )