]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.cxx
#2482 creaMaracasVisu Bug New - HighColorLayer refresh missing. The MPR is not...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / vtkBaseData.cxx
index f8df99a5922db2b4fd84c5dd37bbd18334d8a7f2..e34a19e94bde117e3ddf2e0676ef98eba66f79e8 100644 (file)
 
 #include "vtkBaseData.h"
 
+
+
+//-------------------------------------------------------------------
 vtkBaseData::vtkBaseData()
 {
-
-       _z            = 0;
-       _t            = 0;
-       _marImageData = 0;
+       _z              = 0;
+       _t              = 0;
+       _marImageData   = 0;
+       _observable     = vtkObject::New();
 }
 
 //-------------------------------------------------------------------
@@ -39,6 +42,8 @@ vtkBaseData::~vtkBaseData()
 {
 }
 
+
+
 //-------------------------------------------------------------------
 void vtkBaseData::SetMarImageData(marImageData *marimagedata)
 {
@@ -90,7 +95,9 @@ void vtkBaseData::Configure()  // virtual
 }
 
 //-------------------------------------------------------------------
-void vtkBaseData::SetZ(double z){
+void vtkBaseData::SetZ(double z)
+{
+
        //int maxZ;
 
 //     int dim[3];
@@ -128,6 +135,7 @@ void vtkBaseData::SetZ(double z){
                }
 
                _z=z;
+               _observable->InvokeEvent(3);    
        }
 }
 
@@ -182,3 +190,12 @@ double vtkBaseData::GetColorLevel()
        return _colorLevel;
 }
 
+
+//-------------------------------------------------------------------
+void vtkBaseData::AddObserver(int eventNumber, vtkCommand *observer)
+{
+       _observable->AddObserver( eventNumber , observer );
+       //Configure();
+}
+
+