comparison Framework/Deprecated/Loaders/OrthancMultiframeVolumeLoader.h @ 1279:7ec8fea061b9 broker

integration mainline->broker
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 04 Feb 2020 15:20:08 +0100
parents Framework/Loaders/OrthancMultiframeVolumeLoader.h@2d8ab34c8c91 Framework/Loaders/OrthancMultiframeVolumeLoader.h@0ca50d275b9a
children 83af7e562b45
comparison
equal deleted inserted replaced
1271:0ca50d275b9a 1279:7ec8fea061b9
40 40
41 boost::shared_ptr<OrthancStone::DicomVolumeImage> volume_; 41 boost::shared_ptr<OrthancStone::DicomVolumeImage> volume_;
42 std::string instanceId_; 42 std::string instanceId_;
43 std::string transferSyntaxUid_; 43 std::string transferSyntaxUid_;
44 bool pixelDataLoaded_; 44 bool pixelDataLoaded_;
45 float outliersHalfRejectionRate_;
46 float distributionRawMin_;
47 float distributionRawMax_;
48 float computedDistributionMin_;
49 float computedDistributionMax_;
45 50
46 const std::string& GetInstanceId() const; 51 const std::string& GetInstanceId() const;
47 52
48 void ScheduleFrameDownloads(); 53 void ScheduleFrameDownloads();
49 54
50 void SetTransferSyntax(const std::string& transferSyntax); 55 void SetTransferSyntax(const std::string& transferSyntax);
51 56
52 void SetGeometry(const Orthanc::DicomMap& dicom); 57 void SetGeometry(const Orthanc::DicomMap& dicom);
53 58
59
60 /**
61 This method will :
62
63 - copy the pixel values from the response to the volume image
64 - compute the maximum and minimum value while discarding the
65 outliersHalfRejectionRate_ fraction of the outliers from both the start
66 and the end of the distribution.
67
68 In English, this means that, if the volume dataset contains a few extreme
69 values very different from the rest (outliers) that we want to get rid of,
70 this method allows to do so.
71
72 If you supply 0.005, for instance, it means 1% of the extreme values will
73 be rejected (0.5% on each side of the distribution)
74 */
54 template <typename T> 75 template <typename T>
55 void CopyPixelData(const std::string& pixelData); 76 void CopyPixelDataAndComputeMinMax(const std::string& pixelData);
77
78 /** Service method for CopyPixelDataAndComputeMinMax*/
79 template <typename T>
80 void CopyPixelDataAndComputeDistribution(
81 const std::string& pixelData,
82 std::map<T, uint64_t>& distribution);
83
84 /** Service method for CopyPixelDataAndComputeMinMax*/
85 template <typename T>
86 void ComputeMinMaxWithOutlierRejection(
87 const std::map<T, uint64_t>& distribution);
56 88
57 void SetUncompressedPixelData(const std::string& pixelData); 89 void SetUncompressedPixelData(const std::string& pixelData);
58 90
59 bool HasGeometry() const; 91 bool HasGeometry() const;
60 const OrthancStone::VolumeImageGeometry& GetImageGeometry() const; 92 const OrthancStone::VolumeImageGeometry& GetImageGeometry() const;
61 93
62 public: 94 public:
63 OrthancMultiframeVolumeLoader(boost::shared_ptr<OrthancStone::DicomVolumeImage> volume, 95 OrthancMultiframeVolumeLoader(boost::shared_ptr<OrthancStone::DicomVolumeImage> volume,
64 OrthancStone::IOracle& oracle, 96 OrthancStone::IOracle& oracle,
65 OrthancStone::IObservable& oracleObservable); 97 OrthancStone::IObservable& oracleObservable,
98 float outliersHalfRejectionRate = 0.0005);
66 99
67 virtual ~OrthancMultiframeVolumeLoader(); 100 virtual ~OrthancMultiframeVolumeLoader();
68 101
69 bool IsPixelDataLoaded() const 102 bool IsPixelDataLoaded() const
70 { 103 {
71 return pixelDataLoaded_; 104 return pixelDataLoaded_;
72 } 105 }
73 106
107 void GetDistributionMinMax
108 (float& minValue, float& maxValue) const;
109
110 void GetDistributionMinMaxWithOutliersRejection
111 (float& minValue, float& maxValue) const;
112
74 void LoadInstance(const std::string& instanceId); 113 void LoadInstance(const std::string& instanceId);
75 }; 114 };
76 } 115 }