Mercurial > hg > orthanc-stone
diff Framework/Loaders/DicomStructureSetLoader.h @ 937:86ac61a040c9
Added getters and notifications to allow clients of the loaders (DicomStructureSetLoader, OrthancSeriesVolumeProgressiveLoader and OrthancMultiframeVolumeLoader) to know when the loading is finished + added ability for SDL event loop to execute a callback repeatedly (used to check the view loading state)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 31 Jul 2019 10:24:09 +0200 |
parents | 401808e7ff2e |
children | 50e5acf5553b |
line wrap: on
line diff
--- a/Framework/Loaders/DicomStructureSetLoader.h Mon Jul 29 15:39:45 2019 +0200 +++ b/Framework/Loaders/DicomStructureSetLoader.h Wed Jul 31 10:24:09 2019 +0200 @@ -29,7 +29,8 @@ { class DicomStructureSetLoader : public LoaderStateMachine, - public IVolumeSlicer + public IVolumeSlicer, + public IObservable { private: class Slice; @@ -44,8 +45,13 @@ std::string instanceId_; unsigned int countProcessedInstances_; unsigned int countReferencedInstances_; + + // will be set to true once the loading is finished + bool structuresReady_; public: + ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, StructuresReady, DicomStructureSetLoader); + DicomStructureSetLoader(IOracle& oracle, IObservable& oracleObservable); @@ -54,5 +60,9 @@ void LoadInstance(const std::string& instanceId); virtual IExtractedSlice* ExtractSlice(const CoordinateSystem3D& cuttingPlane); + + void SetStructuresReady(); + + bool AreStructuresReady() const; }; }