1 #ifndef __cpExtensions__QT__SimpleMPRWidget__h__
2 #define __cpExtensions__QT__SimpleMPRWidget__h__
4 #include <cpExtensions/Config.h>
6 #ifdef cpExtensions_QT4
8 // TODO: #include <cpExtensions/Visualization/MeshActor.h>
10 #include <vtkSmartPointer.h>
14 // -------------------------------------------------------------------------
17 class vtkPropCollection;
19 namespace Ui { class SimpleMPRWidget; }
21 // -------------------------------------------------------------------------
22 namespace cpExtensions
31 class cpExtensions_EXPORT SimpleMPRWidget
37 typedef SimpleMPRWidget Self;
38 typedef QWidget Superclass;
40 typedef vtkSmartPointer< vtkPropCollection > TProp;
41 typedef std::set< TProp > TProps;
43 // typedef cpExtensions::Visualization::MeshActor TMeshActor;
46 explicit SimpleMPRWidget( QWidget* parent = NULL, Qt::WindowFlags f = 0 );
47 virtual ~SimpleMPRWidget( );
49 void Configure( char q1, char q2, char q3, char q4 );
51 bool HasImage( ) const;
52 void SetImage( vtkImageData* image, const std::string& name );
54 bool Add( vtkDataSet* data, const std::string& name );
56 TProps GetViewProps( const std::string& name ) const;
57 TProps GetImageProps( ) const;
59 vtkRenderWindowInteractor* GetXInteractor( );
60 const vtkRenderWindowInteractor* GetXInteractor( ) const;
61 vtkRenderWindowInteractor* GetYInteractor( );
62 const vtkRenderWindowInteractor* GetYInteractor( ) const;
63 vtkRenderWindowInteractor* GetZInteractor( );
64 const vtkRenderWindowInteractor* GetZInteractor( ) const;
65 vtkRenderWindowInteractor* GetWInteractor( );
66 const vtkRenderWindowInteractor* GetWInteractor( ) const;
68 vtkRenderWindow* GetXRenderWindow( );
69 const vtkRenderWindow* GetXRenderWindow( ) const;
70 vtkRenderWindow* GetYRenderWindow( );
71 const vtkRenderWindow* GetYRenderWindow( ) const;
72 vtkRenderWindow* GetZRenderWindow( );
73 const vtkRenderWindow* GetZRenderWindow( ) const;
74 vtkRenderWindow* GetWRenderWindow( );
75 const vtkRenderWindow* GetWRenderWindow( ) const;
77 void GetScalarRange( double r[ 2 ] ) const;
78 void GetWindowLevel( double wl[ 2 ] ) const;
79 double GetImageOpacity( ) const;
80 unsigned char GetImageInterpolation( ) const;
82 void SetScalarRange( double r[ 2 ] );
83 void SetWindowLevel( double wl[ 2 ] );
84 void SetImageOpacity( double o );
85 void SetImageInterpolation( unsigned char i );
88 std::vector< vtkProp* > GetActors( const std::string& name ) const;
95 void _SyncBottom( int a, int b );
96 void _SyncTop( int a, int b );
97 void _ConfigurationButton( );
100 Ui::SimpleMPRWidget* m_UI;
102 ImageWidget* m_XImage;
103 ImageWidget* m_YImage;
104 ImageWidget* m_ZImage;
105 MPR3DWidget* m_3DView;
107 std::string m_MainImageName;
108 vtkSmartPointer< vtkImageData > m_MainImage;
115 #endif // cpExtensions_QT4
117 #endif // __cpExtensions__QT__SimpleMPRWidget__h__