annotate Framework/Deprecated/Toolbox/DicomFrameConverter.h @ 1205:6009c59d8676 broker

fix to sdl
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Dec 2019 14:32:05 +0100
parents c35e98d22764
children 2d8ab34c8c91
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Stone of Orthanc
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
439
b70e9be013e4 preparing for 2019
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
47
28956ed68280 agpl license
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 40
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
28956ed68280 agpl license
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 40
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
28956ed68280 agpl license
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 40
diff changeset
10 * the License, or (at your option) any later version.
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
47
28956ed68280 agpl license
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 40
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28956ed68280 agpl license
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 40
diff changeset
15 * Affero General Public License for more details.
570
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
16 *
47
28956ed68280 agpl license
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 40
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
338
b3b3fa0e3689 BitmapStack
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 328
diff changeset
24 #include <Plugins/Samples/Common/IDicomDataset.h>
212
5412adf19980 resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 201
diff changeset
25 #include <Core/DicomFormat/DicomMap.h>
5412adf19980 resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 201
diff changeset
26 #include <Core/Images/ImageAccessor.h>
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
32
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 16
diff changeset
28 #include <memory>
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
714
d2c0e347ddc2 deprecating DicomFrameConverter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 570
diff changeset
30 namespace Deprecated
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 {
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 /**
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 * This class is responsible for converting the pixel format of a
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 * DICOM frame coming from Orthanc, into a pixel format that is
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 * suitable for Stone, given the relevant DICOM tags:
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 * - Color frames will stay in the RGB24 format.
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 * - Grayscale frames will be converted to the Float32 format.
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 **/
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 class DicomFrameConverter
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 {
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 private:
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 bool isSigned_;
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 bool isColor_;
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 bool hasRescale_;
119
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 118
diff changeset
45 double rescaleIntercept_;
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 118
diff changeset
46 double rescaleSlope_;
338
b3b3fa0e3689 BitmapStack
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 328
diff changeset
47 bool hasDefaultWindow_;
119
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 118
diff changeset
48 double defaultWindowCenter_;
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 118
diff changeset
49 double defaultWindowWidth_;
328
c80b5bddf86b support of monochrome1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 212
diff changeset
50
c80b5bddf86b support of monochrome1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 212
diff changeset
51 Orthanc::PhotometricInterpretation photometric_;
c80b5bddf86b support of monochrome1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 212
diff changeset
52 Orthanc::PixelFormat expectedPixelFormat_;
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 void SetDefaultParameters();
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 public:
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 DicomFrameConverter()
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 {
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 SetDefaultParameters();
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 }
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61
517
64ee3033e1ca dummy dtor to check proper deletion
Benjamin Golinvaux <bgo@osimis.io>
parents: 439
diff changeset
62 ~DicomFrameConverter()
64ee3033e1ca dummy dtor to check proper deletion
Benjamin Golinvaux <bgo@osimis.io>
parents: 439
diff changeset
63 {
64ee3033e1ca dummy dtor to check proper deletion
Benjamin Golinvaux <bgo@osimis.io>
parents: 439
diff changeset
64 // TODO: check whether this dtor is called or not
64ee3033e1ca dummy dtor to check proper deletion
Benjamin Golinvaux <bgo@osimis.io>
parents: 439
diff changeset
65 // An MSVC warning explains that declaring an
570
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
66 // std::auto_ptr with a forward-declared type
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
67 // prevents its dtor from being called. Does not
517
64ee3033e1ca dummy dtor to check proper deletion
Benjamin Golinvaux <bgo@osimis.io>
parents: 439
diff changeset
68 // seem an issue here (only POD types inside), but
570
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
69 // definitely something to keep an eye on.
517
64ee3033e1ca dummy dtor to check proper deletion
Benjamin Golinvaux <bgo@osimis.io>
parents: 439
diff changeset
70 (void)0;
64ee3033e1ca dummy dtor to check proper deletion
Benjamin Golinvaux <bgo@osimis.io>
parents: 439
diff changeset
71 }
64ee3033e1ca dummy dtor to check proper deletion
Benjamin Golinvaux <bgo@osimis.io>
parents: 439
diff changeset
72
570
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
73 // AM: this is required to serialize/deserialize it
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
74 DicomFrameConverter(
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
75 bool isSigned,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
76 bool isColor,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
77 bool hasRescale,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
78 double rescaleIntercept,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
79 double rescaleSlope,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
80 bool hasDefaultWindow,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
81 double defaultWindowCenter,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
82 double defaultWindowWidth,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
83 Orthanc::PhotometricInterpretation photometric,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
84 Orthanc::PixelFormat expectedPixelFormat
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
85 ):
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
86 isSigned_(isSigned),
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
87 isColor_(isColor),
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
88 hasRescale_(hasRescale),
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
89 rescaleIntercept_(rescaleIntercept),
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
90 rescaleSlope_(rescaleSlope),
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
91 hasDefaultWindow_(hasDefaultWindow),
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
92 defaultWindowCenter_(defaultWindowCenter),
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
93 defaultWindowWidth_(defaultWindowWidth),
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
94 photometric_(photometric),
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
95 expectedPixelFormat_(expectedPixelFormat)
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
96 {}
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
97
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
98 void GetParameters(bool& isSigned,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
99 bool& isColor,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
100 bool& hasRescale,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
101 double& rescaleIntercept,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
102 double& rescaleSlope,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
103 bool& hasDefaultWindow,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
104 double& defaultWindowCenter,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
105 double& defaultWindowWidth,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
106 Orthanc::PhotometricInterpretation& photometric,
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
107 Orthanc::PixelFormat& expectedPixelFormat) const
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
108 {
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
109 isSigned = isSigned_;
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
110 isColor = isColor_;
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
111 hasRescale = hasRescale_;
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
112 rescaleIntercept = rescaleIntercept_;
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
113 rescaleSlope = rescaleSlope_;
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
114 hasDefaultWindow = hasDefaultWindow_;
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
115 defaultWindowCenter = defaultWindowCenter_;
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
116 defaultWindowWidth = defaultWindowWidth_;
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
117 photometric = photometric_;
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
118 expectedPixelFormat = expectedPixelFormat_;
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
119 }
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
120
119
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 118
diff changeset
121 Orthanc::PixelFormat GetExpectedPixelFormat() const
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 118
diff changeset
122 {
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 118
diff changeset
123 return expectedPixelFormat_;
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 118
diff changeset
124 }
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125
328
c80b5bddf86b support of monochrome1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 212
diff changeset
126 Orthanc::PhotometricInterpretation GetPhotometricInterpretation() const
c80b5bddf86b support of monochrome1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 212
diff changeset
127 {
c80b5bddf86b support of monochrome1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 212
diff changeset
128 return photometric_;
c80b5bddf86b support of monochrome1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 212
diff changeset
129 }
c80b5bddf86b support of monochrome1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 212
diff changeset
130
118
a4d0b6c82b29 using Orthanc::DicomMap instead of OrthancPlugins::DicomDatasetReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
131 void ReadParameters(const Orthanc::DicomMap& dicom);
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132
338
b3b3fa0e3689 BitmapStack
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 328
diff changeset
133 void ReadParameters(const OrthancPlugins::IDicomDataset& dicom);
b3b3fa0e3689 BitmapStack
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 328
diff changeset
134
b3b3fa0e3689 BitmapStack
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 328
diff changeset
135 bool HasDefaultWindow() const
b3b3fa0e3689 BitmapStack
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 328
diff changeset
136 {
b3b3fa0e3689 BitmapStack
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 328
diff changeset
137 return hasDefaultWindow_;
b3b3fa0e3689 BitmapStack
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 328
diff changeset
138 }
b3b3fa0e3689 BitmapStack
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 328
diff changeset
139
119
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 118
diff changeset
140 double GetDefaultWindowCenter() const
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 {
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 return defaultWindowCenter_;
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 }
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144
119
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 118
diff changeset
145 double GetDefaultWindowWidth() const
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 {
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 return defaultWindowWidth_;
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 }
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149
148
c6a464c266dd accessors
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
150 double GetRescaleIntercept() const
c6a464c266dd accessors
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
151 {
c6a464c266dd accessors
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
152 return rescaleIntercept_;
c6a464c266dd accessors
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
153 }
570
e77cbe4bb4c8 fix + access to DicomFrameConverter members to allow serialization
Alain Mazy <alain@mazy.be>
parents: 517
diff changeset
154
148
c6a464c266dd accessors
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
155 double GetRescaleSlope() const
c6a464c266dd accessors
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
156 {
c6a464c266dd accessors
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
157 return rescaleSlope_;
c6a464c266dd accessors
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
158 }
c6a464c266dd accessors
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
159
338
b3b3fa0e3689 BitmapStack
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 328
diff changeset
160 void ConvertFrameInplace(std::auto_ptr<Orthanc::ImageAccessor>& source) const;
b3b3fa0e3689 BitmapStack
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 328
diff changeset
161
b3b3fa0e3689 BitmapStack
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 328
diff changeset
162 Orthanc::ImageAccessor* ConvertFrame(const Orthanc::ImageAccessor& source) const;
119
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 118
diff changeset
163
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 118
diff changeset
164 void ApplyRescale(Orthanc::ImageAccessor& image,
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 118
diff changeset
165 bool useDouble) const;
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 118
diff changeset
166
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 118
diff changeset
167 double Apply(double x) const;
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 };
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 }