#include <cpExtensions/Visualization/MPRObjects.h>
+#include <cmath>
+#include <vtkImageData.h>
+#include <vtkLookupTable.h>
+
// -------------------------------------------------------------------------
cpExtensions::Visualization::MPRObjects*
cpExtensions::Visualization::MPRObjects::
this->m_Renderers[ 3 ]
);
- // Correct cameras positions
- /* TODO
- vtkCamera* zCam = this->m_Renderers[ 2 ]->GetActiveCamera( );
- zCam->SetViewUp( 0, -1, 0 );
- zCam->SetPosition( 0, 0, -1 );
- zCam->SetFocalPoint( 0, 0, 0 );
- */
-
// First rendering
this->m_MPRActors->ResetSlices( );
this->ResetCameras( );
this->RenderAll( );
}
+// -------------------------------------------------------------------------
+void cpExtensions::Visualization::MPRObjects::
+AddAuxiliaryImage( vtkImageData* image )
+{
+ // Try to add new image
+ int id = this->m_MPRActors->AddInputData( image );
+ if( id < 0 )
+ return;
+
+ // Push everything on renderers
+ this->m_MPRActors->PushDataInto(
+ this->m_Renderers[ 0 ],
+ this->m_Renderers[ 1 ],
+ this->m_Renderers[ 2 ],
+ this->m_Renderers[ 3 ]
+ );
+
+ // Rendering
+ this->RenderAll( );
+}
+
// -------------------------------------------------------------------------
void cpExtensions::Visualization::MPRObjects::
ActivateInteractors( )