Mercurial > hg > orthanc-stone
comparison Framework/Toolbox/DicomFrameConverter.h @ 605:7a7e36c52d62
Merged am-dev into default
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 29 Apr 2019 15:24:59 +0200 |
parents | e77cbe4bb4c8 |
children | d2c0e347ddc2 |
comparison
equal
deleted
inserted
replaced
604:86dfde451f4c | 605:7a7e36c52d62 |
---|---|
11 * | 11 * |
12 * This program is distributed in the hope that it will be useful, but | 12 * This program is distributed in the hope that it will be useful, but |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 * Affero General Public License for more details. | 15 * Affero General Public License for more details. |
16 * | 16 * |
17 * You should have received a copy of the GNU Affero General Public License | 17 * You should have received a copy of the GNU Affero General Public License |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 **/ | 19 **/ |
20 | 20 |
21 | 21 |
61 | 61 |
62 ~DicomFrameConverter() | 62 ~DicomFrameConverter() |
63 { | 63 { |
64 // TODO: check whether this dtor is called or not | 64 // TODO: check whether this dtor is called or not |
65 // An MSVC warning explains that declaring an | 65 // An MSVC warning explains that declaring an |
66 // std::auto_ptr with a forward-declared type | 66 // std::auto_ptr with a forward-declared type |
67 // prevents its dtor from being called. Does not | 67 // prevents its dtor from being called. Does not |
68 // seem an issue here (only POD types inside), but | 68 // seem an issue here (only POD types inside), but |
69 // definitely something to keep an eye on. | 69 // definitely something to keep an eye on. |
70 (void)0; | 70 (void)0; |
71 } | |
72 | |
73 // AM: this is required to serialize/deserialize it | |
74 DicomFrameConverter( | |
75 bool isSigned, | |
76 bool isColor, | |
77 bool hasRescale, | |
78 double rescaleIntercept, | |
79 double rescaleSlope, | |
80 bool hasDefaultWindow, | |
81 double defaultWindowCenter, | |
82 double defaultWindowWidth, | |
83 Orthanc::PhotometricInterpretation photometric, | |
84 Orthanc::PixelFormat expectedPixelFormat | |
85 ): | |
86 isSigned_(isSigned), | |
87 isColor_(isColor), | |
88 hasRescale_(hasRescale), | |
89 rescaleIntercept_(rescaleIntercept), | |
90 rescaleSlope_(rescaleSlope), | |
91 hasDefaultWindow_(hasDefaultWindow), | |
92 defaultWindowCenter_(defaultWindowCenter), | |
93 defaultWindowWidth_(defaultWindowWidth), | |
94 photometric_(photometric), | |
95 expectedPixelFormat_(expectedPixelFormat) | |
96 {} | |
97 | |
98 void GetParameters(bool& isSigned, | |
99 bool& isColor, | |
100 bool& hasRescale, | |
101 double& rescaleIntercept, | |
102 double& rescaleSlope, | |
103 bool& hasDefaultWindow, | |
104 double& defaultWindowCenter, | |
105 double& defaultWindowWidth, | |
106 Orthanc::PhotometricInterpretation& photometric, | |
107 Orthanc::PixelFormat& expectedPixelFormat) const | |
108 { | |
109 isSigned = isSigned_; | |
110 isColor = isColor_; | |
111 hasRescale = hasRescale_; | |
112 rescaleIntercept = rescaleIntercept_; | |
113 rescaleSlope = rescaleSlope_; | |
114 hasDefaultWindow = hasDefaultWindow_; | |
115 defaultWindowCenter = defaultWindowCenter_; | |
116 defaultWindowWidth = defaultWindowWidth_; | |
117 photometric = photometric_; | |
118 expectedPixelFormat = expectedPixelFormat_; | |
71 } | 119 } |
72 | 120 |
73 Orthanc::PixelFormat GetExpectedPixelFormat() const | 121 Orthanc::PixelFormat GetExpectedPixelFormat() const |
74 { | 122 { |
75 return expectedPixelFormat_; | 123 return expectedPixelFormat_; |
101 | 149 |
102 double GetRescaleIntercept() const | 150 double GetRescaleIntercept() const |
103 { | 151 { |
104 return rescaleIntercept_; | 152 return rescaleIntercept_; |
105 } | 153 } |
106 | 154 |
107 double GetRescaleSlope() const | 155 double GetRescaleSlope() const |
108 { | 156 { |
109 return rescaleSlope_; | 157 return rescaleSlope_; |
110 } | 158 } |
111 | 159 |