How it works

Landmarking and morphing

TOML config file

Note

The config file is need only when using CLI.

With Jupyter it is possible to specify the path when calling the function.

The TOML file stores the path for the file needed in the process. What you need to specify in the config file:

  • Path to the source files
    • Source Mesh filename
    • landmark source filename
  • Path to the target files
    • landmark target filename

An example:

    [source]
    path = "../test_data/source"
    filename_mesh = "humerus_sx.key"
    filename_landmarks = "landmarks_source.fcsv"
    [target]
    path = "../test_data/target"
    filename_landmarks = "landmarks_target.fcsv"

Landmarks

A landmark label can be either a number (int or float) or a string.

Note

Between source and target landmarks, there must be consistency. So the following applies:

  • Same number of landmarks
  • Same order
  • Same labels
Warning

If one or more of these points is not respected, Infepy raises a Warning.

An example:

source landmarks

Label - node id x y z
0 1 -183.063339 134.525345 388.490692
1 2 -161.198669 143.211426 373.034149
2 3 -146.246490 150.397263 350.175262

target landmarks

Label - node id x y z
0 1 119.175774 148.936493 -365.196716
1 2 118.836217 126.852319 -388.762611
2 3 122.934593 119.134407 -419.716431

Morphing

The morphing function is taken and adapted from:

Infepy implements a slightly different version of the RBF function.

It introduces:

  • The possibility to add a smoothing factor in the morphing process. The smoothing factor modifies to the Diagonal of the Dcc matrix by adding a constant value o its diagonal. RBF implementation

and