load_region
load_region(data_zyx, region, compute=True, return_as_3D=False)
¶
Load a region from a dask array.
Can handle both 2D and 3D dask arrays as input and return them as is or always as a 3D array.
PARAMETER | DESCRIPTION |
---|---|
data_zyx |
Dask array (2D or 3D).
TYPE:
|
region |
Region to load, tuple of three slices (ZYX). |
compute |
Whether to compute the result. If
TYPE:
|
return_as_3D |
Whether to return a 3D array, even if the input is 2D.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Union[Array, ndarray]
|
3D array. |
Source code in fractal_tasks_core/roi/load_region.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|