FEM Mesh Analysis & Visualization in Model Module

You can do that by using Segment Editor module (before FEM mesh generation). You can grow a shell on the skin using “Hollow” effect, then cut out rectangular shapes using “Scissors” effect.
==> good but, in the aspect of user, like fiducial tools(below picture),
based on user fiducial 3d point on the surface mesh, it is good to draw for the attaching cube (below picture by the hand) which follows surface normal vector

You can hide the background mesh in Models module / Display / Scalars section, enable Threshold and set lower value to 1.
==>I think it is homogenous mesh than tetzen. i am now tunning cleaver parameter^^

What is your end goal? Why do you need to define those rectangles?

like below, attaching pads(cube structure) on the surface of the brain, and generating mesh for brain electric fields analysis

related paper :
COMETS2: An advanced MATLAB toolbox for the numerical analysis of
electric fields generated by transcranial direct current stimulation

image
image

For this, the approach that I described (create a shell using “Hollow” effect and cut out rectangular parts using “Scissors” effect) should work very well. You can automate everything by writing Python scripts (see examples here). For example, the user defines pad position using a markup fiducial and from your script you generate a box-shaped segment around that point and intersect that with the shell segment to generate the pad segment.

For this, the approach that I described (create a shell using “Hollow” effect and cut out rectangular parts using “Scissors” effect) should work very well. You can automate everything by writing Python scripts (see examples here ). For example, the user defines pad position using a markup fiducial and from your script you generate a box-shaped segment around that point and intersect that with the shell segment to generate the pad segment

==> should work very well. ==> GOOD. very interesting expression^^ ==> I will do it and let the result shared in this page ==> in korea, there’s
Ultrafine dust issue from the China, my body condition is not good today. i am also image processing engineer. i think you lassoan are very enthusiast in 3d slicer image analysis& visualization. thank you for your concern sincerly in my heart .^^

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 am i set Custom Scalar Table(the Scalars->Color Table) or assign the scalar array when generating mesh(cleaver parameter?)

image

You can create/edit colormaps in Colors module. Built-in colormaps are read-only, so you need to make a copy if you want to customize one. A color table is created automatically from current segment names and colors if you export segmentation node to labelmap, so you may use that for coloring, too.

1 Like

is it possible custmized assigning color to the segmentation or cell by the color map. in other words, custmized color function(or linear fomular like y=3x+5) can be built in Color table?

Yes, you can create/modify color nodes using Python or C++ in any way you want. See API specification.

I will do it and let the result share in this pages.

My final goal is to add FEM Analysis after mesh generation.final equation will be more complex and burden to CPU, Intel Math Kernel Library(MKL Solver DSS) may be used for global matrix equation.

Could u indicate contents name about this hollow effect to rectagle on the surface of segment pointed by fiducials? I can’t find similar script^^

See examples here: https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How_to_run_segment_editor_effects_from_a_script

It is hard to me to hollow and scissor exactly

  1. Markup - Fiducial Mark on Skin face
  2. SegmentEditor - Hollow Effect and Scissors

For this, the approach that I described (create a shell using “Hollow” effect and cut out rectangular parts using “Scissors” effect) should work very well. You can automate everything by writing Python scripts (see examples here ). For example, the user defines pad position using a markup fiducial and from your script you generate a box-shaped segment around that point and intersect that with the shell segment to generate the pad segment.

Hi, Andras, all of the source in the segmentation section is python script, but not related this issue.

Could you help me to write script

Workflow

  1. Markup - Fiducial Marks on Skin face
  2. SegmentEditor - Hollow Effect and Scissors to generate pad segm.

For this, the approach that I described (create a shell using “Hollow” effect and cut out rectangular parts using “Scissors” effect) should work very well. You can automate everything by writing Python scripts (see examples here ). For example, the user defines pad position using a markup fiducial and from your script you generate a box-shaped segment around that point and intersect that with the shell segment to generate the pad segment.

i am now cutting rectangle by scissor effect drawn by left to right mouse clicked^^

ok. i will duplicate original segment and apply scissor effect and generate mesh

i succedd in attatching pad on the skin
but when i generating mesh
it was not applied.

segment_1 : pad on the skin
segment_2 : surface of face generated by threshold 30 & smooth 6mm


You need to increase the mesh resolution. With default parameters, a quick coarse mesh is generated.

Thank you :slight_smile: i will refer cleaver parameter.

And i will make this python script adding fiducial mark basement^^ refering below segmentation script link

  1. fiducial mark -> 2. hollow and sccisors -> 3.generate mesh

[https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How_to_run_segment_editor_effects_from_a_script ]