Difference-of-Gaussians (dog) plugin
patchworks.plugins.dog.dog_label_fn(low_sigma: float | tuple[float, ...], high_sigma: float | tuple[float, ...], threshold: float, *, use_gpu: bool = False, decon_kwargs: dict[str, Any] | None = None, voxel_size: dict[str, float] | None = None, sigma_units: str = 'px') -> Callable[[np.ndarray], np.ndarray]
Return a ready-to-use DoG labeler for tile_process.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
low_sigma
|
float | tuple[float, ...]
|
Gaussian sigmas for the narrow/wide blur, one number or one per axis.
|
required |
high_sigma
|
float | tuple[float, ...]
|
Gaussian sigmas for the narrow/wide blur, one number or one per axis.
|
required |
threshold
|
float
|
Binary threshold applied to the DoG image ( |
required |
use_gpu
|
bool
|
Run gaussian_filter + label on GPU via cupy/cupyx instead of scipy.
Independent of |
False
|
decon_kwargs
|
dict[str, Any] | None
|
If given, each tile is first deconvolved via
|
None
|
voxel_size
|
dict[str, float] | None
|
Physical voxel size as |
None
|
sigma_units
|
str
|
|
'px'
|
Returns:
| Type | Description |
|---|---|
Callable[[ndarray], ndarray]
|
Picklable function ready for |
Source code in src/patchworks/plugins/dog.py
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | |