-
Notifications
You must be signed in to change notification settings - Fork 0
insert_gmsh_fascicles.m
gmsh = mesh.insert_gmsh_fascicles
inserts fascicles (from a MBF .xml file) into a GMESH .geo file during the compilation process (using make_from_template, usually), such that the fascicles align to the X-axis in GMESH (this usually comes out as the Z-axis later).
mesh.insert_gmsh_fascicles
is part of package +mesh. Before generating a mesh using models.nerve_anatomy, you should always preview the fascicle pattern which will be generated from your supplied set-up using plots.preview_fascicles.
@[insert_gmsh_fascicles] // Execute spline script using SETUP
-
-setup
: adds persistent options. This is used to input the data used by the make_from_template. The example script had a demonstration of this usage. -
-anat [filename]
: set source file. -
-anat <struct>
: use a fascicle pattern generated using MATLAB. -
-conf [filename]
: select configuration file (for arrangements of fascicles from source data) -
-conf <struct>
: use preloaded configuration structure
The additional following sets of options are defined:
Fascicles can be re-arranged to make test patterns using the following:
-
-pIndex [1..n]
: select fascicle indices from source file -
-pLocation [1..n x 2]
: set fascicle XY location -
-pRotate [1..n]
: set rotation (in degrees) for each fascicle around fascicle centroid
The overall resulting pattern of fascicles can be moved, shifted and scaled using the following:
-
-xMove [x y]
or-xMove [y]
-
-xScale [xy]
or-xScale [x y]
(non-uniform scaling) -
-xScale [2x2 matrix]
(generic matrix transform -xRotate [deg]
These translations, scalings, and rotations are applied around the centroid of the overall fascicle pattern and are applied in the order [scale, rotate, move]
.
By default, the fascicles are extruded from -z to +z with z defined using -z [range]
. More complex fascicle trajectories can be specified using -path [xyz]
, where the xyz path of the fascicle is specified in µm. (note: path currently not re-implemented for XML input data)
Input units are assumed µm and the output units are assumed mm. For input units of mm, use -units-mm
. For output units of µm, use -units-um
The additional following are configurable for parsing XML files:
-
-nC [n_coeff_points]
,-nPxy [n_outline_points]
,'-invert-y'
v0.5, Calvin Eiber 9 April 2021