Mercurial > hg > orthanc
diff 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 |
line wrap: on
line diff
--- a/Core/DicomFormat/DicomImageInformation.cpp Mon Oct 08 17:20:44 2018 +0200 +++ b/Core/DicomFormat/DicomImageInformation.cpp Mon Oct 08 17:36:54 2018 +0200 @@ -45,6 +45,7 @@ #include <limits> #include <cassert> #include <stdio.h> +#include <memory> namespace Orthanc { @@ -213,6 +214,23 @@ isSigned_ = (pixelRepresentation != 0 ? true : false); } + DicomImageInformation* DicomImageInformation::Clone() const + { + std::auto_ptr<DicomImageInformation> target(new DicomImageInformation); + target->width_ = width_; + target->height_ = height_; + target->samplesPerPixel_ = samplesPerPixel_; + target->numberOfFrames_ = numberOfFrames_; + target->isPlanar_ = isPlanar_; + target->isSigned_ = isSigned_; + target->bytesPerValue_ = bytesPerValue_; + target->bitsAllocated_ = bitsAllocated_; + target->bitsStored_ = bitsStored_; + target->highBit_ = highBit_; + target->photometric_ = photometric_; + + return target.release(); + } bool DicomImageInformation::ExtractPixelFormat(PixelFormat& format, bool ignorePhotometricInterpretation) const