Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
b2faf8451a
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
35 lines (22 sloc) 867 Bytes
function obj = parseMetadataImageJ(obj, imageDescription)
% parse custom multi-stack images
% parse number of stacks
stacks = str2double(regexp(imageDescription, 'images=(\d+)', 'tokens', 'once'));
if ~isnan(stacks)
obj.stacks = stacks;
end
% read strip byte counts
try
stripByteCounts = obj.tiffPtr.getTag('StripByteCounts');
obj.stripByteCounts = double(stripByteCounts);
catch
error('TiffReader::parseMetadataImageJ:: Tiff.Tag.StripByteCounts is missing!');
end
% read strip offset
try
stripOffset = obj.tiffPtr.getTag('StripOffsets');
obj.offsetToImg = double(stripOffset(1));
catch
error('TiffReader::parseMetadataImageJ:: Tiff.Tag.StripOffsets is missing!');
end
end