comparison 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
comparison
equal deleted inserted replaced
875:200b4e0dddfc 876:580dd82e13f5
58 unsigned int GetFrame() const 58 unsigned int GetFrame() const
59 { 59 {
60 return frame_; 60 return frame_;
61 } 61 }
62 62
63 virtual size_t GetApproximateMemoryUsage() const
64 {
65 size_t size = 0;
66 if (source_.get() != NULL)
67 {
68 size += source_->GetPitch() * source_->GetHeight();
69 }
70 if (converted_.get() != NULL)
71 {
72 size += converted_->GetPitch() * converted_->GetHeight();
73 }
74
75 return size;
76 }
77
78
63 void SetDicomTags(const OrthancPlugins::FullOrthancDataset& dataset); 79 void SetDicomTags(const OrthancPlugins::FullOrthancDataset& dataset);
64 80
65 void SetSourceImage(Orthanc::ImageAccessor* image); // Takes ownership 81 void SetSourceImage(Orthanc::ImageAccessor* image); // Takes ownership
66 82
67 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 83 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