comparison Framework/Volumes/ImageBuffer3D.cpp @ 105:e0ddd8cad909 wasm

cleaning
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 01 Jun 2017 12:33:24 +0200
parents 4a541cd4fa83
children 53025eecbc95
comparison
equal deleted inserted replaced
104:eccd64f8e297 105:e0ddd8cad909
20 20
21 21
22 #include "ImageBuffer3D.h" 22 #include "ImageBuffer3D.h"
23 23
24 #include "../../Resources/Orthanc/Core/Images/ImageProcessing.h" 24 #include "../../Resources/Orthanc/Core/Images/ImageProcessing.h"
25 #include "../../Resources/Orthanc/Core/Logging.h"
25 #include "../../Resources/Orthanc/Core/OrthancException.h" 26 #include "../../Resources/Orthanc/Core/OrthancException.h"
26 27
27 #include <string.h> 28 #include <string.h>
28 29
29 namespace OrthancStone 30 namespace OrthancStone
117 width_(width), 118 width_(width),
118 height_(height), 119 height_(height),
119 depth_(depth) 120 depth_(depth)
120 { 121 {
121 GeometryToolbox::AssignVector(voxelDimensions_, 1, 1, 1); 122 GeometryToolbox::AssignVector(voxelDimensions_, 1, 1, 1);
123
124 LOG(INFO) << "Created an image of "
125 << (GetEstimatedMemorySize() / (1024ll * 1024ll)) << "MB";
122 } 126 }
123 127
124 128
125 void ImageBuffer3D::Clear() 129 void ImageBuffer3D::Clear()
126 { 130 {
253 257
254 return result.release(); 258 return result.release();
255 } 259 }
256 260
257 261
262 uint64_t ImageBuffer3D::GetEstimatedMemorySize() const
263 {
264 return image_.GetPitch() * image_.GetHeight() * Orthanc::GetBytesPerPixel(format_);
265 }
266
267
258 ImageBuffer3D::SliceReader::SliceReader(ImageBuffer3D& that, 268 ImageBuffer3D::SliceReader::SliceReader(ImageBuffer3D& that,
259 VolumeProjection projection, 269 VolumeProjection projection,
260 unsigned int slice) 270 unsigned int slice)
261 { 271 {
262 switch (projection) 272 switch (projection)