X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FVisualization%2FMPRObjects.cxx;h=914c46de29d47490ec867cd2a4e527f65c4ef483;hb=b23970017af98ef6617ddf40f225d4d15fa65854;hp=aaadf31b1b61ede9daff48099bb27613b232f87f;hpb=1d735deae0ae5e8bff643a59370a03c961ef780c;p=cpPlugins.git diff --git a/lib/cpExtensions/Visualization/MPRObjects.cxx b/lib/cpExtensions/Visualization/MPRObjects.cxx index aaadf31..914c46d 100644 --- a/lib/cpExtensions/Visualization/MPRObjects.cxx +++ b/lib/cpExtensions/Visualization/MPRObjects.cxx @@ -1,5 +1,9 @@ #include +#include +#include +#include + // ------------------------------------------------------------------------- cpExtensions::Visualization::MPRObjects* cpExtensions::Visualization::MPRObjects:: @@ -54,20 +58,33 @@ SetImage( vtkImageData* image ) 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( )