You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, one may want to prune out some unsuitable pixels (where quality is e.g. 0, or where the pixel is not connected to any other pixel), but still perform computations on all connected components.
The text was updated successfully, but these errors were encountered:
vboussange
changed the title
Perform calculation on all connected components
Perform calculations on all connected components
Dec 17, 2024
Indeed, this has been a long standing issue: a single raster can give rise to multiple graphs or "Grids". For some of the algorithms to work properly there is the "strongly connected" assumption, hence the pruning. However, the result is that one could compute the metrics over all connected sub-grids (not only the largest one).
There is another problem with this: the largest subgraph may not necessarily include all or even any of the target pixels, resulting in an empty grid.
I think we should just prune to a grid containing all subgraphs that contain target nodes. It may be faster to split it into multiple grids for each subgraph that contains targets, but also trickier to use.
Currently, only the giant connected component of the
grid::Grid
is used for downstream computations when used withprune
ConScape.jl/src/grid.jl
Line 109 in c18ca9b
However, one may want to prune out some unsuitable pixels (where quality is e.g. 0, or where the pixel is not connected to any other pixel), but still perform computations on all connected components.
The text was updated successfully, but these errors were encountered: