1 #ifndef __cpExtensions__QT__ImageWidget__h__
2 #define __cpExtensions__QT__ImageWidget__h__
4 #include <cpExtensions/QT/RendererWidget.h>
6 #ifdef cpExtensions_QT4
8 // -------------------------------------------------------------------------
11 // -------------------------------------------------------------------------
12 namespace cpExtensions
14 namespace Visualization
18 class WindowLevelImageActor;
21 namespace Interaction { class ImageSliceStyle; }
27 class cpExtensions_EXPORT ImageWidget
28 : public RendererWidget
33 typedef ImageWidget Self;
34 typedef RendererWidget Superclass;
36 typedef cpExtensions::Visualization::OutlineSource TOutline;
37 typedef cpExtensions::Visualization::MeshActor TActor;
38 typedef cpExtensions::Visualization::LUTImageActor TLUTActor;
39 typedef cpExtensions::Visualization::WindowLevelImageActor TWLActor;
40 typedef cpExtensions::Interaction::ImageSliceStyle TStyle;
43 explicit ImageWidget( QWidget* parent = NULL, Qt::WindowFlags f = 0 );
44 virtual ~ImageWidget( );
48 vtkImageData* image, int orientation, const std::string& name
50 void Add( vtkDataSet* data, const std::string& name );
51 virtual void ResetCamera( ) cpExtensions_OVERRIDE;
53 TWLActor* GetImageActor( );
54 const TWLActor* GetImageActor( ) const;
56 void SetColor( const std::string& name, double r, double g, double b );
57 void SetLineWidth( const std::string& name, double w );
60 std::string m_ImageName;
62 vtkSmartPointer< TWLActor > m_WLActor;
63 vtkSmartPointer< TLUTActor > m_LUTActor;
64 vtkSmartPointer< TOutline > m_Outline;
65 TActor* m_OutlineActor;
66 std::vector< TActor* > m_Actors;
68 vtkSmartPointer< TStyle > m_Style;
75 #endif // cpExtensions_QT4
77 #endif // __cpExtensions__QT__ImageWidget__h__