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
41 lines (33 sloc) 1.02 KB
function obj = readRawAttachSegm( obj )
%READATTACHSEGM Summary of this function goes here
% Extract information from ZISRAWattach segments.
%
% AUTHOR: Stefano Masneri
% Date: 13.10.2016
dataSize = int32(fread(obj.cziPtr, 1, 'int32'));
fread(obj.cziPtr, 3, 'int32'); %spare
attachEntry = CZIAttachmentEntry(obj.cziPtr);
fread(obj.cziPtr, 28, 'int32'); %spare
% Here different handling for different attachment names.
if strcmpi(attachEntry.contentFileType, 'CZTIMS')
fread(obj.cziPtr, 1, 'int32'); % size
numTs = fread(obj.cziPtr, 1, 'int32');
obj.timeStamps = fread(obj.cziPtr, numTs, 'double');
obj.timeStamps = obj.timeStamps - obj.timeStamps(1);
if length(obj.timeStamps) == 1
obj.scaleTime = obj.timeStamps;
else
obj.scaleTime = obj.timeStamps(2) - obj.timeStamps(1);
end
end
% Other attachments not implemented yet
% Possible attachments
% JPG
% CZEXP
% CZHWS
% CZEVL
% CZLUT
% CZPML
% ...
%data = fread(obj.cziPtr, dataSize, 'uint8');
end