Commit 2100a56b authored by Jonas Stienen's avatar Jonas Stienen

Adding validation of metadata in daffv17 writer. This was causing problems...

Adding validation of metadata in daffv17 writer. This was causing problems when converting from daffv15. Problem could be solved if the metadata of each record data set is also converted into new format (and not only global metadata). But seldom used, so far.
parent fc901cb9
......@@ -4,7 +4,17 @@
function [] = daffv17_write_metadata( fid, metadata )
%DAFF_WRITE_METADATA Write a DAFF metadata block into DAFF binary file
if ~isfield( metadata, 'name' ) || ~isfield( metadata, 'datatype' ) || ~isfield( metadata, 'value' )
%warning( 'Invalid metadata structure, skipping.' )
return
end
if ~( numel( metadata ) > 0 )
%warning( 'Empty metadata variable, skipping.' )
return
end
% Number of keys
fwrite(fid, length(metadata), 'int32');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment