X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FQT%2FMPRInteractionCommand.cxx;h=39dc19d686d4cafc4b411a62b65647b4bf480f62;hb=5cbe75ae1fb27d18932b6278f97c4a865cddd592;hp=b65266fbf5280f794c398ce53c5d3bb738ab4273;hpb=a422d88602e9b49085ccfab0ef0f9f2d93fb6a1e;p=cpPlugins.git diff --git a/lib/cpExtensions/QT/MPRInteractionCommand.cxx b/lib/cpExtensions/QT/MPRInteractionCommand.cxx index b65266f..39dc19d 100644 --- a/lib/cpExtensions/QT/MPRInteractionCommand.cxx +++ b/lib/cpExtensions/QT/MPRInteractionCommand.cxx @@ -1,7 +1,4 @@ #include - -#ifdef cpExtensions_QT4 - #include #include #include @@ -20,24 +17,21 @@ New( ) void cpExtensions::QT::MPRInteractionCommand:: AddWidget( QWidget* w ) { - /* - typedef cpExtensions::QT::ImageWidget _TImageWidget; - typedef cpExtensions::QT::MPR3DWidget _TMPR3DWidget; + typedef cpExtensions::QT::ImageWidget _TImageWidget; + typedef cpExtensions::QT::MPR3DWidget _TMPR3DWidget; - auto img = dynamic_cast< _TImageWidget* >( w ); - auto ren = dynamic_cast< _TMPR3DWidget* >( w ); - if( img != NULL ) + auto img = dynamic_cast< _TImageWidget* >( w ); + auto ren = dynamic_cast< _TMPR3DWidget* >( w ); + if( img != NULL ) this->m_ImageWidgets.insert( img ); - else if( ren != NULL ) + else if( ren != NULL ) this->m_MPR3DWidgets.insert( ren ); - */ } // ------------------------------------------------------------------------- void cpExtensions::QT::MPRInteractionCommand:: Execute( vtkObject* caller, unsigned long evId, void* data ) { - /* typedef cpExtensions::Interaction::ImageSliceStyle _TStyle; static const unsigned long _SuperCursor = vtkCommand::UserEvent + 1; @@ -49,41 +43,42 @@ Execute( vtkObject* caller, unsigned long evId, void* data ) return; if( evId == _SuperCursor ) { - auto ori = src->GetActors( )->GetOrientation( ); - auto img = src->GetActors( )->GetImage( ); - auto pos = reinterpret_cast< double* >( data ); - int ijk[ 3 ]; - double pcoords[ 3 ]; - img->ComputeStructuredCoordinates( pos, ijk, pcoords ); + /* TODO + auto ori = src->GetActors( )->GetOrientation( ); + auto img = src->GetActors( )->GetImage( ); + auto pos = reinterpret_cast< double* >( data ); + int ijk[ 3 ]; + double pcoords[ 3 ]; + img->ComputeStructuredCoordinates( pos, ijk, pcoords ); - for( - auto i = this->m_ImageWidgets.begin( ); - i != this->m_ImageWidgets.end( ); - ++i - ) - if( ( *i )->GetInteractorStyle( ) != src ) - ( *i )->SetSliceNumber( ijk[ ( *i )->GetOrientation( ) ] ); + for( + auto i = this->m_ImageWidgets.begin( ); + i != this->m_ImageWidgets.end( ); + ++i + ) + if( ( *i )->GetInteractorStyle( ) != src ) + ( *i )->SetSliceNumber( ijk[ ( *i )->GetOrientation( ) ] ); - for( - auto r = this->m_MPR3DWidgets.begin( ); - r != this->m_MPR3DWidgets.end( ); - ++r - ) - ( *r )->SetSlicesNumbers( ijk[ 0 ], ijk[ 1 ], ijk[ 2 ] ); + for( + auto r = this->m_MPR3DWidgets.begin( ); + r != this->m_MPR3DWidgets.end( ); + ++r + ) + ( *r )->SetSlicesNumbers( ijk[ 0 ], ijk[ 1 ], ijk[ 2 ] ); + */ } else if( evId == _Slice ) { - auto slice = *( reinterpret_cast< int* >( data ) ); - auto ori = src->GetActors( )->GetOrientation( ); + int slc = src->GetSliceNumber( ); + int ori = src->GetOrientation( ); for( auto r = this->m_MPR3DWidgets.begin( ); r != this->m_MPR3DWidgets.end( ); ++r ) - ( *r )->SetSliceNumber( ori, slice ); - + ( *r )->SetSliceNumber( ori, slc ); + } // fi - */ } // ------------------------------------------------------------------------- @@ -99,6 +94,4 @@ cpExtensions::QT::MPRInteractionCommand:: { } -#endif // cpExtensions_QT4 - // eof - $RCSfile$