1 #ifndef __cpExtensions__QT__ImageWidget__h__
2 #define __cpExtensions__QT__ImageWidget__h__
4 #include <cpExtensions/QT/RendererWidget.h>
6 // -------------------------------------------------------------------------
9 // -------------------------------------------------------------------------
10 namespace cpExtensions
12 namespace Visualization
16 class WindowLevelImageActor;
19 namespace Interaction { class ImageSliceStyle; }
25 class cpExtensions_EXPORT ImageWidget
26 : public RendererWidget
31 typedef ImageWidget Self;
32 typedef RendererWidget Superclass;
34 typedef cpExtensions::Visualization::OutlineSource TOutline;
35 typedef cpExtensions::Visualization::MeshActor TActor;
36 typedef cpExtensions::Visualization::LUTImageActor TLUTActor;
37 typedef cpExtensions::Visualization::WindowLevelImageActor TWLActor;
38 typedef cpExtensions::Interaction::ImageSliceStyle TStyle;
41 explicit ImageWidget( QWidget* parent = NULL, Qt::WindowFlags f = 0 );
42 virtual ~ImageWidget( );
46 vtkImageData* image, const std::string& name, int orientation = 2
48 void Add( vtkDataSet* data, const std::string& name );
49 virtual void ResetCamera( ) cpExtensions_OVERRIDE;
51 TWLActor* GetImageActor( );
52 const TWLActor* GetImageActor( ) const;
54 void SetColor( const std::string& name, double r, double g, double b ) override;
55 void SetLineWidth( const std::string& name, double w ) override;
58 std::string m_ImageName;
60 vtkSmartPointer< TWLActor > m_WLActor;
61 vtkSmartPointer< TLUTActor > m_LUTActor;
62 vtkSmartPointer< TOutline > m_Outline;
63 TActor* m_OutlineActor;
64 std::vector< TActor* > m_Actors;
66 vtkSmartPointer< TStyle > m_Style;
73 #endif // __cpExtensions__QT__ImageWidget__h__