#include <vtkRenderWindow.h>
#include <vtkSmartPointer.h>
+// -------------------------------------------------------------------------
+#define cpPlugins_MPRWithDifferentWindows_ObserverMacro( e ) \
+inline void Add##e##Observer( vtkCommand* observer ) \
+{ \
+ for( int i = 0; i < 3; ++i ) \
+ if( this->m_Styles[ i ].GetPointer( ) != NULL ) \
+ this->m_Styles[ i ]->Add##e##Observer( observer ); \
+} \
+inline void Remove##e##Observer( vtkCommand* observer ) \
+{ \
+ for( int i = 0; i < 3; ++i ) \
+ if( this->m_Styles[ i ].GetPointer( ) != NULL ) \
+ this->m_Styles[ i ]->Remove##e##Observer( observer ); \
+} \
+inline void Remove##e##Observers( ) \
+{ \
+ for( int i = 0; i < 3; ++i ) \
+ if( this->m_Styles[ i ].GetPointer( ) != NULL ) \
+ this->m_Styles[ i ]->Remove##e##Observers( ); \
+}
+
namespace cpPlugins
{
namespace Extensions
typedef cpPlugins::Extensions::Visualization::
ImageInteractorStyle TStyle;
+ public:
+ cpPlugins_MPRWithDifferentWindows_ObserverMacro( DoubleClick );
+ cpPlugins_MPRWithDifferentWindows_ObserverMacro( Cursor );
+ cpPlugins_MPRWithDifferentWindows_ObserverMacro( Radius );
+
public:
MPRWithDifferentWindows(
vtkRenderWindow* xWin = NULL,
);
virtual ~MPRWithDifferentWindows( );
- void AddDoubleClickObserver( vtkCommand* observer );
- void RemoveDoubleClickObserver( vtkCommand* observer );
- void RemoveDoubleClickObservers( );
void SetImage( vtkImageData* image );
void SetSegmentation( vtkImageData* image );