X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FQT%2FImageWidget.h;h=18073d6aa6327bdf26bcc84ff87987bb9758f42d;hb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;hp=c27855768d3ca8af6c8b339e5380909ae26559ae;hpb=4e55e875e42fe56e3fb92a38015ffa035ac9d0bb;p=cpPlugins.git diff --git a/lib/cpExtensions/QT/ImageWidget.h b/lib/cpExtensions/QT/ImageWidget.h index c278557..18073d6 100644 --- a/lib/cpExtensions/QT/ImageWidget.h +++ b/lib/cpExtensions/QT/ImageWidget.h @@ -3,21 +3,18 @@ #include -#ifdef cpExtensions_QT4 - -// TODO: class vtkDataSet; +// ------------------------------------------------------------------------- +class vtkDataSet; +// ------------------------------------------------------------------------- namespace cpExtensions { namespace Visualization { class OutlineSource; + class LUTImageActor; class WindowLevelImageActor; class MeshActor; - /* TODO - class ImageSliceActors; - class ImageViewerActors; - */ } namespace Interaction { class ImageSliceStyle; } @@ -36,6 +33,7 @@ namespace cpExtensions typedef cpExtensions::Visualization::OutlineSource TOutline; typedef cpExtensions::Visualization::MeshActor TActor; + typedef cpExtensions::Visualization::LUTImageActor TLUTActor; typedef cpExtensions::Visualization::WindowLevelImageActor TWLActor; typedef cpExtensions::Interaction::ImageSliceStyle TStyle; @@ -45,63 +43,33 @@ namespace cpExtensions void Clear( ); void SetImage( - vtkImageData* image, int orientation, const std::string& name + vtkImageData* image, const std::string& name, int orientation = 2 ); + void Add( vtkDataSet* data, const std::string& name ); virtual void ResetCamera( ) cpExtensions_OVERRIDE; TWLActor* GetImageActor( ); const TWLActor* GetImageActor( ) const; - /* TODO - void SetImage( - vtkImageData* image, int orientation, const std::string& name - ); - void Add( vtkDataSet* data, const std::string& name ); - - // TODO: std::vector< vtkProp* > GetActors( const std::string& name ) const; - int GetOrientation( ) const; - void SetSliceNumber( int slice ); - - - void GetScalarRange( double r[ 2 ] ) const; - void GetWindowLevel( double wl[ 2 ] ) const; - double GetImageOpacity( ) const; - unsigned char GetImageInterpolation( ) const; - - void SetScalarRange( double r[ 2 ] ); - void SetWindowLevel( double wl[ 2 ] ); - void SetImageOpacity( double o ); - void SetImageInterpolation( unsigned char i ); - - vtkProp* GetImageActor( ); - const vtkProp* GetImageActor( ) const; - */ + void SetColor( const std::string& name, double r, double g, double b ) override; + void SetLineWidth( const std::string& name, double w ) override; protected: std::string m_ImageName; vtkSmartPointer< TWLActor > m_WLActor; + vtkSmartPointer< TLUTActor > m_LUTActor; vtkSmartPointer< TOutline > m_Outline; TActor* m_OutlineActor; + std::vector< TActor* > m_Actors; vtkSmartPointer< TStyle > m_Style; - - /* TODO - protected: - vtkSmartPointer< cpExtensions::Visualization::ImageViewerActors > - m_ImageViewerActors; - vtkSmartPointer< cpExtensions::Interaction::ImageSliceStyle > - m_ImageSliceStyle; - std::string m_ImageName; - */ }; } // ecapseman } // ecapseman -#endif // cpExtensions_QT4 - #endif // __cpExtensions__QT__ImageWidget__h__ // eof - $RCSfile$