SpitfireDeconvolution¶
Purpose¶
SpitfireDeconvolution runs SAIRPICO SPITFIR(e) deconvolution in 2D,
2D Slice, or 3D mode. It exposes the SPITFIR(e) regularization, weighting,
method, padding, and iteration parameters used by the underlying simglib
commands.
Inputs¶
input_image: intensity image inpng,tif, ortiffformat.deconvolution_type: one of2D,2D Slice, or3D. Default2D.sigma: Gaussian PSF width for non-3D modes. Default1.5.psf_image: existing 3D PSF image required for3Dmode.regularization: SPITFIR(e) regularization parameter aspow(2, -x). Default12.0.weighting: weighting parameter between0.0and1.0. Default0.6.method:HVorSV. DefaultHV.padding: whether to use padding at borders. DefaultFalse.niter: iteration count. Default200; minimum1.
Outputs¶
output_image: deconvolved image. The default template is{input_image.stem}_deconvolved{ext}.
Assumptions¶
HVandSVare passed directly to the external command.Non-3D modes use
sigma;3Dmode requires an existing PSF image.Inputs are scaled and sampled appropriately for the selected parameters.
Dependencies and Core Libraries¶
BioImageFlow core processing and schema classes.
SAIRPICO
simglibenvironment withbioimageit::simglib==0.1.2.External commands:
simgspitfiredeconv2d,simgspitfiredeconv2dslice, andsimgspitfiredeconv3d.
Minimal Example¶
from bioimageflow_core import Arguments
from bioimageflow_sairpico_tools import SpitfireDeconvolution
result = SpitfireDeconvolution().process_row(
Arguments(
input_image="input.tif",
deconvolution_type="3D",
sigma=1.5,
psf_image="psf.tif",
regularization=12.0,
weighting=0.6,
method="HV",
padding=False,
niter=150,
output_image="spitfire.tif",
)
)
Expected Results¶
The tool writes spitfire.tif. In 3D mode, the command includes -psf and
the supplied PSF path; in non-3D modes it includes -sigma instead.
Failure Modes¶
Missing
simgspitfiredeconv*binary.3Dmode is requested with a missing PSF file.Invalid method, regularization, or image layout causes subprocess failure.
Output cannot be written.