diff Framework/Layers/DicomStructureSetSlicer.cpp @ 404:ba4ace20454e

use of MessageBroker in DicomStructureSetSlicer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 11 Nov 2018 13:02:38 +0100
parents f1c769b3a5c2
children b70e9be013e4
line wrap: on
line diff
--- a/Framework/Layers/DicomStructureSetSlicer.cpp	Sun Nov 11 12:13:31 2018 +0100
+++ b/Framework/Layers/DicomStructureSetSlicer.cpp	Sun Nov 11 13:02:38 2018 +0100
@@ -147,6 +147,18 @@
   };
   
 
+  DicomStructureSetSlicer::DicomStructureSetSlicer(MessageBroker& broker,
+                                                   StructureSetLoader& loader) :
+    IVolumeSlicer(broker),
+    IObserver(broker),
+    loader_(loader)
+  {
+    loader_.RegisterObserverCallback(
+      new Callable<DicomStructureSetSlicer, StructureSetLoader::ContentChangedMessage>
+      (*this, &DicomStructureSetSlicer::OnStructureSetLoaded));
+  }
+
+
   void DicomStructureSetSlicer::ScheduleLayerCreation(const CoordinateSystem3D& viewportPlane)
   {
     if (loader_.HasStructureSet())