From b0efba25d3157dd2bd66e7db97eec1eec3802e4a Mon Sep 17 00:00:00 2001 From: pauladkisson Date: Mon, 16 Sep 2024 18:43:51 -0700 Subject: [PATCH 1/2] 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 From e59ae454aa8766f8d2c58d520108215a408728f1 Mon Sep 17 00:00:00 2001 From: pauladkisson Date: Mon, 16 Sep 2024 18:49:20 -0700 Subject: [PATCH 2/2] updated changelog --- CHANGELOG.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62d7ec67..562a132f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,15 @@ -# Upcoming (v0.5.9) +# Upcoming (v0.5.10) + +### Features + +### Fixes +* Added specific error message for single-frame scanimage data [PR #360](https://github.com/catalystneuro/roiextractors/pull/360) + +### Improvements + +### Testing + +# v0.5.9 ### Deprecations