Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor updates in camera documentation #131

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/crappy/blocks/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions src/crappy/blocks/dic_ve.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions src/crappy/blocks/dis_correl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions src/crappy/blocks/gpu_correl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions src/crappy/blocks/gpu_ve.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions src/crappy/blocks/video_extenso.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/crappy/lamcube/bispectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np
from typing import Tuple
import logging
from warnings import warn

from ..camera.cameralink import BaslerIronmanCameraLink

Expand Down Expand Up @@ -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)
Expand Down
Loading