dacapo.gp.copy
Module Contents
Classes
A class to copy a mask into a new key with the option to drop channels via max collapse. |
- class dacapo.gp.copy.CopyMask(array_key: gunpowder.ArrayKey, copy_key: gunpowder.ArrayKey, drop_channels: bool = False)
A class to copy a mask into a new key with the option to drop channels via max collapse.
- array_key
Original key of the array from where the mask will be copied.
- Type:
gp.ArrayKey
- copy_key
New key where the copied mask will reside.
- Type:
gp.ArrayKey
- drop_channels
If True, channels will be dropped via a max collapse.
- Type:
bool
- setup()
Sets up the filter by enabling autoskip and providing the copied key.
- prepare()
Prepares the filter by copying the request of copy_key into a dependency.
- process()
Processes the batch by copying the mask from the array_key to the copy_key.
- setup()
Sets up the filter by enabling autoskip and providing the copied key.
- prepare(request)
Prepares the filter by copying the request of copy_key into a dependency.
- Parameters:
request – The request to prepare.
- Returns:
The prepared dependencies.
- Return type:
deps
- process(batch, request)
Processes the batch by copying the mask from the array_key to the copy_key.
If “drop_channels” attribute is True, it performs max collapse.
- Parameters:
batch – The batch to process.
request – The request for processing.
- Returns:
The processed outputs.
- Return type:
outputs