comparison Framework/Scene2D/FloatTextureSceneLayer.cpp @ 1287:8e82fdc6200e bugs/2020-02-invisible-slice

Heavy (temporary) logging in the path that leads from multiframe volume to slice (rendered texture)
author Benjamin Golinvaux <bgo@osimis.io>
date Fri, 14 Feb 2020 15:00:54 +0100
parents 2d8ab34c8c91
children 343aa1dfaa90
comparison
equal deleted inserted replaced
1286:ddb6676bbcbf 1287:8e82fdc6200e
19 **/ 19 **/
20 20
21 21
22 #include "FloatTextureSceneLayer.h" 22 #include "FloatTextureSceneLayer.h"
23 23
24 #include "../Toolbox/ImageToolbox.h"
25
24 #include <Core/Images/Image.h> 26 #include <Core/Images/Image.h>
25 #include <Core/Images/ImageProcessing.h> 27 #include <Core/Images/ImageProcessing.h>
26 #include <Core/OrthancException.h> 28 #include <Core/OrthancException.h>
27 29
28 namespace OrthancStone 30 namespace OrthancStone
36 texture.GetWidth(), 38 texture.GetWidth(),
37 texture.GetHeight(), 39 texture.GetHeight(),
38 false)); 40 false));
39 41
40 Orthanc::ImageProcessing::Convert(*t, texture); 42 Orthanc::ImageProcessing::Convert(*t, texture);
43
44 if (OrthancStone_Internals_dump_LoadTexture_histogram == 1)
45 {
46 LOG(ERROR) << "+----------------------------------------+";
47 LOG(ERROR) << "| This is not an error! |";
48 LOG(ERROR) << "+----------------------------------------+";
49 LOG(ERROR) << "Work on the \"invisible slice\" bug";
50 LOG(ERROR) << "in FloatTextureSceneLayer::FloatTextureSceneLayer";
51 LOG(ERROR) << "will dump \"t\" after \"Orthanc::ImageProcessing::Convert(*t, texture);\"";
52
53 HistogramData hd;
54 double minValue = 0;
55 double maxValue = 0;
56 ComputeMinMax(*t, minValue, maxValue);
57 double binSize = (maxValue - minValue) * 0.01;
58 ComputeHistogram(*t, hd, binSize);
59 std::string s;
60 DumpHistogramResult(s, hd);
61 LOG(ERROR) << s;
62 LOG(ERROR) << "+----------------------------------------+";
63 LOG(ERROR) << "| end of debug dump |";
64 LOG(ERROR) << "+----------------------------------------+";
65 }
66
41 SetTexture(t.release()); 67 SetTexture(t.release());
42 } 68 }
43 69
44 SetCustomWindowing(128, 256); 70 SetCustomWindowing(128, 256);
45 } 71 }