-
Notifications
You must be signed in to change notification settings - Fork 13
/
openslide_unload_library.m
48 lines (43 loc) · 1.27 KB
/
openslide_unload_library.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
function openslide_unload_library()
% OPENSLIDE_UNLOAD_LIBRARY Unloads the open slide library
%
% openslide_unload_library()
%
% INPUT ARGUMENTS
% N/A
%
% OPTIONAL INPUT ARGUMENTS
% N/A
%
% OUTPUT
% N/A
% Copyright (c) 2016 Daniel Forsberg
% danne.forsberg@outlook.com
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
%%
% Check if library is already loaded
if ~libisloaded('openslidelib');
disp('Openslide library is not loaded')
return
end
% Unload library
unloadlibrary('openslidelib')
% Check success of unload
if libisloaded('openslidelib');
error('openslide:openslide_unload_library',...
'Failure to unload openslide library\n')
else
disp('Openslide library has been unloaded')
end