diff --git a/src/crappy/blocks/camera.py b/src/crappy/blocks/camera.py index 55598bac..912b4c7a 100644 --- a/src/crappy/blocks/camera.py +++ b/src/crappy/blocks/camera.py @@ -194,20 +194,21 @@ def __init__(self, Ignored if ``save_images`` is :obj:`False`. .. versionadded:: 1.5.10 - save_backend: If ``save_images`` is :obj:`True`, the backend to use for + save_backend: If ``save_images`` is :obj:`True`, the backend to use for recording the images. It should be one of: :: - 'sitk', 'cv2', 'pil', 'npy' + 'sitk', 'pil', 'cv2', 'npy' - They correspond to the modules :mod:`SimpleITK`, :mod:`cv2` (OpenCV), - :mod:`PIL` (Pillow Fork), and :mod:`numpy`. Note that the ``'npy'`` + They correspond to the modules :mod:`SimpleITK`, :mod:`PIL` (Pillow + Fork), :mod:`cv2` (OpenCV), and :mod:`numpy`. Note that the ``'npy'`` backend saves the images as raw :obj:`numpy.array`, and thus ignores the ``img_extension`` argument. Depending on the machine, some backends may be faster or slower. For using each backend, the corresponding - Python must of course be installed. If not provided and ``save_images`` - is :obj:`True`, the backends are tried in the same order as given above - and the first available one is used. ``'npy'`` is always available. + Python module must of course be installed. If not provided and + ``save_images`` is :obj:`True`, the backends are tried in the same + order as given above and the first available one is used. ``'npy'`` is + always available. .. versionadded:: 1.5.10 image_generator: A callable taking two :obj:`float` as arguments and diff --git a/src/crappy/blocks/dic_ve.py b/src/crappy/blocks/dic_ve.py index 7985c9cc..1512a9e6 100644 --- a/src/crappy/blocks/dic_ve.py +++ b/src/crappy/blocks/dic_ve.py @@ -208,16 +208,17 @@ def __init__(self, recording the images. It should be one of: :: - 'sitk', 'cv2', 'pil', 'npy' + 'sitk', 'pil', 'cv2', 'npy' - They correspond to the modules :mod:`SimpleITK`, :mod:`cv2` (OpenCV), - :mod:`PIL` (Pillow Fork), and :mod:`numpy`. Note that the ``'npy'`` + They correspond to the modules :mod:`SimpleITK`, :mod:`PIL` (Pillow + Fork), :mod:`cv2` (OpenCV), and :mod:`numpy`. Note that the ``'npy'`` backend saves the images as raw :obj:`numpy.array`, and thus ignores the ``img_extension`` argument. Depending on the machine, some backends may be faster or slower. For using each backend, the corresponding - Python must of course be installed. If not provided and ``save_images`` - is :obj:`True`, the backends are tried in the same order as given above - and the first available one is used. ``'npy'`` is always available. + Python module must of course be installed. If not provided and + ``save_images`` is :obj:`True`, the backends are tried in the same + order as given above and the first available one is used. ``'npy'`` is + always available. .. versionadded:: 1.5.10 image_generator: A callable taking two :obj:`float` as arguments and diff --git a/src/crappy/blocks/dis_correl.py b/src/crappy/blocks/dis_correl.py index b22993b7..c95ba3c0 100644 --- a/src/crappy/blocks/dis_correl.py +++ b/src/crappy/blocks/dis_correl.py @@ -198,16 +198,17 @@ def __init__(self, recording the images. It should be one of: :: - 'sitk', 'cv2', 'pil', 'npy' + 'sitk', 'pil', 'cv2', 'npy' - They correspond to the modules :mod:`SimpleITK`, :mod:`cv2` (OpenCV), - :mod:`PIL` (Pillow Fork), and :mod:`numpy`. Note that the ``'npy'`` + They correspond to the modules :mod:`SimpleITK`, :mod:`PIL` (Pillow + Fork), :mod:`cv2` (OpenCV), and :mod:`numpy`. Note that the ``'npy'`` backend saves the images as raw :obj:`numpy.array`, and thus ignores the ``img_extension`` argument. Depending on the machine, some backends may be faster or slower. For using each backend, the corresponding - Python must of course be installed. If not provided and ``save_images`` - is :obj:`True`, the backends are tried in the same order as given above - and the first available one is used. ``'npy'`` is always available. + Python module must of course be installed. If not provided and + ``save_images`` is :obj:`True`, the backends are tried in the same + order as given above and the first available one is used. ``'npy'`` is + always available. .. versionadded:: 1.5.10 image_generator: A callable taking two :obj:`float` as arguments and diff --git a/src/crappy/blocks/gpu_correl.py b/src/crappy/blocks/gpu_correl.py index 20a656c7..fa538657 100644 --- a/src/crappy/blocks/gpu_correl.py +++ b/src/crappy/blocks/gpu_correl.py @@ -200,16 +200,17 @@ def __init__(self, recording the images. It should be one of: :: - 'sitk', 'cv2', 'pil', 'npy' + 'sitk', 'pil', 'cv2', 'npy' - They correspond to the modules :mod:`SimpleITK`, :mod:`cv2` (OpenCV), - :mod:`PIL` (Pillow Fork), and :mod:`numpy`. Note that the ``'npy'`` + They correspond to the modules :mod:`SimpleITK`, :mod:`PIL` (Pillow + Fork), :mod:`cv2` (OpenCV), and :mod:`numpy`. Note that the ``'npy'`` backend saves the images as raw :obj:`numpy.array`, and thus ignores the ``img_extension`` argument. Depending on the machine, some backends may be faster or slower. For using each backend, the corresponding - Python must of course be installed. If not provided and ``save_images`` - is :obj:`True`, the backends are tried in the same order as given above - and the first available one is used. ``'npy'`` is always available. + Python module must of course be installed. If not provided and + ``save_images`` is :obj:`True`, the backends are tried in the same + order as given above and the first available one is used. ``'npy'`` is + always available. .. versionadded:: 1.5.10 image_generator: A callable taking two :obj:`float` as arguments and diff --git a/src/crappy/blocks/gpu_ve.py b/src/crappy/blocks/gpu_ve.py index d9975e9f..74c85124 100644 --- a/src/crappy/blocks/gpu_ve.py +++ b/src/crappy/blocks/gpu_ve.py @@ -186,16 +186,17 @@ def __init__(self, recording the images. It should be one of: :: - 'sitk', 'cv2', 'pil', 'npy' + 'sitk', 'pil', 'cv2', 'npy' - They correspond to the modules :mod:`SimpleITK`, :mod:`cv2` (OpenCV), - :mod:`PIL` (Pillow Fork), and :mod:`numpy`. Note that the ``'npy'`` + They correspond to the modules :mod:`SimpleITK`, :mod:`PIL` (Pillow + Fork), :mod:`cv2` (OpenCV), and :mod:`numpy`. Note that the ``'npy'`` backend saves the images as raw :obj:`numpy.array`, and thus ignores the ``img_extension`` argument. Depending on the machine, some backends may be faster or slower. For using each backend, the corresponding - Python must of course be installed. If not provided and ``save_images`` - is :obj:`True`, the backends are tried in the same order as given above - and the first available one is used. ``'npy'`` is always available. + Python module must of course be installed. If not provided and + ``save_images`` is :obj:`True`, the backends are tried in the same + order as given above and the first available one is used. ``'npy'`` is + always available. .. versionadded:: 1.5.10 image_generator: A callable taking two :obj:`float` as arguments and diff --git a/src/crappy/blocks/video_extenso.py b/src/crappy/blocks/video_extenso.py index 2241a850..f5e80612 100644 --- a/src/crappy/blocks/video_extenso.py +++ b/src/crappy/blocks/video_extenso.py @@ -193,16 +193,17 @@ def __init__(self, recording the images. It should be one of: :: - 'sitk', 'cv2', 'pil', 'npy' + 'sitk', 'pil', 'cv2', 'npy' - They correspond to the modules :mod:`SimpleITK`, :mod:`cv2` (OpenCV), - :mod:`PIL` (Pillow Fork), and :mod:`numpy`. Note that the ``'npy'`` + They correspond to the modules :mod:`SimpleITK`, :mod:`PIL` (Pillow + Fork), :mod:`cv2` (OpenCV), and :mod:`numpy`. Note that the ``'npy'`` backend saves the images as raw :obj:`numpy.array`, and thus ignores the ``img_extension`` argument. Depending on the machine, some backends may be faster or slower. For using each backend, the corresponding - Python must of course be installed. If not provided and ``save_images`` - is :obj:`True`, the backends are tried in the same order as given above - and the first available one is used. ``'npy'`` is always available. + Python module must of course be installed. If not provided and + ``save_images`` is :obj:`True`, the backends are tried in the same + order as given above and the first available one is used. ``'npy'`` is + always available. .. versionadded:: 1.5.10 image_generator: A callable taking two :obj:`float` as arguments and diff --git a/src/crappy/lamcube/bispectral.py b/src/crappy/lamcube/bispectral.py index 472a6002..170ab444 100644 --- a/src/crappy/lamcube/bispectral.py +++ b/src/crappy/lamcube/bispectral.py @@ -3,6 +3,7 @@ import numpy as np from typing import Tuple import logging +from warnings import warn from ..camera.cameralink import BaslerIronmanCameraLink @@ -86,11 +87,16 @@ class BiSpectral(BaslerIronmanCameraLink): .. versionadded:: 1.4.0 .. versionchanged:: 2.0.0 renamed from *Bispectral* to *BiSpectral* + .. versionremoved:: 2.1.0 """ def __init__(self) -> None: """Adds the various setting for the Camera.""" + warn(f"Starting from version 2.1.0, {type(self).__name__} will be " + f"deprecated and removed from Crappy. Please contact the maintainers " + f"if you still use this Camera.", FutureWarning) + super().__init__() self.add_scale_setting('width', 1, 640, self._get_w, self._set_w, 640) self.add_scale_setting('height', 1, 512, self._get_h, self._set_h, 512)