Mercurial > hg > orthanc-stone
diff Framework/Radiography/RadiographyDicomLayer.h @ 876:580dd82e13f5 am-dev
added GetApproximateMemoryUsage
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 03 Jul 2019 10:15:29 +0200 |
parents | c35e98d22764 |
children | b537002f83a9 35e798b16b65 |
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyDicomLayer.h Wed Jul 03 10:12:09 2019 +0200 +++ b/Framework/Radiography/RadiographyDicomLayer.h Wed Jul 03 10:15:29 2019 +0200 @@ -60,6 +60,22 @@ return frame_; } + virtual size_t GetApproximateMemoryUsage() const + { + size_t size = 0; + if (source_.get() != NULL) + { + size += source_->GetPitch() * source_->GetHeight(); + } + if (converted_.get() != NULL) + { + size += converted_->GetPitch() * converted_->GetHeight(); + } + + return size; + } + + void SetDicomTags(const OrthancPlugins::FullOrthancDataset& dataset); void SetSourceImage(Orthanc::ImageAccessor* image); // Takes ownership