diff Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h @ 1448:dad6a2fe6fc7 loader-injection-feature

Added setters to control relative priority of CT series loader requests.
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 02 Jun 2020 13:16:40 +0200
parents 687457d4018f
children
line wrap: on
line diff
--- a/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h	Tue Jun 02 12:34:27 2020 +0200
+++ b/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h	Tue Jun 02 13:16:40 2020 +0200
@@ -131,6 +131,12 @@
     
     boost::shared_ptr<ISlicePostProcessor>  slicePostProcessor_;
 
+    /** See priority setters/getters below */
+    int medadataSchedulingPriority_;
+
+    /** See priority setters/getters below */
+    int sliceSchedulingPriority_;
+
     OrthancSeriesVolumeProgressiveLoader(
       OrthancStone::ILoadersContext& loadersContext,
       boost::shared_ptr<OrthancStone::DicomVolumeImage> volume,
@@ -151,6 +157,28 @@
 
     void SetSimultaneousDownloads(unsigned int count);
 
+    /**
+      Sets the relative priority of the requests for metadata.
+      - if p < PRIORITY_HIGH (-1)                 , the requests will be high priority
+      - if PRIORITY_LOW (100) > p > PRIORITY_HIGH , the requests will be medium priority
+      - if p > PRIORITY_LOW                       , the requests will be low priority
+
+      Default is 0 (medium)
+    */
+    void  SetMetadataSchedulingPriority(int p);
+
+    /** @see SetMetadataSchedulingPriority */
+    int   GetMetadataSchedulingPriority() const;
+
+    /** Same as SetMetadataSchedulingPriority, for slices. Default is 0. */
+    void  SetSliceSchedulingPriority(int p);
+    
+    /** @see SetSliceSchedulingPriority */
+    int   GetSliceSchedulingPriority() const;
+
+    /** Sets priorities for all requests. @see SetMetadataSchedulingPriority */
+    void  SetSchedulingPriority(int p);
+
     void SetDicomSlicePostProcessor(boost::shared_ptr<ISlicePostProcessor> slicePostProcessor)
     {
       // this will delete the previously stored slice processor, if any