Estimate segmentation memory requirements
Source:R/estimate_segment_memory.R
estimate_segment_memory.RdEstimate the RAM pressure from the exact Ward backend before allocating the all-pairs distance vector. This is a lower bound: clustering and R object overhead require additional memory.
Usage
estimate_segment_memory(
input,
valid_mode = c("signal", "finite"),
knn_k = 20,
overhead_factor = 2
)Arguments
- input
A FITS-like object with
imDat, a raw 3-D cube array, or an integer giving the number of valid pixels.- valid_mode
Valid-pixel rule used when
inputis a cube:"signal"matchessegment, while"finite"requires every spectral channel to be finite.- knn_k
Number of nearest neighbours used for the sparse graph estimate.
- overhead_factor
Multiplicative factor used for a conservative exact Ward RAM estimate beyond the condensed distance vector alone.