Mercurial > hg > orthanc-stone
changeset 649:f1bfe3d1759f
Moved RadiographyDicomLayer::SetDicomFrameConverter to cpp file to prevent
using an auto_ptr with an incomplete type (because of Microsoft implementation?)
because that might lead to the dtor not being called.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 14 May 2019 09:46:41 +0200 |
parents | b4fe9642e83b |
children | 200f7e1d57d1 |
files | Framework/Radiography/RadiographyDicomLayer.cpp Framework/Radiography/RadiographyDicomLayer.h |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyDicomLayer.cpp Mon May 13 15:22:08 2019 +0200 +++ b/Framework/Radiography/RadiographyDicomLayer.cpp Tue May 14 09:46:41 2019 +0200 @@ -106,6 +106,12 @@ BroadcastMessage(RadiographyLayer::LayerEditedMessage(*this)); } + + void RadiographyDicomLayer::SetDicomFrameConverter(DicomFrameConverter* converter) + { + converter_.reset(converter); + } + void RadiographyDicomLayer::Render(Orthanc::ImageAccessor& buffer, const AffineTransform2D& viewTransform, ImageInterpolation interpolation) const
--- a/Framework/Radiography/RadiographyDicomLayer.h Mon May 13 15:22:08 2019 +0200 +++ b/Framework/Radiography/RadiographyDicomLayer.h Tue May 14 09:46:41 2019 +0200 @@ -69,7 +69,9 @@ const Orthanc::ImageAccessor* GetSourceImage() const {return source_.get();} // currently need this access to serialize scene in plain old data to send to a WASM worker const DicomFrameConverter& GetDicomFrameConverter() const {return *converter_;} // currently need this access to serialize scene in plain old data to send to a WASM worker - void SetDicomFrameConverter(DicomFrameConverter* converter) {converter_.reset(converter);} // Takes ownership + + // Takes ownership + void SetDicomFrameConverter(DicomFrameConverter* converter); virtual void Render(Orthanc::ImageAccessor& buffer, const AffineTransform2D& viewTransform,