Skip to content

Commit

Permalink
inital test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
pauladkisson committed Sep 19, 2023
1 parent c160d05 commit d6fe0a5
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/roiextractors/extractorlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from .extractors.tiffimagingextractors import (
TiffImagingExtractor,
ScanImageTiffImagingExtractor,
ScanImageTiffSinglePlaneImagingExtractor,
ScanImageTiffMultiPlaneImagingExtractor,
BrukerTiffMultiPlaneImagingExtractor,
BrukerTiffSinglePlaneImagingExtractor,
MicroManagerTiffImagingExtractor,
Expand All @@ -31,6 +33,8 @@
Hdf5ImagingExtractor,
TiffImagingExtractor,
ScanImageTiffImagingExtractor,
ScanImageTiffSinglePlaneImagingExtractor,
ScanImageTiffMultiPlaneImagingExtractor,
BrukerTiffMultiPlaneImagingExtractor,
BrukerTiffSinglePlaneImagingExtractor,
MicroManagerTiffImagingExtractor,
Expand Down
12 changes: 10 additions & 2 deletions src/roiextractors/extractors/tiffimagingextractors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
20 changes: 20 additions & 0 deletions tests/test_scanimagetiffimagingextractor.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit d6fe0a5

Please sign in to comment.