Mercurial > hg > orthanc-stone
annotate Framework/StoneInitialization.cpp @ 1090:71c2dc28a85b broker
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 23 Oct 2019 11:43:29 +0200 |
parents | efc5b62b9539 |
children | ad4e21df4e40 2d8ab34c8c91 |
rev | line source |
---|---|
610
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Stone of Orthanc |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 * |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * modify it under the terms of the GNU Affero General Public License |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * the License, or (at your option) any later version. |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 * Affero General Public License for more details. |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 * You should have received a copy of the GNU Affero General Public License |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 **/ |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 #include "StoneInitialization.h" |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 |
611
e3f21a265be5
Added version directive to GLSL shader code + glew init function in sample code
Benjamin Golinvaux <bgo@osimis.io>
parents:
610
diff
changeset
|
24 #include <Core/OrthancException.h> |
610
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 #if !defined(ORTHANC_ENABLE_SDL) |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 # error Macro ORTHANC_ENABLE_SDL must be defined |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 #endif |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 #if ORTHANC_ENABLE_SDL == 1 |
1047 | 31 # include "Viewport/SdlWindow.h" |
610
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 #endif |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 |
797
20262f5e5e88
Added missing HttpClient::GlobalInitialize in StoneInitialize
Benjamin Golinvaux <bgo@osimis.io>
parents:
663
diff
changeset
|
34 #if ORTHANC_ENABLE_CURL == 1 |
20262f5e5e88
Added missing HttpClient::GlobalInitialize in StoneInitialize
Benjamin Golinvaux <bgo@osimis.io>
parents:
663
diff
changeset
|
35 #include <Core/HttpClient.h> |
20262f5e5e88
Added missing HttpClient::GlobalInitialize in StoneInitialize
Benjamin Golinvaux <bgo@osimis.io>
parents:
663
diff
changeset
|
36 #endif |
20262f5e5e88
Added missing HttpClient::GlobalInitialize in StoneInitialize
Benjamin Golinvaux <bgo@osimis.io>
parents:
663
diff
changeset
|
37 |
610
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 namespace OrthancStone |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 { |
663
b8b2bb75fde1
fix to include Stone within an Orthanc plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
613
diff
changeset
|
40 #if ORTHANC_ENABLE_LOGGING_PLUGIN == 1 |
b8b2bb75fde1
fix to include Stone within an Orthanc plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
613
diff
changeset
|
41 void StoneInitialize(OrthancPluginContext* context) |
b8b2bb75fde1
fix to include Stone within an Orthanc plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
613
diff
changeset
|
42 #else |
610
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 void StoneInitialize() |
663
b8b2bb75fde1
fix to include Stone within an Orthanc plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
613
diff
changeset
|
44 #endif |
610
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 { |
663
b8b2bb75fde1
fix to include Stone within an Orthanc plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
613
diff
changeset
|
46 #if ORTHANC_ENABLE_LOGGING_PLUGIN == 1 |
b8b2bb75fde1
fix to include Stone within an Orthanc plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
613
diff
changeset
|
47 Orthanc::Logging::Initialize(context); |
b8b2bb75fde1
fix to include Stone within an Orthanc plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
613
diff
changeset
|
48 #else |
610
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 Orthanc::Logging::Initialize(); |
663
b8b2bb75fde1
fix to include Stone within an Orthanc plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
613
diff
changeset
|
50 #endif |
610
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 #if ORTHANC_ENABLE_SDL == 1 |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 OrthancStone::SdlWindow::GlobalInitialize(); |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 #endif |
797
20262f5e5e88
Added missing HttpClient::GlobalInitialize in StoneInitialize
Benjamin Golinvaux <bgo@osimis.io>
parents:
663
diff
changeset
|
55 |
20262f5e5e88
Added missing HttpClient::GlobalInitialize in StoneInitialize
Benjamin Golinvaux <bgo@osimis.io>
parents:
663
diff
changeset
|
56 #if ORTHANC_ENABLE_CURL == 1 |
20262f5e5e88
Added missing HttpClient::GlobalInitialize in StoneInitialize
Benjamin Golinvaux <bgo@osimis.io>
parents:
663
diff
changeset
|
57 Orthanc::HttpClient::GlobalInitialize(); |
20262f5e5e88
Added missing HttpClient::GlobalInitialize in StoneInitialize
Benjamin Golinvaux <bgo@osimis.io>
parents:
663
diff
changeset
|
58 #endif |
610
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 } |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
60 |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 void StoneFinalize() |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 { |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 #if ORTHANC_ENABLE_SDL == 1 |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
64 OrthancStone::SdlWindow::GlobalFinalize(); |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 #endif |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 |
804
61ba4b504e9a
PolylineSceneLayer now has one color per chain
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
797
diff
changeset
|
67 #if ORTHANC_ENABLE_CURL == 1 |
61ba4b504e9a
PolylineSceneLayer now has one color per chain
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
797
diff
changeset
|
68 Orthanc::HttpClient::GlobalFinalize(); |
61ba4b504e9a
PolylineSceneLayer now has one color per chain
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
797
diff
changeset
|
69 #endif |
61ba4b504e9a
PolylineSceneLayer now has one color per chain
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
797
diff
changeset
|
70 |
610
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 Orthanc::Logging::Finalize(); |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 } |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 } |