comparison Framework/Volumes/DicomVolumeImageMPRSlicer.cpp @ 1289:343aa1dfaa90 bugs/2020-02-invisible-slice

Ongoing work on invisible slice bug (logging + removed unused function)
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 19 Feb 2020 17:05:08 +0100
parents 8e82fdc6200e
children 7def6ab2929f
comparison
equal deleted inserted replaced
1288:d8c42e5e5843 1289:343aa1dfaa90
75 { 75 {
76 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer, 76 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer,
77 "A style configurator is mandatory for textures"); 77 "A style configurator is mandatory for textures");
78 } 78 }
79 79
80 LOG(INFO) << "DicomVolumeImageMPRSlicer::Slice::CreateSceneLayer(). volume_ address is " << (void*)(&volume_) << " and its SOPInstanceUID is " << volume_.GetDicomParameters().GetSopInstanceUid();
81
80 std::auto_ptr<TextureBaseSceneLayer> texture; 82 std::auto_ptr<TextureBaseSceneLayer> texture;
81 83
82 { 84 {
83 const DicomInstanceParameters& parameters = volume_.GetDicomParameters(); 85 const DicomInstanceParameters& parameters = volume_.GetDicomParameters();
84 ImageBuffer3D::SliceReader reader(volume_.GetPixelData(), projection_, sliceIndex_); 86 ImageBuffer3D::SliceReader reader(volume_.GetPixelData(), projection_, sliceIndex_);
85 87
86 if (OrthancStone_Internals_dump_LoadTexture_histogram == 1) 88 if (OrthancStone_Internals_dump_LoadTexture_histogram == 1)
87 { 89 {
88 LOG(ERROR) << "+----------------------------------------+"; 90 LOG(INFO) << "+----------------------------------------+";
89 LOG(ERROR) << "| This is not an error! |"; 91 LOG(INFO) << "| This is not an error! |";
90 LOG(ERROR) << "+----------------------------------------+"; 92 LOG(INFO) << "+----------------------------------------+";
91 LOG(ERROR) << "Work on the \"invisible slice\" bug"; 93 LOG(INFO) << "Work on the \"invisible slice\" bug";
92 LOG(ERROR) << "InvisibleSlice -- about to dump histogram (100 buckets) for volume_ " 94 LOG(INFO) << "DicomVolumeImageMPRSlicer::Slice::CreateSceneLayer";
95 LOG(INFO) << "InvisibleSlice -- about to dump histogram (100 buckets) for volume_ "
93 << "with OrthancId: " << parameters.GetOrthancInstanceIdentifier() 96 << "with OrthancId: " << parameters.GetOrthancInstanceIdentifier()
94 << " and SopInstanceUid: " << parameters.GetSopInstanceUid() 97 << " and SopInstanceUid: " << parameters.GetSopInstanceUid()
95 << " for projection_ (AxiCorSag): projection_ " 98 << " for projection_ (AxiCorSag): projection_ "
96 << " and slice: " << sliceIndex_; 99 << " and slice: " << sliceIndex_;
97 100
101 ComputeMinMax(reader.GetAccessor(), minValue, maxValue); 104 ComputeMinMax(reader.GetAccessor(), minValue, maxValue);
102 double binSize = (maxValue - minValue) * 0.01; 105 double binSize = (maxValue - minValue) * 0.01;
103 ComputeHistogram(reader.GetAccessor(), hd, binSize); 106 ComputeHistogram(reader.GetAccessor(), hd, binSize);
104 std::string s; 107 std::string s;
105 DumpHistogramResult(s, hd); 108 DumpHistogramResult(s, hd);
106 LOG(ERROR) << s; 109 LOG(INFO) << s;
107 LOG(ERROR) << "+----------------------------------------+"; 110 LOG(INFO) << "+----------------------------------------+";
108 LOG(ERROR) << "| end of debug dump |"; 111 LOG(INFO) << "| end of debug dump |";
109 LOG(ERROR) << "+----------------------------------------+"; 112 LOG(INFO) << "+----------------------------------------+";
110 } 113 }
111 114
112 texture.reset(dynamic_cast<TextureBaseSceneLayer*> 115 texture.reset(dynamic_cast<TextureBaseSceneLayer*>
113 (configurator->CreateTextureFromDicom(reader.GetAccessor(), parameters))); 116 (configurator->CreateTextureFromDicom(reader.GetAccessor(), parameters)));
114 117