-
Notifications
You must be signed in to change notification settings - Fork 1
/
DMDicomLibrary.m
49 lines (39 loc) · 1.38 KB
/
DMDicomLibrary.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
classdef (Sealed) DMDicomLibrary < DMDicomLibraryInterface
% DMDICOMLIBRARY DicoMat implementation of DMDicomLibraryInterface for
% reading Dicom data.
%
%
% 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.
%
methods
function isDicom = isdicom(obj, fileName)
% Tests whether a file is in DICOM format
isDicom = DMisdicom(fileName);
end
function metaheader = dicominfo(obj, varargin)
% Reads the metaheader data from a Dicom file
metaheader = DMdicominfo(varargin{:});
end
function imageData = dicomread(obj, fileName_or_metaHeader)
% Reads the image data from a Dicom file
imageData = DMdicomread(fileName_or_metaHeader);
end
end
methods (Access = private)
function obj = DMDicomLibrary
end
end
methods (Static)
function singleObj = getLibrary
persistent singleton
if isempty(singleton) || ~isvalid(singleton)
singleton = DMDicomLibrary;
end
singleObj = singleton;
end
end
end