__init__.py 1009 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. """Reading and saving of images and videos."""
  2. import warnings
  3. from .manage_plugins import *
  4. from .manage_plugins import _hide_plugin_deprecation_warnings
  5. from .sift import *
  6. from .collection import *
  7. from ._io import *
  8. from ._image_stack import *
  9. with _hide_plugin_deprecation_warnings():
  10. reset_plugins()
  11. __all__ = [
  12. "concatenate_images",
  13. "imread",
  14. "imread_collection",
  15. "imread_collection_wrapper",
  16. "imsave",
  17. "load_sift",
  18. "load_surf",
  19. "pop",
  20. "push",
  21. "ImageCollection",
  22. "MultiImage",
  23. ]
  24. def __getattr__(name):
  25. if name == "available_plugins":
  26. warnings.warn(
  27. "`available_plugins` is deprecated since version 0.25 and will "
  28. "be removed in version 0.27. Instead, use `imageio` or other "
  29. "I/O packages directly.",
  30. category=FutureWarning,
  31. stacklevel=2,
  32. )
  33. return globals()["_available_plugins"]
  34. raise AttributeError(f"module {__name__!r} has no attribute {name!r}")