From b0efba25d3157dd2bd66e7db97eec1eec3802e4a Mon Sep 17 00:00:00 2001 From: pauladkisson Date: Mon, 16 Sep 2024 18:43:51 -0700 Subject: [PATCH] added specific notimplementederror for single-frame case --- .../tiffimagingextractors/scanimagetiffimagingextractor.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/roiextractors/extractors/tiffimagingextractors/scanimagetiffimagingextractor.py b/src/roiextractors/extractors/tiffimagingextractors/scanimagetiffimagingextractor.py index bdc1bc38..155ace8f 100644 --- a/src/roiextractors/extractors/tiffimagingextractors/scanimagetiffimagingextractor.py +++ b/src/roiextractors/extractors/tiffimagingextractors/scanimagetiffimagingextractor.py @@ -299,7 +299,12 @@ def __init__( ScanImageTiffReader = _get_scanimage_reader() with ScanImageTiffReader(str(self.file_path)) as io: shape = io.shape() # [frames, rows, columns] - if len(shape) == 3: + if len(shape) == 2: # [rows, columns] + raise NotImplementedError( + "Extractor cannot handle single-frame ScanImageTiff data. Please raise an issue to request this feature: " + "https://github.com/catalystneuro/roiextractors/issues " + ) + elif len(shape) == 3: self._total_num_frames, self._num_rows, self._num_columns = shape if ( self._num_planes == 1