Mercurial > hg > orthanc-stone
comparison Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h @ 1417:afdd5be8731c loader-injection-feature
when CT slices are loaded, it is now possible to act on this by implementing the ISlicePostProcessor interface and inject it in the loader.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 11 May 2020 17:38:29 +0200 |
parents | f4a06ad1580b |
children | 60e30d73e2aa |
comparison
equal
deleted
inserted
replaced
1416:d959bc8f6c1b | 1417:afdd5be8731c |
---|---|
55 static const unsigned int QUALITY_00 = 0; | 55 static const unsigned int QUALITY_00 = 0; |
56 static const unsigned int QUALITY_01 = 1; | 56 static const unsigned int QUALITY_01 = 1; |
57 static const unsigned int QUALITY_02 = 2; | 57 static const unsigned int QUALITY_02 = 2; |
58 | 58 |
59 class ExtractedSlice; | 59 class ExtractedSlice; |
60 | |
61 class ISlicePostProcessor | |
62 { | |
63 public: | |
64 virtual void ProcessCTDicomSlice(const Orthanc::DicomMap& dicom) = 0; | |
65 }; | |
60 | 66 |
61 /** Helper class internal to OrthancSeriesVolumeProgressiveLoader */ | 67 /** Helper class internal to OrthancSeriesVolumeProgressiveLoader */ |
62 class SeriesGeometry : public boost::noncopyable | 68 class SeriesGeometry : public boost::noncopyable |
63 { | 69 { |
64 private: | 70 private: |
119 std::unique_ptr<OrthancStone::IFetchingStrategy> strategy_; | 125 std::unique_ptr<OrthancStone::IFetchingStrategy> strategy_; |
120 | 126 |
121 std::vector<unsigned int> slicesQuality_; | 127 std::vector<unsigned int> slicesQuality_; |
122 bool volumeImageReadyInHighQuality_; | 128 bool volumeImageReadyInHighQuality_; |
123 | 129 |
130 boost::shared_ptr<ISlicePostProcessor> slicePostProcessor_; | |
131 | |
124 OrthancSeriesVolumeProgressiveLoader( | 132 OrthancSeriesVolumeProgressiveLoader( |
125 OrthancStone::ILoadersContext& loadersContext, | 133 OrthancStone::ILoadersContext& loadersContext, |
126 boost::shared_ptr<OrthancStone::DicomVolumeImage> volume, | 134 boost::shared_ptr<OrthancStone::DicomVolumeImage> volume, |
127 bool progressiveQuality); | 135 bool progressiveQuality); |
128 | 136 |
138 bool progressiveQuality = false); | 146 bool progressiveQuality = false); |
139 | 147 |
140 virtual ~OrthancSeriesVolumeProgressiveLoader(); | 148 virtual ~OrthancSeriesVolumeProgressiveLoader(); |
141 | 149 |
142 void SetSimultaneousDownloads(unsigned int count); | 150 void SetSimultaneousDownloads(unsigned int count); |
151 | |
152 void SetDicomSlicePostProcessor(boost::shared_ptr<ISlicePostProcessor> slicePostProcessor) | |
153 { | |
154 // this will delete the previously stored slice processor, if any | |
155 slicePostProcessor_ = slicePostProcessor; | |
156 } | |
143 | 157 |
144 bool IsVolumeImageReadyInHighQuality() const | 158 bool IsVolumeImageReadyInHighQuality() const |
145 { | 159 { |
146 return volumeImageReadyInHighQuality_; | 160 return volumeImageReadyInHighQuality_; |
147 } | 161 } |