1 #ifndef __CPEXTENSIONS__VISUALIZATION__IMAGE3DMPR__H__
2 #define __CPEXTENSIONS__VISUALIZATION__IMAGE3DMPR__H__
4 #include <cpExtensions/cpExtensions_Export.h>
7 #include <vtkCellPicker.h>
8 #include <vtkHandleWidget.h>
9 #include <vtkImageData.h>
10 #include <vtkImagePlaneWidget.h>
11 #include <vtkOutlineSource.h>
12 #include <vtkPointHandleRepresentation3D.h>
13 #include <vtkPolyDataMapper.h>
14 #include <vtkProperty.h>
15 #include <vtkRenderer.h>
16 #include <vtkRendererCollection.h>
17 #include <vtkRenderWindow.h>
18 #include <vtkRenderWindowInteractor.h>
19 #include <vtkSeedRepresentation.h>
20 #include <vtkSeedWidget.h>
21 #include <vtkSmartPointer.h>
22 #include <vtkSphereSource.h>
23 #include <vtkLookupTable.h>
25 namespace cpExtensions
27 namespace Visualization
31 class cpExtensions_EXPORT Image3DMPR
35 virtual ~Image3DMPR( );
37 void SetImage( vtkImageData* image );
38 void SetBackground( double r, double g, double b );
39 void SetSize( unsigned int w, unsigned int h );
40 void SetWindowLevel( double w, double l );
42 void AddPolyData( vtkPolyData* pd, double opacity = double( 1 ) );
45 double r, double g, double b, double opacity = double( 1 )
50 double opacity = double( 1 )
53 unsigned int GetNumberOfSeeds( ) const;
54 void GetSeed( int n, double* s ) const;
56 const double& x, const double& y, const double& z
59 vtkRenderWindow* GetWindow( ) const;
60 vtkRenderer* GetRenderer( ) const;
66 vtkSmartPointer< vtkImageData > m_Image;
67 vtkSmartPointer< vtkOutlineSource > m_Outline;
68 vtkSmartPointer< vtkPolyDataMapper > m_OutlineMapper;
69 vtkSmartPointer< vtkActor > m_OutlineActor;
70 vtkSmartPointer< vtkCellPicker > m_Picker;
71 vtkSmartPointer< vtkImagePlaneWidget > m_WidgetX;
72 vtkSmartPointer< vtkImagePlaneWidget > m_WidgetY;
73 vtkSmartPointer< vtkImagePlaneWidget > m_WidgetZ;
74 vtkSmartPointer< vtkRenderer > m_Renderer;
75 vtkSmartPointer< vtkRenderWindow > m_Window;
76 vtkSmartPointer< vtkRenderWindowInteractor > m_Interactor;
78 std::vector< vtkSmartPointer< vtkPolyData > > m_PolyDatas;
79 std::vector< vtkSmartPointer< vtkPolyDataMapper > > m_Mappers;
80 std::vector< vtkSmartPointer< vtkActor > > m_Actors;
82 // Create the widget and its representation
83 vtkSmartPointer< vtkPointHandleRepresentation3D >
84 m_SeedHandleRepresentation;
85 vtkSmartPointer< vtkSeedRepresentation > m_SeedRepresentation;
86 vtkSmartPointer< vtkSeedWidget > m_SeedWidget;
93 #endif // __CPEXTENSIONS__VISUALIZATION__IMAGE3DMPR__H__