-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDMdicominfo.m
More file actions
30 lines (27 loc) · 944 Bytes
/
DMdicominfo.m
File metadata and controls
30 lines (27 loc) · 944 Bytes
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
function metadata = DMdicominfo(fileName, dictionary)
% DMdicominfo Reads metadata from a Dicom file
%
% Usage:
% metadata = DMdicominfo(fileName)
%
% fileName: path and filename of the file to test
%
% Returns:
% a structure containing the metadata from a Dicom file
%
%
%
% Licence
% -------
% Part of DicoMat. https://github.com/tomdoel/dicomat
% Author: Tom Doel, 2013. www.tomdoel.com
% Distributed under the BSD 3-Clause license. Please see the file LICENSE for details.
%
if nargin < 2 || isempty(dictionary)
dictionary = DMDicomDictionary.EssentialDictionaryWithoutPixelData;
end
metadata = DMReadDicomTags(fileName, dictionary);
% The filename is not really part of the metadata but is included for
% compatiblity with Matlab's image processing toolbox
metadata.Filename = fileName;
end