# HG changeset patch # User Benjamin Golinvaux # Date 1589211509 -7200 # Node ID afdd5be8731cee82d202698cc393b9f73f905174 # Parent d959bc8f6c1be367b8403afc5c639642142231d2 when CT slices are loaded, it is now possible to act on this by implementing the ISlicePostProcessor interface and inject it in the loader. diff -r d959bc8f6c1b -r afdd5be8731c Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp --- a/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp Mon May 11 17:37:30 2020 +0200 +++ b/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp Mon May 11 17:38:29 2020 +0200 @@ -362,6 +362,9 @@ // the 3D plane corresponding to the slice OrthancStone::CoordinateSystem3D geometry = instance->GetGeometry(); slices.AddSlice(geometry, instance.release()); + + if (slicePostProcessor_) + slicePostProcessor_->ProcessCTDicomSlice(dicom); } seriesGeometry_.ComputeGeometry(slices); diff -r d959bc8f6c1b -r afdd5be8731c Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h --- a/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h Mon May 11 17:37:30 2020 +0200 +++ b/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h Mon May 11 17:38:29 2020 +0200 @@ -57,6 +57,12 @@ static const unsigned int QUALITY_02 = 2; class ExtractedSlice; + + class ISlicePostProcessor + { + public: + virtual void ProcessCTDicomSlice(const Orthanc::DicomMap& dicom) = 0; + }; /** Helper class internal to OrthancSeriesVolumeProgressiveLoader */ class SeriesGeometry : public boost::noncopyable @@ -121,6 +127,8 @@ std::vector slicesQuality_; bool volumeImageReadyInHighQuality_; + boost::shared_ptr slicePostProcessor_; + OrthancSeriesVolumeProgressiveLoader( OrthancStone::ILoadersContext& loadersContext, boost::shared_ptr volume, @@ -141,6 +149,12 @@ void SetSimultaneousDownloads(unsigned int count); + void SetDicomSlicePostProcessor(boost::shared_ptr slicePostProcessor) + { + // this will delete the previously stored slice processor, if any + slicePostProcessor_ = slicePostProcessor; + } + bool IsVolumeImageReadyInHighQuality() const { return volumeImageReadyInHighQuality_;