26 from .background
import Background, BackgroundControl, BackgroundMI
27 from ..interpolate
import Interpolate
34 _init = BackgroundControl.__init__
38 if (args
and (isinstance(args[0], str)
or isinstance(args[0], Interpolate.Style))) \
40 warnings.warn(
'Call to deprecated method __init__. (Overloads that take a ``style`` parameter '
41 'are deprecated; the style must be passed to `Background.getImageF` instead. '
42 'To be removed after 20.0.0.)',
43 FutureWarning, stacklevel=2)
44 self.
_init(*args, **kwargs)
51 return self.__class__, (self.getImageBBox(), self.getStatsImage())
53 _getImageF = Background.getImageF
57 if not args
and not kwargs:
58 warnings.warn(
'Call to deprecated method getImageF(). (Zero-argument overload is deprecated; '
59 'use one that takes an ``interpStyle`` instead. To be removed after 20.0.0.)',
60 FutureWarning, stacklevel=2)
64 BackgroundControl.getInterpStyle = deprecate_pybind11(
65 BackgroundControl.getInterpStyle,
66 reason=
'Replaced by passing style to `Background.getImageF`. To be removed after 20.0.0.')
67 BackgroundControl.setInterpStyle = deprecate_pybind11(
68 BackgroundControl.setInterpStyle,
69 reason=
'Replaced by passing style to `Background.getImageF`. To be removed after 20.0.0.')
70 BackgroundMI.getPixel = deprecate_pybind11(
71 BackgroundMI.getPixel,
72 reason=
'Use `getImageF` instead. To be removed after 20.0.0.')