Mercurial > hg > orthanc-stone
annotate Framework/StoneInitialization.cpp @ 670:5dd496343fad
Restored missing code + fixed key ordering when generating code
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 15 May 2019 18:29:42 +0200 |
parents | b8b2bb75fde1 |
children | 20262f5e5e88 |
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 |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 # include "../Applications/Sdl/SdlWindow.h" |
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 |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 namespace OrthancStone |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 { |
663
b8b2bb75fde1
fix to include Stone within an Orthanc plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
613
diff
changeset
|
36 #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
|
37 void StoneInitialize(OrthancPluginContext* context) |
b8b2bb75fde1
fix to include Stone within an Orthanc plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
613
diff
changeset
|
38 #else |
610
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 void StoneInitialize() |
663
b8b2bb75fde1
fix to include Stone within an Orthanc plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
613
diff
changeset
|
40 #endif |
610
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 { |
663
b8b2bb75fde1
fix to include Stone within an Orthanc plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
613
diff
changeset
|
42 #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
|
43 Orthanc::Logging::Initialize(context); |
b8b2bb75fde1
fix to include Stone within an Orthanc plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
613
diff
changeset
|
44 #else |
610
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 Orthanc::Logging::Initialize(); |
663
b8b2bb75fde1
fix to include Stone within an Orthanc plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
613
diff
changeset
|
46 #endif |
610
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 #if ORTHANC_ENABLE_SDL == 1 |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 OrthancStone::SdlWindow::GlobalInitialize(); |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 #endif |
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 |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 void StoneFinalize() |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 { |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 #if ORTHANC_ENABLE_SDL == 1 |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 OrthancStone::SdlWindow::GlobalFinalize(); |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 #endif |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 |
0c4c0693b97c
OrthancStone::StoneInitialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 Orthanc::Logging::Finalize(); |
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 } |