Mercurial > hg > orthanc
comparison Core/DicomFormat/DicomImageInformation.cpp @ 2870:716dd24974ef
DicomImageInformation::Clone()
author | am@osimis.io |
---|---|
date | Mon, 08 Oct 2018 17:36:54 +0200 |
parents | f3a2d109e361 |
children | c9f93628215a |
comparison
equal
deleted
inserted
replaced
2869:2bd87764709c | 2870:716dd24974ef |
---|---|
43 #include "../Toolbox.h" | 43 #include "../Toolbox.h" |
44 #include <boost/lexical_cast.hpp> | 44 #include <boost/lexical_cast.hpp> |
45 #include <limits> | 45 #include <limits> |
46 #include <cassert> | 46 #include <cassert> |
47 #include <stdio.h> | 47 #include <stdio.h> |
48 #include <memory> | |
48 | 49 |
49 namespace Orthanc | 50 namespace Orthanc |
50 { | 51 { |
51 DicomImageInformation::DicomImageInformation(const DicomMap& values) | 52 DicomImageInformation::DicomImageInformation(const DicomMap& values) |
52 { | 53 { |
211 | 212 |
212 isPlanar_ = (planarConfiguration != 0 ? true : false); | 213 isPlanar_ = (planarConfiguration != 0 ? true : false); |
213 isSigned_ = (pixelRepresentation != 0 ? true : false); | 214 isSigned_ = (pixelRepresentation != 0 ? true : false); |
214 } | 215 } |
215 | 216 |
217 DicomImageInformation* DicomImageInformation::Clone() const | |
218 { | |
219 std::auto_ptr<DicomImageInformation> target(new DicomImageInformation); | |
220 target->width_ = width_; | |
221 target->height_ = height_; | |
222 target->samplesPerPixel_ = samplesPerPixel_; | |
223 target->numberOfFrames_ = numberOfFrames_; | |
224 target->isPlanar_ = isPlanar_; | |
225 target->isSigned_ = isSigned_; | |
226 target->bytesPerValue_ = bytesPerValue_; | |
227 target->bitsAllocated_ = bitsAllocated_; | |
228 target->bitsStored_ = bitsStored_; | |
229 target->highBit_ = highBit_; | |
230 target->photometric_ = photometric_; | |
231 | |
232 return target.release(); | |
233 } | |
216 | 234 |
217 bool DicomImageInformation::ExtractPixelFormat(PixelFormat& format, | 235 bool DicomImageInformation::ExtractPixelFormat(PixelFormat& format, |
218 bool ignorePhotometricInterpretation) const | 236 bool ignorePhotometricInterpretation) const |
219 { | 237 { |
220 if (photometric_ == PhotometricInterpretation_Palette) | 238 if (photometric_ == PhotometricInterpretation_Palette) |