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

add MultiPageMultiTiffImagingInterface #862

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
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
)
Loading