This function splits a certain phase into two subphases based on a size threshold, which makes sense in the reconstruction framework if the two subphases behave different structurally.

phase_split(img, phase, larger_than, into = max(c(img)) + 1)

Arguments

img

A 2D array.

phase

The phase to modify.

larger_than

The threshold for splitting (in pixels).

into

The phase to change pixels to.

Value

The modified 2D array.