X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FVisualization%2FMPR3DActors.cxx;h=b3f47007840ae68700d8a79f7287bf6af7971939;hb=aee3cafa7e93f996580777976636ed625dbc43f5;hp=1c0d325854a77f56bd5c0488fbca2f2fee591094;hpb=3393941bf8f26babc7b592db434b40c1b747a687;p=cpPlugins.git diff --git a/lib/cpExtensions/Visualization/MPR3DActors.cxx b/lib/cpExtensions/Visualization/MPR3DActors.cxx index 1c0d325..b3f4700 100644 --- a/lib/cpExtensions/Visualization/MPR3DActors.cxx +++ b/lib/cpExtensions/Visualization/MPR3DActors.cxx @@ -3,6 +3,7 @@ #include #include #include +#include #include // ------------------------------------------------------------------------- @@ -101,12 +102,14 @@ SetImage( vtkImageData* image ) unsigned int cpExtensions::Visualization::MPR3DActors:: AddLUTImage( vtkImageData* image ) { + unsigned int res = 0; for( int i = 0; i < 3; ++i ) { - this->m_Slices[ i ]->AddLUTImage( image ); + res = this->m_Slices[ i ]->AddLUTImage( image ); this->AddItem( this->m_Slices[ i ]->GetLUTImageActor( ) ); } // rof + return( res ); } // ------------------------------------------------------------------------- @@ -127,6 +130,43 @@ AddMesh( vtkPolyData* mesh ) return( actor.GetActor( ) ); } +// ------------------------------------------------------------------------- +void cpExtensions::Visualization::MPR3DActors:: +SetScalarRange( double r[ 2 ] ) +{ + this->m_Slices[ 0 ]->GetWindowLevelImageActor( )->SetRange( r ); + this->m_Slices[ 1 ]->GetWindowLevelImageActor( )->SetRange( r ); + this->m_Slices[ 2 ]->GetWindowLevelImageActor( )->SetRange( r ); +} + +// ------------------------------------------------------------------------- +void cpExtensions::Visualization::MPR3DActors:: +SetWindowLevel( double wl[ 2 ] ) +{ + this->m_Slices[ 0 ]->GetWindowLevelImageActor( )->SetWindowLevel( wl ); + this->m_Slices[ 1 ]->GetWindowLevelImageActor( )->SetWindowLevel( wl ); + this->m_Slices[ 2 ]->GetWindowLevelImageActor( )->SetWindowLevel( wl ); +} + +// ------------------------------------------------------------------------- +void cpExtensions::Visualization::MPR3DActors:: +SetImageOpacity( double o ) +{ + this->m_Slices[ 0 ]->GetWindowLevelImageActor( )-> + GetProperty( )->SetOpacity( o ); + this->m_Slices[ 1 ]->GetWindowLevelImageActor( )-> + GetProperty( )->SetOpacity( o ); + this->m_Slices[ 2 ]->GetWindowLevelImageActor( )-> + GetProperty( )->SetOpacity( o ); +} + +// ------------------------------------------------------------------------- +void cpExtensions::Visualization::MPR3DActors:: +SetImageInterpolation( unsigned char i ) +{ + // TODO +} + // ------------------------------------------------------------------------- cpExtensions::Visualization::MPR3DActors:: MPR3DActors( )