]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Visualization/MPRObjects.cxx
Getting ready for interactive initialization.
[cpPlugins.git] / lib / cpExtensions / Visualization / MPRObjects.cxx
index cfee04e58f8f794f1bf45e42306133d2038187c0..a0c1f3eb64ace2ef98f0a279faa828ed1c1201f7 100644 (file)
@@ -65,7 +65,14 @@ AddImage( vtkImageData* image )
     this->ResetCameras( );
 
   } // fi
-  this->RenderAll( );
+  this->RenderAll( 1e-3 );
+}
+
+// -------------------------------------------------------------------------
+unsigned int cpExtensions::Visualization::MPRObjects::
+GetNumberOfImages( ) const
+{
+  return( this->m_MPRActors->GetNumberOfImages( ) );
 }
 
 // -------------------------------------------------------------------------
@@ -79,7 +86,7 @@ ClearAll( )
     this->m_Windows[ 3 ]
     );
   this->ResetCameras( );
-  this->RenderAll( );
+  this->RenderAll( 1e-3 );
 }
 
 // -------------------------------------------------------------------------
@@ -102,20 +109,36 @@ ResetCameras( )
 
 // -------------------------------------------------------------------------
 void cpExtensions::Visualization::MPRObjects::
-Render( const int& id )
+Render( const int& id, const double& t )
 {
   if( id < 4 )
+  {
     if( this->m_Windows[ id ] != NULL )
+    {
+      if( this->m_Renderers[ id ] != NULL )
+        this->m_Renderers[ id ]->SetAllocatedRenderTime( t );
       this->m_Windows[ id ]->Render( );
+      
+    } // fi
+
+  } // fi
 }
 
 // -------------------------------------------------------------------------
 void cpExtensions::Visualization::MPRObjects::
-RenderAll( )
+RenderAll( const double& t )
 {
   for( int i = 0; i < 4; ++i )
+  {
     if( this->m_Windows[ i ] != NULL )
+    {
+      if( this->m_Renderers[ i ] != NULL )
+        this->m_Renderers[ i ]->SetAllocatedRenderTime( t );
       this->m_Windows[ i ]->Render( );
+
+    } // fi
+
+  } // rof
 }
 
 // -------------------------------------------------------------------------
@@ -175,28 +198,42 @@ Get3DRenderer( ) const
 }
 
 // -------------------------------------------------------------------------
-cpExtensions::Visualization::MPRObjects::
-TMPRActors* cpExtensions::Visualization::MPRObjects::
+cpExtensions::Visualization::
+MPRActors* cpExtensions::Visualization::MPRObjects::
 GetMPRActors( )
 {
   return( this->m_MPRActors );
 }
 
 // -------------------------------------------------------------------------
-const cpExtensions::Visualization::MPRObjects::
-TMPRActors* cpExtensions::Visualization::MPRObjects::
+const cpExtensions::Visualization::
+MPRActors* cpExtensions::Visualization::MPRObjects::
 GetMPRActors( ) const
 {
   return( this->m_MPRActors );
 }
 
+// -------------------------------------------------------------------------
+double cpExtensions::Visualization::MPRObjects::
+GetWindow( ) const
+{
+  return( this->m_MPRActors->GetWindow( ) );
+}
+
+// -------------------------------------------------------------------------
+double cpExtensions::Visualization::MPRObjects::
+GetLevel( ) const
+{
+  return( this->m_MPRActors->GetLevel( ) );
+}
+
 // -------------------------------------------------------------------------
 cpExtensions::Visualization::MPRObjects::
 MPRObjects( )
   : vtkObject( )
 {
   // Prepare actors
-  this->m_MPRActors = vtkSmartPointer< TMPRActors >::New( );
+  this->m_MPRActors = vtkSmartPointer< MPRActors >::New( );
 }
 
 // -------------------------------------------------------------------------