Skip to content

Resolve "Include more options to initializate stetes"

What does this MR do?

Implements TIFF input data for the solver.

The section model.data is read if defined. It should contain a key assigned to a path of a valid gayscale tiff of 16 bits. e.g.

[model.data]
tiff_data = data/tiff/flower-minisblack-16.tif

The key can be latter used in the initial condition of a compartment as a function of the grid x and y coordinates. If arguments are out of bound of the tiff image the function will return 0.

[model.<compartment>.initial]
u_0 = tiff_data(x,y)

The arguments of the function may be anything defined on muparser. This is useful to shift and scale the data. Additionaly, data is interpreted between 0 and 1 depending on the photometric information (zero_is_white or zero_is_black). In case data has another scale, its result may be scaled as any other function in muparser. e.g.

[model.<compartment>.initial]
u_0 = 1.3+5.1*tiff_data(2*x, y+0.25)

Is there something that needs to be double checked?

No

Can this MR be accepted?

  • Implemented ...
    • Generic tiff reader
    • muParser function for tiff data
  • Added/Updated tests:
    • Unit test for tiff reader
    • System test for initial condition
  • Pipelines passing
    • Build Status
    • Build Status
    • Build status
  • Delete branch option set

Related issues

Closes #2 (closed)

Edited by Santiago Ospina De Los Ríos

Merge request reports

Loading