Source code for neuroconv.datainterfaces.ophys.tiff.tiffdatainterface
from typing import Literal
from pydantic import FilePath, validate_call
from ..baseimagingextractorinterface import BaseImagingExtractorInterface
[docs]class TiffImagingInterface(BaseImagingExtractorInterface):
"""Interface for multi-page TIFF files."""
display_name = "TIFF Imaging"
associated_suffixes = (".tif", ".tiff")
info = "Interface for multi-page TIFF files."
[docs] @classmethod
def get_source_schema(cls) -> dict:
"""
Get the source schema for the TIFF imaging interface.
Returns
-------
dict
The JSON schema for the TIFF imaging interface source data,
containing file path and other configuration parameters.
"""
source_schema = super().get_source_schema()
source_schema["properties"]["file_path"]["description"] = "Path to Tiff file."
return source_schema
@validate_call
def __init__(
self,
file_path: FilePath,
sampling_frequency: float,
verbose: bool = False,
photon_series_type: Literal["OnePhotonSeries", "TwoPhotonSeries"] = "TwoPhotonSeries",
):
"""
Initialize reading of TIFF file.
Parameters
----------
file_path : FilePath
sampling_frequency : float
verbose : bool, default: False
photon_series_type : {'OnePhotonSeries', 'TwoPhotonSeries'}, default: "TwoPhotonSeries"
"""
super().__init__(
file_path=file_path,
sampling_frequency=sampling_frequency,
verbose=verbose,
photon_series_type=photon_series_type,
)