Mercurial > hg > orthanc-stone
comparison 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 |
comparison
equal
deleted
inserted
replaced
936:775ebd43bd3b | 937:86ac61a040c9 |
---|---|
27 | 27 |
28 namespace OrthancStone | 28 namespace OrthancStone |
29 { | 29 { |
30 class DicomStructureSetLoader : | 30 class DicomStructureSetLoader : |
31 public LoaderStateMachine, | 31 public LoaderStateMachine, |
32 public IVolumeSlicer | 32 public IVolumeSlicer, |
33 public IObservable | |
33 { | 34 { |
34 private: | 35 private: |
35 class Slice; | 36 class Slice; |
36 | 37 |
37 // States of LoaderStateMachine | 38 // States of LoaderStateMachine |
42 std::auto_ptr<DicomStructureSet> content_; | 43 std::auto_ptr<DicomStructureSet> content_; |
43 uint64_t revision_; | 44 uint64_t revision_; |
44 std::string instanceId_; | 45 std::string instanceId_; |
45 unsigned int countProcessedInstances_; | 46 unsigned int countProcessedInstances_; |
46 unsigned int countReferencedInstances_; | 47 unsigned int countReferencedInstances_; |
48 | |
49 // will be set to true once the loading is finished | |
50 bool structuresReady_; | |
47 | 51 |
48 public: | 52 public: |
53 ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, StructuresReady, DicomStructureSetLoader); | |
54 | |
49 DicomStructureSetLoader(IOracle& oracle, | 55 DicomStructureSetLoader(IOracle& oracle, |
50 IObservable& oracleObservable); | 56 IObservable& oracleObservable); |
51 | 57 |
52 ~DicomStructureSetLoader(); | 58 ~DicomStructureSetLoader(); |
53 | 59 |
54 void LoadInstance(const std::string& instanceId); | 60 void LoadInstance(const std::string& instanceId); |
55 | 61 |
56 virtual IExtractedSlice* ExtractSlice(const CoordinateSystem3D& cuttingPlane); | 62 virtual IExtractedSlice* ExtractSlice(const CoordinateSystem3D& cuttingPlane); |
63 | |
64 void SetStructuresReady(); | |
65 | |
66 bool AreStructuresReady() const; | |
57 }; | 67 }; |
58 } | 68 } |