Skip to content

Commit

Permalink
add MultiPageMultiTiffImagingInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
bendichter committed May 15, 2024
1 parent 1ae92e5 commit 3927a4c
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion src/neuroconv/datainterfaces/ophys/tiff/tiffdatainterface.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from ..baseimagingextractorinterface import BaseImagingExtractorInterface
from ....utils import FilePathType
from ....utils import FilePathType, FolderPathType


class TiffImagingInterface(BaseImagingExtractorInterface):
Expand All @@ -26,3 +26,33 @@ def __init__(self, file_path: FilePathType, sampling_frequency: float, verbose:
verbose : bool, default: True
"""
super().__init__(file_path=file_path, sampling_frequency=sampling_frequency, verbose=verbose)


class MultiPageMultiTiffImagingInterface(BaseImagingExtractorInterface):
"""Interface for multi-page multi-TIFF files."""

display_name = "Multi-Page Multi-TIFF"
associated_suffixes = (".tif", ".tiff")
info = "Interface for multiple multi-page TIFF files that have been split."

@classmethod
def get_source_schema(cls) -> dict:
source_schema = super().get_source_schema()
source_schema["properties"]["file_path"]["description"] = "Path to Tiff directory."
return source_schema

def __init__(self, folder_path: FolderPathType, pattern: str, sampling_frequency: float, verbose: bool = True):
"""
Initialize reading of multi-page multi-TIFF file.
Parameters
----------
folder_path : FolderPathType
pattern: str
fstring-style pattern to match the TIFF files. Must use named variables.
sampling_frequency : float
verbose : bool, default: True
"""
super().__init__(
folder_path=folder_path, pattern=pattern, sampling_frequency=sampling_frequency, verbose=verbose
)

0 comments on commit 3927a4c

Please sign in to comment.