annotate OrthancStone/Sources/StoneException.h @ 1953:0661115af939 deep-learning

first successful application of deep learning
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 16 Aug 2022 15:05:51 +0200
parents 7053b8a0aaec
children 07964689cb0b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
1871
7053b8a0aaec upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1870
diff changeset
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium
7053b8a0aaec upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1870
diff changeset
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
7 *
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
8 * This program is free software: you can redistribute it and/or
1598
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
9 * modify it under the terms of the GNU Lesser General Public License
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
10 * 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
11 * 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
12 *
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
13 * 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
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
1598
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
16 * Lesser General Public License for more details.
1596
4fb8fdf03314 removed annoying whitespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
17 *
1598
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
18 * You should have received a copy of the GNU Lesser General Public
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
19 * License along with this program. If not, see
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
20 * <http://www.gnu.org/licenses/>.
295
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
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 #pragma once
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
25
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
26 #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
27
1455
30deba7bc8e2 simplifying include_directories
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1385
diff changeset
28 #include <OrthancException.h>
1385
ffe9beb7c5d3 Added LoadInstanceFullVisibility for default-visible RTSTRUCT
Benjamin Golinvaux <bgo@osimis.io>
parents: 1270
diff changeset
29
ffe9beb7c5d3 Added LoadInstanceFullVisibility for default-visible RTSTRUCT
Benjamin Golinvaux <bgo@osimis.io>
parents: 1270
diff changeset
30 #include <boost/lexical_cast.hpp>
ffe9beb7c5d3 Added LoadInstanceFullVisibility for default-visible RTSTRUCT
Benjamin Golinvaux <bgo@osimis.io>
parents: 1270
diff changeset
31
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
32 #include <iostream>
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
33
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
34 namespace OrthancStone
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
35 {
297
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
36 enum ErrorCode
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
37 {
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
38 ErrorCode_Success,
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
39 ErrorCode_OrthancError, // this StoneException is actually an OrthancException with an Orthanc error code
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
40 ErrorCode_ApplicationException, // this StoneException is specific to an application (and should have its own internal error code)
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
41 ErrorCode_NotImplemented, // case not implemented
307
be2660b6e40a wip: commands + status update
am@osimis.io
parents: 297
diff changeset
42
318
3a4ca166fafa ImageAccessor refactoring + implemented Image Cache in SmartLoader
am@osimis.io
parents: 307
diff changeset
43 ErrorCode_CanOnlyAddOneLayerAtATime,
307
be2660b6e40a wip: commands + status update
am@osimis.io
parents: 297
diff changeset
44 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
45 ErrorCode_WebGLContextLost,
297
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
46 ErrorCode_Last
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
47 };
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
48
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
49
1071
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
50
297
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
51 class StoneException
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
52 {
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
53 protected:
1640
52b8b96cb55f cleaning namespaces
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1598
diff changeset
54 ErrorCode errorCode_;
297
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
55
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
56 public:
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
57 explicit StoneException(ErrorCode errorCode) :
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
58 errorCode_(errorCode)
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
59 {
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
60 }
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
61
1033
e160159b1905 Fixed buggy return of stack data
Benjamin Golinvaux <bgo@osimis.io>
parents: 949
diff changeset
62 virtual ~StoneException() {}
e160159b1905 Fixed buggy return of stack data
Benjamin Golinvaux <bgo@osimis.io>
parents: 949
diff changeset
63
297
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
64 ErrorCode GetErrorCode() const
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
65 {
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
66 return errorCode_;
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
67 }
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
68
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
69 virtual const char* What() const
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
70 {
1071
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
71 switch (errorCode_)
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
72 {
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
73 case ErrorCode_Success:
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
74 return "Success";
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
75 break;
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
76 case ErrorCode_OrthancError:
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
77 return "OrthancError";
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
78 break;
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
79 case ErrorCode_ApplicationException:
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
80 return "ApplicationException";
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
81 break;
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
82 case ErrorCode_NotImplemented:
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
83 return "NotImplemented";
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
84 break;
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
85 case ErrorCode_CanOnlyAddOneLayerAtATime:
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
86 return "CanOnlyAddOneLayerAtATime";
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
87 break;
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
88 case ErrorCode_CommandJsonInvalidFormat:
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
89 return "CommandJsonInvalidFormat";
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
90 break;
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
91 case ErrorCode_WebGLContextLost:
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
92 return "WebGLContextLost";
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
93 break;
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
94 case ErrorCode_Last:
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
95 return "Last";
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
96 break;
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
97 default:
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
98 return "Unknown exception code!";
6dd90b8d1589 Fixes related to refactorings in viewports.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1057
diff changeset
99 }
297
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
100 }
1992f7b8563e introduced StoneException
am@osimis.io
parents: 295
diff changeset
101 };
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
102 }
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
103
722
28b9e3a54200 Undo mechanism implemented (not connected to UI yet). Undo stack and measuring
Benjamin Golinvaux <bgo@osimis.io>
parents: 439
diff changeset
104 // 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
105 // (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
106 #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
107 if (!(cond)) { \
28b9e3a54200 Undo mechanism implemented (not connected to UI yet). Undo stack and measuring
Benjamin Golinvaux <bgo@osimis.io>
parents: 439
diff changeset
108 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
109 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
110 std::string sstr = sst.str(); \
738
8e31b174ab26 removing using namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 722
diff changeset
111 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
112 } 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
113
751
712ff6ff3c19 - undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents: 722
diff changeset
114 #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
115 if (!(cond)) { \
712ff6ff3c19 - undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents: 722
diff changeset
116 std::stringstream sst; \
712ff6ff3c19 - undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents: 722
diff changeset
117 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
118 std::string sstr = sst.str(); \
851
101073b3e855 Added namespace to ORTHANC_ASSERT macros
Benjamin Golinvaux <bgo@osimis.io>
parents: 761
diff changeset
119 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
120 } else (void)0
712ff6ff3c19 - undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents: 722
diff changeset
121
712ff6ff3c19 - undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents: 722
diff changeset
122 # 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
123 # 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
124 # 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
125
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
126
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
127
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
128
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
129
751
712ff6ff3c19 - undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents: 722
diff changeset
130 /*
712ff6ff3c19 - undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents: 722
diff changeset
131 Explanation:
712ff6ff3c19 - undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents: 722
diff changeset
132
712ff6ff3c19 - undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents: 722
diff changeset
133 ORTHANC_ASSERT(a)
712ff6ff3c19 - undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents: 722
diff changeset
134 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
135 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
136 ORTHANC_ASSERT1(a)
712ff6ff3c19 - undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents: 722
diff changeset
137
712ff6ff3c19 - undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents: 722
diff changeset
138 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
139 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
140 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
141 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
142
712ff6ff3c19 - undo redo now works fine for both measure tool creation commands
Benjamin Golinvaux <bgo@osimis.io>
parents: 722
diff changeset
143 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
144 */
761
07adcffba38c truncation warning fixes + CRLF -> LF + random measuring tool creation (keyb
Benjamin Golinvaux <bgo@osimis.io>
parents: 754
diff changeset
145
07adcffba38c truncation warning fixes + CRLF -> LF + random measuring tool creation (keyb
Benjamin Golinvaux <bgo@osimis.io>
parents: 754
diff changeset
146
07adcffba38c truncation warning fixes + CRLF -> LF + random measuring tool creation (keyb
Benjamin Golinvaux <bgo@osimis.io>
parents: 754
diff changeset
147
07adcffba38c truncation warning fixes + CRLF -> LF + random measuring tool creation (keyb
Benjamin Golinvaux <bgo@osimis.io>
parents: 754
diff changeset
148
07adcffba38c truncation warning fixes + CRLF -> LF + random measuring tool creation (keyb
Benjamin Golinvaux <bgo@osimis.io>
parents: 754
diff changeset
149
07adcffba38c truncation warning fixes + CRLF -> LF + random measuring tool creation (keyb
Benjamin Golinvaux <bgo@osimis.io>
parents: 754
diff changeset
150