X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FVisualization%2FImageActor.cxx;fp=lib%2FcpExtensions%2FVisualization%2FImageActor.cxx;h=0000000000000000000000000000000000000000;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=d1f72ac154978e95584d273714e8043911dcd68a;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/lib/cpExtensions/Visualization/ImageActor.cxx b/lib/cpExtensions/Visualization/ImageActor.cxx deleted file mode 100644 index d1f72ac..0000000 --- a/lib/cpExtensions/Visualization/ImageActor.cxx +++ /dev/null @@ -1,94 +0,0 @@ -#include -#include - -#include -#include - -// ------------------------------------------------------------------------- -void cpExtensions::Visualization::ImageActor:: -Modified( ) -{ - if( this->m_Mapper->GetNumberOfInputConnections( 0 ) > 0 ) - { - this->m_Mapper->Modified( ); - this->m_Mapper->Update( ); - this->Superclass::Modified( ); - - } // fi -} - -// ------------------------------------------------------------------------- -int cpExtensions::Visualization::ImageActor:: -GetOrientation( ) const -{ - return( this->m_Mapper->GetOrientation( ) ); -} - -// ------------------------------------------------------------------------- -void cpExtensions::Visualization::ImageActor:: -SetOrientation( int orientation ) -{ - this->m_Mapper->SetOrientation( ( orientation < 3 )? orientation: 2 ); - this->Modified( ); -} - -// ------------------------------------------------------------------------- -int cpExtensions::Visualization::ImageActor:: -GetSliceNumber( ) const -{ - return( this->m_Mapper->GetSliceNumber( ) ); -} - -// ------------------------------------------------------------------------- -void cpExtensions::Visualization::ImageActor:: -SetSliceNumber( int slice ) -{ - static int s = 0; - auto image = this->m_Mapper->GetInput( ); - if( image != NULL ) - { - // Update slice - s = slice; - if( s < this->m_Mapper->GetSliceNumberMinValue( ) ) - s = this->m_Mapper->GetSliceNumberMinValue( ); - if( s > this->m_Mapper->GetSliceNumberMaxValue( ) ) - s = this->m_Mapper->GetSliceNumberMaxValue( ); - this->m_Mapper->SetSliceNumber( s ); - this->InvokeEvent( vtkCommand::InteractionEvent, &s ); - - // Propagate modifications - this->Modified( ); - - } // fi -} - -// ------------------------------------------------------------------------- -vtkPlane* cpExtensions::Visualization::ImageActor:: -GetSlicePlane( ) -{ - return( this->m_Mapper->GetSlicePlane( ) ); -} - -// ------------------------------------------------------------------------- -const vtkPlane* cpExtensions::Visualization::ImageActor:: -GetSlicePlane( ) const -{ - return( this->m_Mapper->GetSlicePlane( ) ); -} - -// ------------------------------------------------------------------------- -cpExtensions::Visualization::ImageActor:: -ImageActor( ) - : Superclass( ) -{ - this->m_Mapper = vtkSmartPointer< ImageSliceMapper >::New( ); - this->SetMapper( this->m_Mapper ); -} - -// ------------------------------------------------------------------------- -cpExtensions::Visualization::ImageActor:: -~ImageActor( ) -{ -} - -// eof - $RCSfile$