comparison Framework/Inputs/DicomPyramid.cpp @ 330:c42083d50ddf

Added support for DICOM tag "Recommended Absent Pixel CIELab" (0048,0015)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 18 Oct 2024 13:08:55 +0200
parents 0683312e21ba
children
comparison
equal deleted inserted replaced
329:ae2d769215d2 330:c42083d50ddf
101 // Don't consider the thumbnail and overview as part of the DICOM pyramid (new in 1.0) 101 // Don't consider the thumbnail and overview as part of the DICOM pyramid (new in 1.0)
102 if (tokens.size() < 2 || 102 if (tokens.size() < 2 ||
103 (tokens[1] != "THUMBNAIL" && 103 (tokens[1] != "THUMBNAIL" &&
104 tokens[1] != "OVERVIEW")) 104 tokens[1] != "OVERVIEW"))
105 { 105 {
106 if (instance->HasBackgroundColor())
107 {
108 backgroundRed_ = instance->GetBackgroundRed();
109 backgroundGreen_ = instance->GetBackgroundGreen();
110 backgroundBlue_ = instance->GetBackgroundBlue();
111 }
112
106 instances_.push_back(instance.release()); 113 instances_.push_back(instance.release());
107 } 114 }
108 } 115 }
109 catch (Orthanc::OrthancException&) 116 catch (Orthanc::OrthancException&)
110 { 117 {
111 LOG(ERROR) << "Skipping a DICOM instance that is not part of a whole-slide image: " << instanceId; 118 LOG(ERROR) << "Skipping a DICOM instance that is not part of a whole-slide image: " << instanceId;
112 } 119 }
155 162
156 DicomPyramid::DicomPyramid(OrthancStone::IOrthancConnection& orthanc, 163 DicomPyramid::DicomPyramid(OrthancStone::IOrthancConnection& orthanc,
157 const std::string& seriesId, 164 const std::string& seriesId,
158 bool useCache) : 165 bool useCache) :
159 orthanc_(orthanc), 166 orthanc_(orthanc),
160 seriesId_(seriesId) 167 seriesId_(seriesId),
168 backgroundRed_(255),
169 backgroundGreen_(255),
170 backgroundBlue_(255)
161 { 171 {
162 RegisterInstances(seriesId, useCache); 172 RegisterInstances(seriesId, useCache);
163 173
164 // Sort the instances of the pyramid by decreasing total widths 174 // Sort the instances of the pyramid by decreasing total widths
165 std::sort(instances_.begin(), instances_.end(), Comparator()); 175 std::sort(instances_.begin(), instances_.end(), Comparator());