API Reference
This section contains the reference documentation for the elements important for the user.
RoiPreparationController(metadata_df, file_strategy, temp_dir, output_dir, margin=0, mask_value=0, max_pyramid_levels=3, chunk_size=(1, 256, 256), downscale=2, temp_roi_delete=True)
Coordinate cutting and assembly of cores from multiplex images.
Initialize the RoiPreparationController.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
metadata_df
|
DataFrame
|
DataFrame containing ROI metadata. |
required |
file_strategy
|
FileAvailabilityStrategy
|
Strategy for retrieving image files. |
required |
temp_dir
|
str
|
Directory for temporary core files. |
required |
output_dir
|
str
|
Destination for assembled Zarr outputs. |
required |
margin
|
int
|
Padding pixels around each core. |
0
|
mask_value
|
int
|
Fill value for masked regions. |
0
|
max_pyramid_levels
|
int
|
Number of pyramid levels for the output. |
3
|
chunk_size
|
tuple[int, int, int]
|
Chunk dimensions (C, Y, X) for the Zarr array. |
(1, 256, 256)
|
downscale
|
int
|
Downsampling factor between pyramid levels. |
2
|
temp_roi_delete
|
bool
|
Whether to delete intermediate TIFFs after assembly. |
True
|
run()
Execute the ROI preparation pipeline.
Iterates through available channels, cuts ROIs, and assembles them into SpatialData Zarr stores.