OxyGenie.pgvnet#
Module contents#
Generates branching structures on a 2D grid with random angles and lengths. |
|
Applies dilation on the grid for a specified number of iterations. |
|
Orchestrates a sequence of operations on the grid. |
|
Generates a set of vascular networks using a procedural pipeline. |
|
Computes the surface-to-perimeter ratio of a given grid. |
- class OxyGenie.pgvnet.BranchGen(L_p, angle_p, n_branch, L_max=None)[source]#
Generates branching structures on a 2D grid with random angles and lengths.
- Parameters:
(tuple) (- angle_p)
(tuple)
(int) (- n_branch)
(float (- L_max)
optional) (Maximum branch length.)
Warning
Return via __call__
- class OxyGenie.pgvnet.DilationN(n_iter=1)[source]#
Applies dilation on the grid for a specified number of iterations.
- Parameters:
(int) (- n_iter)
Warning
Return via __call__
- class OxyGenie.pgvnet.PGPipeline(operations)[source]#
Orchestrates a sequence of operations on the grid.
- Parameters:
(list) (- operations)
Warning
Return via __call__
- class OxyGenie.pgvnet.PGVNet(n_iter)[source]#
Performs dilation and grid updates using a network-like approach.
- Parameters:
(int) (- n_iter)
Warning
Return via __call__
- OxyGenie.pgvnet.simple_generation(N=1, grid_size=1000, Lc=30, lrang=10, initial_angle=0, alpha=0.7853981633974483)[source]#
Generates a set of vascular networks using a procedural pipeline.
This function creates vascular networks by simulating branching patterns with specified parameters for grid size, branch lengths, and angles.
- Parameters:
N (int) – The number of vascular networks to generate.
grid_size (int) – The size of the grid for each vascular network.
Lc (int) – The mean length of branches in the vascular network.
lrang (int) – The variation range for branch lengths around the mean length.
initial_angle (float) – The initial branching angle for the network.
alpha (float) – The spread of branching angles from the initial angle.
- Returns:
grids – An array containing the generated vascular networks, where each entry represents one grid.
- Return type:
list(ndarray)