diff --git a/src/roiextractors/extractorlist.py b/src/roiextractors/extractorlist.py index 091265c2..dff3136a 100644 --- a/src/roiextractors/extractorlist.py +++ b/src/roiextractors/extractorlist.py @@ -15,6 +15,8 @@ from .extractors.tiffimagingextractors import ( TiffImagingExtractor, ScanImageTiffImagingExtractor, + ScanImageTiffSinglePlaneImagingExtractor, + ScanImageTiffMultiPlaneImagingExtractor, BrukerTiffMultiPlaneImagingExtractor, BrukerTiffSinglePlaneImagingExtractor, MicroManagerTiffImagingExtractor, @@ -31,6 +33,8 @@ Hdf5ImagingExtractor, TiffImagingExtractor, ScanImageTiffImagingExtractor, + ScanImageTiffSinglePlaneImagingExtractor, + ScanImageTiffMultiPlaneImagingExtractor, BrukerTiffMultiPlaneImagingExtractor, BrukerTiffSinglePlaneImagingExtractor, MicroManagerTiffImagingExtractor, diff --git a/src/roiextractors/extractors/tiffimagingextractors/__init__.py b/src/roiextractors/extractors/tiffimagingextractors/__init__.py index b8f5cf54..3f3a3618 100644 --- a/src/roiextractors/extractors/tiffimagingextractors/__init__.py +++ b/src/roiextractors/extractors/tiffimagingextractors/__init__.py @@ -16,7 +16,11 @@ TiffImagingExtractor A ImagingExtractor for TIFF files. ScanImageTiffImagingExtractor - Specialized extractor for reading TIFF files produced via ScanImage. + Legacy extractor for reading TIFF files produced via ScanImage v3.8. +ScanImageTiffSinglePlaneImagingExtractor + Specialized extractor for reading single-plane TIFF files produced via ScanImage. +ScanImageTiffMultiPlaneImagingExtractor + Specialized extractor for reading multi-plane TIFF files produced via ScanImage. BrukerTiffMultiPlaneImagingExtractor Specialized extractor for reading TIFF files produced via Bruker. BrukerTiffSinglePlaneImagingExtractor @@ -25,6 +29,10 @@ Specialized extractor for reading TIFF files produced via Micro-Manager. """ from .tiffimagingextractor import TiffImagingExtractor -from .scanimagetiffimagingextractor import ScanImageTiffImagingExtractor +from .scanimagetiffimagingextractor import ( + ScanImageTiffImagingExtractor, + ScanImageTiffMultiPlaneImagingExtractor, + ScanImageTiffSinglePlaneImagingExtractor, +) from .brukertiffimagingextractor import BrukerTiffMultiPlaneImagingExtractor, BrukerTiffSinglePlaneImagingExtractor from .micromanagertiffimagingextractor import MicroManagerTiffImagingExtractor diff --git a/tests/test_scanimagetiffimagingextractor.py b/tests/test_scanimagetiffimagingextractor.py new file mode 100644 index 00000000..31e82c3d --- /dev/null +++ b/tests/test_scanimagetiffimagingextractor.py @@ -0,0 +1,20 @@ +import pytest +from pathlib import Path +from tempfile import mkdtemp +from shutil import rmtree, copy + +from ScanImageTiffReader import ScanImageTiffReader +from roiextractors import ScanImageTiffSinglePlaneImagingExtractor, ScanImageTiffMultiPlaneImagingExtractor + +from .setup_paths import OPHYS_DATA_PATH + + +@pytest.fixture(scope="module") +def scan_image_tiff_single_plane_imaging_extractor(): + file_path = OPHYS_DATA_PATH / "imaging_datasets" / "ScanImage" / "scanimage_20220801_volume.tif" + return ScanImageTiffSinglePlaneImagingExtractor(file_path=file_path) + + +def test_get_video(scan_image_tiff_single_plane_imaging_extractor): + video = scan_image_tiff_single_plane_imaging_extractor.get_video() + assert video.shape == (1, 512, 512)