diff --git a/.gitignore b/.gitignore index 65ac1a9..44b87e6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .idea *__pycache__* *.edd-info* +*.asv diff --git a/lib/+ne7/+scanimage/Reader5.m b/lib/+ne7/+scanimage/Reader5.m index ab1e9b2..13b2108 100644 --- a/lib/+ne7/+scanimage/Reader5.m +++ b/lib/+ne7/+scanimage/Reader5.m @@ -292,6 +292,8 @@ function load_header(self) self.scanimage_version = 5; temp = regexp(hdr, '^scanimage\.SI\.(?[\.\w]*)\s*=\s*(?.*\S)\s*$', 'names'); end + framenums = regexp(hdr, '^(?[\.frameNumbers]*)\s*=\s*(?.*\S)\s*$', 'names'); + framenums = [framenums{~cellfun(@isempty, framenums)}]; hdr = temp; hdr = [hdr{~cellfun(@isempty, hdr)}]; if isempty(hdr) % in case we have used scanimage 5.2 @@ -302,6 +304,7 @@ function load_header(self) hdr = temp; hdr = [hdr{~cellfun(@isempty, hdr)}]; end + hdr(end+1) = framenums; assert(~isempty(hdr), 'empty header -- possibly wrong ScanImage version.') self.header = cell2struct(cellfun(@(x) {evaluate(x)}, {hdr.value})', strrep({hdr.attr}, '.', '_'));