comparison OrthancStone/Sources/Loaders/OrthancMultiframeVolumeLoader.h @ 1757:28979b77ce90

Suppressed one pass on the dose distribution computation
author bgo@SHARKNADO.localdomain
date Mon, 26 Apr 2021 17:37:54 +0200
parents 9ac2a65d4172
children 3889ae96d2e9
comparison
equal deleted inserted replaced
1755:1a775f4ee672 1757:28979b77ce90
39 class LoadRTDoseGeometry; 39 class LoadRTDoseGeometry;
40 class LoadGeometry; 40 class LoadGeometry;
41 class LoadTransferSyntax; 41 class LoadTransferSyntax;
42 class LoadUncompressedPixelData; 42 class LoadUncompressedPixelData;
43 43
44 struct PixelCount
45 {
46 uint64_t count_;
47 PixelCount() { count_ = 0; }
48 };
49
44 boost::shared_ptr<DicomVolumeImage> volume_; 50 boost::shared_ptr<DicomVolumeImage> volume_;
45 std::string instanceId_; 51 std::string instanceId_;
46 std::string transferSyntaxUid_; 52 std::string transferSyntaxUid_;
47 bool pixelDataLoaded_; 53 bool pixelDataLoaded_;
48 float outliersHalfRejectionRate_; 54 float outliersHalfRejectionRate_;
79 void CopyPixelDataAndComputeMinMax(const std::string& pixelData); 85 void CopyPixelDataAndComputeMinMax(const std::string& pixelData);
80 86
81 /** Service method for CopyPixelDataAndComputeMinMax*/ 87 /** Service method for CopyPixelDataAndComputeMinMax*/
82 template <typename T> 88 template <typename T>
83 void CopyPixelDataAndComputeDistribution(const std::string& pixelData, 89 void CopyPixelDataAndComputeDistribution(const std::string& pixelData,
84 std::map<T, uint64_t>& distribution); 90 std::map<T, PixelCount>& distribution);
85 91
86 /** Service method for CopyPixelDataAndComputeMinMax*/ 92 /** Service method for CopyPixelDataAndComputeMinMax*/
87 template <typename T> 93 template <typename T>
88 void ComputeMinMaxWithOutlierRejection(const std::map<T, uint64_t>& distribution); 94 void ComputeMinMaxWithOutlierRejection(const std::map<T, PixelCount>& distribution);
89 95
90 void SetUncompressedPixelData(const std::string& pixelData); 96 void SetUncompressedPixelData(const std::string& pixelData);
91 97
92 protected: 98 protected:
93 OrthancMultiframeVolumeLoader(ILoadersContext& loadersContext, 99 OrthancMultiframeVolumeLoader(ILoadersContext& loadersContext,