]> Creatis software - bbtk.git/blobdiff - packages/vtk/src/bbvtkImagePlanes.cxx
.
[bbtk.git] / packages / vtk / src / bbvtkImagePlanes.cxx
index f716663b9cb34c1076cdbfc707ad8171043410d2..e838e03ed8b47f61a8c6e23ef033793a78fff904 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbvtkImagePlanes.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/04/30 14:31:33 $
-  Version:   $Revision: 1.23 $
+  Date:      $Date: 2009/06/09 08:41:53 $
+  Version:   $Revision: 1.26 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -133,14 +133,16 @@ namespace bbvtk
  };
   //================================================================
 
-  //vtkCxxRevisionMacro(ImagePlanes::VtkCallbackType, "$Revision: 1.23 $");
+  //vtkCxxRevisionMacro(ImagePlanes::VtkCallbackType, "$Revision: 1.26 $");
 
   //================================================================
 
    BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,ImagePlanes)
    BBTK_BLACK_BOX_IMPLEMENTATION(ImagePlanes,bbtk::AtomicBlackBox);
 
-   void ImagePlanes::bbUserConstructor() 
+       
+       
+   void ImagePlanes::bbUserSetDefaultValues() 
    { 
      bbSetOutputPlaneX(0);
      bbSetOutputPlaneY(0);
@@ -156,18 +158,9 @@ namespace bbvtk
      mVtkCallback = 0;
    }
    
-   void ImagePlanes::bbUserCopyConstructor(bbtk::BlackBox::Pointer) 
-   { 
-     bbSetOutputPlaneX(0);
-     bbSetOutputPlaneY(0);
-     bbSetOutputPlaneZ(0);
-     bbSetOutputImageX(0);
-     bbSetOutputImageY(0);
-     bbSetOutputImageZ(0);
-     mVtkCallback = 0;
-   }
 
-   void ImagePlanes::Init() 
+       
+   void ImagePlanes::bbUserInitializeProcessing() 
    {  
 
      /// CREATION DES WIDGETS
@@ -219,30 +212,30 @@ namespace bbvtk
    }
 
 //---------------------------------------------------------------------
-  void ImagePlanes::bbUserDestructor()
+  void ImagePlanes::bbUserFinalizeProcessing()
   {
+           
     if (bbGetOutputPlaneX()) 
       {
-       bbGetOutputPlaneX()->SetInput(NULL);
-       //      if (mVtkCallback) bbGetOutputPlaneX()->RemoveObserver(mVtkCallback);
+
+       /*
+
+         bbGetOutputPlaneX()->RemoveObserver(mVtkCallback);
+         bbGetOutputPlaneY()->RemoveObserver(mVtkCallback);
+         bbGetOutputPlaneZ()->RemoveObserver(mVtkCallback);
+       
+       
        bbGetOutputPlaneX()->Delete();
-      }
-    if (bbGetOutputPlaneY()) 
-      {
-       bbGetOutputPlaneY()->SetInput(NULL);
-       //      if (mVtkCallback) bbGetOutputPlaneY()->RemoveObserver(mVtkCallback);
        bbGetOutputPlaneY()->Delete();
-      }
-    if (bbGetOutputPlaneZ()) 
-      {
-       bbGetOutputPlaneZ()->SetInput(NULL);
-       //      if (mVtkCallback) bbGetOutputPlaneZ()->RemoveObserver(mVtkCallback);
        bbGetOutputPlaneZ()->Delete();
+       mVtkCallback->Delete();
+       */
+       //bbGetOutputPlaneX()->SetInput(NULL);
+       //bbGetOutputPlaneY()->SetInput(NULL);
+       //bbGetOutputPlaneZ()->SetInput(NULL);
+       
       }
-    if (mVtkCallback) 
-      {
-       //      mVtkCallback->Delete();
-      }
+    
   }
   
 //---------------------------------------------------------------------  
@@ -250,8 +243,6 @@ namespace bbvtk
    {
      if (bbGetInputIn()!=0)
        {
-        // Create the widgets if not already done
-        Init();
 
         if ( bbGetInputStatus("In") != bbtk::UPTODATE )
           {
@@ -268,7 +259,13 @@ namespace bbvtk
             bbGetOutputPlaneX()->SetInput(bbGetInputIn());
             bbGetOutputPlaneX()->SetPlaneOrientationToXAxes();  
             bbGetOutputPlaneX()->SetSlicePosition((xMax+xMin)/2.*xSpacing);
-            
+
+                  
+//                bbGetOutputPlaneX()->SetOrigin( 58*xSpacing , 80*ySpacing , 82*zSpacing );
+//                bbGetOutputPlaneX()->SetPoint1( 0*xSpacing, 146*ySpacing, 186*zSpacing);
+//                bbGetOutputPlaneX()->SetPoint2( 126*xSpacing, 146*ySpacing, 0*zSpacing);
+                  
+                  
             bbGetOutputPlaneY()->SetInput(bbGetInputIn());
             bbGetOutputPlaneY()->SetPlaneOrientationToYAxes();
             bbGetOutputPlaneY()->SetSlicePosition((yMax+yMin)/2.*ySpacing);
@@ -296,6 +293,25 @@ namespace bbvtk
         bbGetOutputPlaneZ()->GetResliceOutput()->Update();              
        }
    }
+       
+       
+       //-----------------------------------------------------------------     
+       void vtkImageDataPointerRelay::bbUserSetDefaultValues()
+       {
+       }
+       
+       //-----------------------------------------------------------------     
+       void vtkImageDataPointerRelay::bbUserInitializeProcessing()
+       {
+       }
+       
+       //-----------------------------------------------------------------     
+       void vtkImageDataPointerRelay::bbUserFinalizeProcessing()
+       {
+       }
+       
+       
+       
 }//namespace bbtk
 
 #endif // _USE_VTK_