Mercurial > hg > orthanc-stone
annotate Framework/StoneException.h @ 1040:14c0a29cd9ec
qt and lsb
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 08 Oct 2019 11:19:58 +0200 |
parents | e160159b1905 |
children | efc5b62b9539 |
rev | line source |
---|---|
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
1 /** |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
2 * Stone of Orthanc |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
439 | 5 * Copyright (C) 2017-2019 Osimis S.A., Belgium |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
6 * |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
8 * modify it under the terms of the GNU Affero General Public License |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
10 * the License, or (at your option) any later version. |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
11 * |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
15 * Affero General Public License for more details. |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
16 * |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
17 * You should have received a copy of the GNU Affero General Public License |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
19 **/ |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
20 |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
21 |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
22 #pragma once |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
23 |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
24 #include "Core/OrthancException.h" |
949
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
25 #include "Toolbox/LinearAlgebra.h" |
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
26 |
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
27 #include <iostream> |
297 | 28 #include <boost/lexical_cast.hpp> |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
29 |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
30 namespace OrthancStone |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
31 { |
297 | 32 enum ErrorCode |
33 { | |
34 ErrorCode_Success, | |
35 ErrorCode_OrthancError, // this StoneException is actually an OrthancException with an Orthanc error code | |
36 ErrorCode_ApplicationException, // this StoneException is specific to an application (and should have its own internal error code) | |
37 ErrorCode_NotImplemented, // case not implemented | |
307 | 38 |
297 | 39 ErrorCode_PromiseSingleSuccessHandler, // a Promise can only have a single success handler |
40 ErrorCode_PromiseSingleFailureHandler, // a Promise can only have a single failure handler | |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
41 |
318
3a4ca166fafa
ImageAccessor refactoring + implemented Image Cache in SmartLoader
am@osimis.io
parents:
307
diff
changeset
|
42 ErrorCode_CanOnlyAddOneLayerAtATime, |
307 | 43 ErrorCode_CommandJsonInvalidFormat, |
947
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
44 ErrorCode_WebGLContextLost, |
297 | 45 ErrorCode_Last |
46 }; | |
47 | |
48 | |
49 | |
50 class StoneException | |
51 { | |
52 protected: | |
53 OrthancStone::ErrorCode errorCode_; | |
54 | |
55 public: | |
56 explicit StoneException(ErrorCode errorCode) : | |
57 errorCode_(errorCode) | |
58 { | |
59 } | |
60 | |
1033
e160159b1905
Fixed buggy return of stack data
Benjamin Golinvaux <bgo@osimis.io>
parents:
949
diff
changeset
|
61 virtual ~StoneException() {} |
e160159b1905
Fixed buggy return of stack data
Benjamin Golinvaux <bgo@osimis.io>
parents:
949
diff
changeset
|
62 |
297 | 63 ErrorCode GetErrorCode() const |
64 { | |
65 return errorCode_; | |
66 } | |
67 | |
68 virtual const char* What() const | |
69 { | |
70 return "TODO: EnumerationToString for StoneException"; | |
71 } | |
72 }; | |
73 | |
947
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
74 class OpenGLContextLostException : public StoneException |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
75 { |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
76 public: |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
77 explicit OpenGLContextLostException(void* context) |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
78 : StoneException(ErrorCode_WebGLContextLost) |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
79 , context_(context) |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
80 { |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
81 } |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
82 virtual const char* What() const |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
83 { |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
84 return "The OpenGL/WebGL context has been lost!"; |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
85 } |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
86 void* context_; |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
87 }; |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
851
diff
changeset
|
88 |
297 | 89 class StoneOrthancException : public StoneException |
90 { | |
91 protected: | |
92 Orthanc::OrthancException& orthancException_; | |
93 | |
94 public: | |
95 explicit StoneOrthancException(Orthanc::OrthancException& orthancException) : | |
96 StoneException(ErrorCode_OrthancError), | |
97 orthancException_(orthancException) | |
98 { | |
99 } | |
100 | |
101 Orthanc::ErrorCode GetOrthancErrorCode() const | |
102 { | |
103 return orthancException_.GetErrorCode(); | |
104 } | |
105 | |
106 virtual const char* What() const | |
107 { | |
108 return orthancException_.What(); | |
109 } | |
110 }; | |
111 | |
112 class StoneApplicationException : public StoneException | |
113 { | |
114 protected: | |
115 int applicationErrorCode_; | |
1033
e160159b1905
Fixed buggy return of stack data
Benjamin Golinvaux <bgo@osimis.io>
parents:
949
diff
changeset
|
116 mutable std::string errorMessage_; |
297 | 117 |
118 public: | |
119 explicit StoneApplicationException(int applicationErrorCode) : | |
120 StoneException(ErrorCode_ApplicationException), | |
121 applicationErrorCode_(applicationErrorCode) | |
122 { | |
123 } | |
124 | |
125 int GetApplicationErrorCode() const | |
126 { | |
127 return applicationErrorCode_; | |
128 } | |
129 | |
130 virtual const char* What() const | |
131 { | |
1033
e160159b1905
Fixed buggy return of stack data
Benjamin Golinvaux <bgo@osimis.io>
parents:
949
diff
changeset
|
132 if (errorMessage_.size() == 0) |
e160159b1905
Fixed buggy return of stack data
Benjamin Golinvaux <bgo@osimis.io>
parents:
949
diff
changeset
|
133 errorMessage_ = boost::lexical_cast<std::string>(applicationErrorCode_); |
e160159b1905
Fixed buggy return of stack data
Benjamin Golinvaux <bgo@osimis.io>
parents:
949
diff
changeset
|
134 |
e160159b1905
Fixed buggy return of stack data
Benjamin Golinvaux <bgo@osimis.io>
parents:
949
diff
changeset
|
135 return errorMessage_.c_str(); |
297 | 136 } |
137 }; | |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
138 } |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
139 |
722
28b9e3a54200
Undo mechanism implemented (not connected to UI yet). Undo stack and measuring
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
140 // See https://isocpp.org/wiki/faq/misc-technical-issues#macros-with-multi-stmts |
28b9e3a54200
Undo mechanism implemented (not connected to UI yet). Undo stack and measuring
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
141 // (or google "Multiple lines macro C++ faq lite" if link is dead) |
751
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
142 #define ORTHANC_ASSERT2(cond,streamChainMessage) \ |
722
28b9e3a54200
Undo mechanism implemented (not connected to UI yet). Undo stack and measuring
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
143 if (!(cond)) { \ |
28b9e3a54200
Undo mechanism implemented (not connected to UI yet). Undo stack and measuring
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
144 std::stringstream sst; \ |
28b9e3a54200
Undo mechanism implemented (not connected to UI yet). Undo stack and measuring
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
145 sst << "Assertion failed. Condition = \"" #cond "\" Message = \"" << streamChainMessage << "\""; \ |
28b9e3a54200
Undo mechanism implemented (not connected to UI yet). Undo stack and measuring
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
146 std::string sstr = sst.str(); \ |
738
8e31b174ab26
removing using namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
722
diff
changeset
|
147 throw ::Orthanc::OrthancException(::Orthanc::ErrorCode_InternalError,sstr.c_str()); \ |
722
28b9e3a54200
Undo mechanism implemented (not connected to UI yet). Undo stack and measuring
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
148 } else (void)0 |
28b9e3a54200
Undo mechanism implemented (not connected to UI yet). Undo stack and measuring
Benjamin Golinvaux <bgo@osimis.io>
parents:
439
diff
changeset
|
149 |
751
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
150 #define ORTHANC_ASSERT1(cond) \ |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
151 if (!(cond)) { \ |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
152 std::stringstream sst; \ |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
153 sst << "Assertion failed. Condition = \"" #cond "\""; \ |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
154 std::string sstr = sst.str(); \ |
851
101073b3e855
Added namespace to ORTHANC_ASSERT macros
Benjamin Golinvaux <bgo@osimis.io>
parents:
761
diff
changeset
|
155 throw ::Orthanc::OrthancException(::Orthanc::ErrorCode_InternalError,sstr.c_str()); \ |
751
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
156 } else (void)0 |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
157 |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
158 # define ORTHANC_EXPAND( x ) x |
761
07adcffba38c
truncation warning fixes + CRLF -> LF + random measuring tool creation (keyb
Benjamin Golinvaux <bgo@osimis.io>
parents:
754
diff
changeset
|
159 # define GET_ORTHANC_ASSERT(_1,_2,NAME,...) NAME |
751
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
160 # define ORTHANC_ASSERT(...) ORTHANC_EXPAND(GET_ORTHANC_ASSERT(__VA_ARGS__, ORTHANC_ASSERT2, ORTHANC_ASSERT1, UNUSED)(__VA_ARGS__)) |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
161 |
949
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
162 |
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
163 |
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
164 |
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
165 |
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
166 |
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
167 |
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
168 |
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
169 |
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
170 |
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
171 |
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
172 |
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
173 |
751
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
174 /* |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
175 Explanation: |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
176 |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
177 ORTHANC_ASSERT(a) |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
178 ORTHANC_EXPAND(GET_ORTHANC_ASSERT(a, ORTHANC_ASSERT2, ORTHANC_ASSERT1, UNUSED)(a)) |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
179 ORTHANC_EXPAND(ORTHANC_ASSERT1(a)) |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
180 ORTHANC_ASSERT1(a) |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
181 |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
182 ORTHANC_ASSERT(a,b) |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
183 ORTHANC_EXPAND(GET_ORTHANC_ASSERT(a, b, ORTHANC_ASSERT2, ORTHANC_ASSERT1, UNUSED)(a,b)) |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
184 ORTHANC_EXPAND(ORTHANC_ASSERT2(a,b)) |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
185 ORTHANC_ASSERT2(a,b) |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
186 |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
187 Note: ORTHANC_EXPAND is required for some older compilers (MS v100 cl.exe ) |
712ff6ff3c19
- undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents:
722
diff
changeset
|
188 */ |
761
07adcffba38c
truncation warning fixes + CRLF -> LF + random measuring tool creation (keyb
Benjamin Golinvaux <bgo@osimis.io>
parents:
754
diff
changeset
|
189 |
07adcffba38c
truncation warning fixes + CRLF -> LF + random measuring tool creation (keyb
Benjamin Golinvaux <bgo@osimis.io>
parents:
754
diff
changeset
|
190 |
07adcffba38c
truncation warning fixes + CRLF -> LF + random measuring tool creation (keyb
Benjamin Golinvaux <bgo@osimis.io>
parents:
754
diff
changeset
|
191 |
07adcffba38c
truncation warning fixes + CRLF -> LF + random measuring tool creation (keyb
Benjamin Golinvaux <bgo@osimis.io>
parents:
754
diff
changeset
|
192 |
07adcffba38c
truncation warning fixes + CRLF -> LF + random measuring tool creation (keyb
Benjamin Golinvaux <bgo@osimis.io>
parents:
754
diff
changeset
|
193 |
07adcffba38c
truncation warning fixes + CRLF -> LF + random measuring tool creation (keyb
Benjamin Golinvaux <bgo@osimis.io>
parents:
754
diff
changeset
|
194 |