forked from Remi-Gau/dicom_2_BIDS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_dataset_description_json.m
57 lines (32 loc) · 1.69 KB
/
create_dataset_description_json.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
function create_dataset_description_json(tgt_dir)
dataset_description_json_name = fullfile(tgt_dir, ...
'dataset_description.json');
%% General fields, shared with MRI BIDS and MEG BIDS:
%% Required fields:
dd_json.Name = 'olfiddis'; % name of the dataset
dd_json.BIDSVersion = '1.1.0'; % The version of the BIDS standard that was used
%% Recommended fields:
dd_json.License = '';% what license is this dataset distributed under? The
% use of license name abbreviations is suggested for specifying a license.
% A list of common licenses with suggested abbreviations can be found in appendix III.
dd_json.Authors = {'','',''};% List of individuals who contributed to the
% creation/curation of the dataset
dd_json.Acknowledgements = ''; % who should be acknowledge in helping to collect the data
dd_json.HowToAcknowledge = ''; % Instructions how researchers using this
% dataset should acknowledge the original authors. This field can also be used
% to define a publication that should be cited in publications that use the
% dataset.
dd_json.Funding = {'','',''}; % sources of funding (grant numbers)
dd_json.ReferencesAndLinks = {'','',''};% a list of references to
% publication that contain information on the dataset, or links.
dd_json.DatasetDOI = ''; %the Document Object Identifier of the dataset
% (not the corresponding paper).
%% Write JSON
json_options.indent = ' '; % this just makes the json file look prettier
% when opened in a text editor
jsonSaveDir = fileparts(dataset_description_json_name);
if ~isdir(jsonSaveDir)
fprintf('Warning: directory to save json file does not exist: %s \n',jsonSaveDir)
end
spm_jsonwrite(dataset_description_json_name,dd_json,json_options)
end