]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/QT/SimpleMPRWidget.cxx
...
[cpPlugins.git] / lib / cpExtensions / QT / SimpleMPRWidget.cxx
1 #include <cpExtensions/QT/SimpleMPRWidget.h>
2
3 #ifdef cpExtensions_QT4
4
5 #include <cpExtensions/QT/ui_SimpleMPRWidget.h>
6 #include <cpExtensions/QT/ImageWidget.h>
7 #include <cpExtensions/QT/MPR3DWidget.h>
8 #include <cpExtensions/QT/MPRInteractionCommand.h>
9 #include <cpExtensions/QT/ConfigurationChooser.h>
10
11 #include <vtkImageData.h>
12 #include <vtkPolyData.h>
13 #include <vtkProp.h>
14 #include <vtkPropCollection.h>
15
16 // -------------------------------------------------------------------------
17 cpExtensions::QT::SimpleMPRWidget::
18 SimpleMPRWidget( QWidget* parent, Qt::WindowFlags f )
19   : Superclass( parent, f ),
20     Superclass2( ),
21     m_UI( new Ui::SimpleMPRWidget ),
22     m_MainImageName( "" )
23 {
24   this->m_UI->setupUi( this );
25
26   // Prepare default configuration
27   this->m_UI->Q1->hide( );
28   this->m_UI->Q2->hide( );
29   this->m_UI->Q3->hide( );
30   this->m_UI->Q4->hide( );
31   this->m_UI->Q1->close( );
32   this->m_UI->Q2->close( );
33   this->m_UI->Q3->close( );
34   this->m_UI->Q4->close( );
35   delete this->m_UI->Q1;
36   delete this->m_UI->Q2;
37   delete this->m_UI->Q3;
38   delete this->m_UI->Q4;
39   this->m_XImage = new ImageWidget( this );
40   this->m_YImage = new ImageWidget( this );
41   this->m_ZImage = new ImageWidget( this );
42   this->m_3DView = new MPR3DWidget( this );
43   this->m_UI->Q1 = this->m_XImage;
44   this->m_UI->Q2 = this->m_YImage;
45   this->m_UI->Q3 = this->m_ZImage;
46   this->m_UI->Q4 = this->m_3DView;
47   this->Configure( 'y', 'x', 'w', 'z' );
48
49   // Interaction synchronizer
50   unsigned long ev1 = vtkCommand::UserEvent + 1;
51   unsigned long ev2 = vtkCommand::UserEvent + 2;
52   vtkSmartPointer< cpExtensions::QT::MPRInteractionCommand > cmd =
53     vtkSmartPointer< cpExtensions::QT::MPRInteractionCommand >::New( );
54   cmd->AddWidget( this->m_XImage );
55   cmd->AddWidget( this->m_YImage );
56   cmd->AddWidget( this->m_ZImage );
57   cmd->AddWidget( this->m_3DView );
58   this->m_XImage->GetStyle( )->AddObserver( ev1, cmd );
59   this->m_YImage->GetStyle( )->AddObserver( ev1, cmd );
60   this->m_ZImage->GetStyle( )->AddObserver( ev1, cmd );
61   this->m_XImage->GetStyle( )->AddObserver( ev2, cmd );
62   this->m_YImage->GetStyle( )->AddObserver( ev2, cmd );
63   this->m_ZImage->GetStyle( )->AddObserver( ev2, cmd );
64
65   // Connect slots
66   this->connect(
67     this->m_UI->Top, SIGNAL( splitterMoved( int, int ) ),
68     this, SLOT( _SyncBottom( int, int ) )
69     );
70   this->connect(
71     this->m_UI->Bottom, SIGNAL( splitterMoved( int, int ) ),
72     this, SLOT( _SyncTop( int, int ) )
73     );
74 }
75
76 // -------------------------------------------------------------------------
77 cpExtensions::QT::SimpleMPRWidget::
78 ~SimpleMPRWidget( )
79 {
80   delete this->m_UI;
81 }
82
83 // -------------------------------------------------------------------------
84 void cpExtensions::QT::SimpleMPRWidget::
85 Configure( char q1, char q2, char q3, char q4 )
86 {
87   // Hide all widgets
88   this->m_UI->Q1->hide( );
89   this->m_UI->Q2->hide( );
90   this->m_UI->Q3->hide( );
91   this->m_UI->Q4->hide( );
92   this->m_UI->Q1->close( );
93   this->m_UI->Q2->close( );
94   this->m_UI->Q3->close( );
95   this->m_UI->Q4->close( );
96
97   // Reorder them
98   if     ( q1 == 'x' ) this->m_UI->Top->addWidget( this->m_XImage );
99   else if( q1 == 'y' ) this->m_UI->Top->addWidget( this->m_YImage );
100   else if( q1 == 'z' ) this->m_UI->Top->addWidget( this->m_ZImage );
101   else if( q1 == 'w' ) this->m_UI->Top->addWidget( this->m_3DView );
102   if     ( q2 == 'x' ) this->m_UI->Top->addWidget( this->m_XImage );
103   else if( q2 == 'y' ) this->m_UI->Top->addWidget( this->m_YImage );
104   else if( q2 == 'z' ) this->m_UI->Top->addWidget( this->m_ZImage );
105   else if( q2 == 'w' ) this->m_UI->Top->addWidget( this->m_3DView );
106   this->m_UI->Top->update( );
107   if     ( q4 == 'x' ) this->m_UI->Bottom->addWidget( this->m_XImage );
108   else if( q4 == 'y' ) this->m_UI->Bottom->addWidget( this->m_YImage );
109   else if( q4 == 'z' ) this->m_UI->Bottom->addWidget( this->m_ZImage );
110   else if( q4 == 'w' ) this->m_UI->Bottom->addWidget( this->m_3DView );
111   if     ( q3 == 'x' ) this->m_UI->Bottom->addWidget( this->m_XImage );
112   else if( q3 == 'y' ) this->m_UI->Bottom->addWidget( this->m_YImage );
113   else if( q3 == 'z' ) this->m_UI->Bottom->addWidget( this->m_ZImage );
114   else if( q3 == 'w' ) this->m_UI->Bottom->addWidget( this->m_3DView );
115   this->m_UI->Bottom->update( );
116
117   // Keep track
118   if     ( q1 == 'x' ) this->m_UI->Q1 = this->m_XImage;
119   else if( q1 == 'y' ) this->m_UI->Q1 = this->m_YImage;
120   else if( q1 == 'z' ) this->m_UI->Q1 = this->m_ZImage;
121   else if( q1 == 'w' ) this->m_UI->Q1 = this->m_3DView;
122   if     ( q2 == 'x' ) this->m_UI->Q2 = this->m_XImage;
123   else if( q2 == 'y' ) this->m_UI->Q2 = this->m_YImage;
124   else if( q2 == 'z' ) this->m_UI->Q2 = this->m_ZImage;
125   else if( q2 == 'w' ) this->m_UI->Q2 = this->m_3DView;
126   if     ( q3 == 'x' ) this->m_UI->Q3 = this->m_XImage;
127   else if( q3 == 'y' ) this->m_UI->Q3 = this->m_YImage;
128   else if( q3 == 'z' ) this->m_UI->Q3 = this->m_ZImage;
129   else if( q3 == 'w' ) this->m_UI->Q3 = this->m_3DView;
130   if     ( q4 == 'x' ) this->m_UI->Q4 = this->m_XImage;
131   else if( q4 == 'y' ) this->m_UI->Q4 = this->m_YImage;
132   else if( q4 == 'z' ) this->m_UI->Q4 = this->m_ZImage;
133   else if( q4 == 'w' ) this->m_UI->Q4 = this->m_3DView;
134
135   // Draw all
136   this->m_UI->Q1->show( );
137   this->m_UI->Q2->show( );
138   this->m_UI->Q3->show( );
139   this->m_UI->Q4->show( );
140   dynamic_cast< RendererWidget* >( this->m_UI->Q1 )->SetQuadrant( 1 );
141   dynamic_cast< RendererWidget* >( this->m_UI->Q2 )->SetQuadrant( 2 );
142   dynamic_cast< RendererWidget* >( this->m_UI->Q3 )->SetQuadrant( 3 );
143   dynamic_cast< RendererWidget* >( this->m_UI->Q4 )->SetQuadrant( 4 );
144 }
145
146 // -------------------------------------------------------------------------
147 bool cpExtensions::QT::SimpleMPRWidget::
148 HasImage( ) const
149 {
150   return( this->m_MainImage.GetPointer( ) != NULL );
151 }
152
153 // -------------------------------------------------------------------------
154 void cpExtensions::QT::SimpleMPRWidget::
155 SetImage( vtkImageData* image, const std::string& name )
156 {
157   if( this->m_MainImageName != "" || image == NULL )
158   {
159     // TODO: Clear visualization
160
161   } // fi
162   this->m_MainImageName = name;
163   this->m_MainImage = image;
164
165   if( this->m_MainImage != NULL && this->m_MainImageName != "" )
166   {
167     this->m_XImage->SetImage( this->m_MainImage, name, 0 );
168     this->m_YImage->SetImage( this->m_MainImage, name, 1 );
169     this->m_ZImage->SetImage( this->m_MainImage, name, 2 );
170     this->m_3DView->SetImage( this->m_MainImage, name );
171
172   } // fi
173 }
174
175 // -------------------------------------------------------------------------
176 bool cpExtensions::QT::SimpleMPRWidget::
177 Add( vtkDataSet* data, const std::string& name )
178 {
179   bool success = true;
180   auto image = dynamic_cast< vtkImageData* >( data );
181   auto pdata = dynamic_cast< vtkPolyData* >( data );
182
183   if( image != NULL )
184   {
185     if( this->m_MainImageName != "" )
186     {
187       this->m_XImage->Add( image, name );
188       this->m_YImage->Add( image, name );
189       this->m_ZImage->Add( image, name );
190       // TODO: this->m_3DView->Add( image, name );
191     }
192     else
193       this->SetImage( image, name );
194   }
195   else if( pdata != NULL )
196     this->m_3DView->Add( pdata, name );
197   else
198     success = false;
199   return( success );
200 }
201
202 // -------------------------------------------------------------------------
203 cpExtensions::QT::SimpleMPRWidget::
204 TProps cpExtensions::QT::SimpleMPRWidget::
205 GetViewProps( const std::string& name ) const
206 {
207 /*
208   auto x = this->m_XImage->GetViewProps( name );
209   auto y = this->m_YImage->GetViewProps( name );
210   auto z = this->m_ZImage->GetViewProps( name );
211   auto w = this->m_3DView->GetViewProps( name );
212
213   TProps props;
214   if( x != NULL ) props.insert( x );
215   if( y != NULL ) props.insert( y );
216   if( z != NULL ) props.insert( z );
217   if( w != NULL ) props.insert( w );
218   return( props );
219 */
220   TProps props;
221   return( props );
222 }
223
224 // -------------------------------------------------------------------------
225 cpExtensions::QT::SimpleMPRWidget::
226 TProps cpExtensions::QT::SimpleMPRWidget::
227 GetImageProps( ) const
228 {
229   return( this->GetViewProps( this->m_MainImageName ) );
230 }
231
232 // -------------------------------------------------------------------------
233 vtkRenderWindowInteractor* cpExtensions::QT::SimpleMPRWidget::
234 GetXInteractor( )
235 {
236   return( this->m_XImage->GetInteractor( ) );
237 }
238
239 // -------------------------------------------------------------------------
240 const vtkRenderWindowInteractor* cpExtensions::QT::SimpleMPRWidget::
241 GetXInteractor( ) const
242 {
243   return( this->m_XImage->GetInteractor( ) );
244 }
245
246 // -------------------------------------------------------------------------
247 vtkRenderWindowInteractor* cpExtensions::QT::SimpleMPRWidget::
248 GetYInteractor( )
249 {
250   return( this->m_YImage->GetInteractor( ) );
251 }
252
253 // -------------------------------------------------------------------------
254 const vtkRenderWindowInteractor* cpExtensions::QT::SimpleMPRWidget::
255 GetYInteractor( ) const
256 {
257   return( this->m_YImage->GetInteractor( ) );
258 }
259
260 // -------------------------------------------------------------------------
261 vtkRenderWindowInteractor* cpExtensions::QT::SimpleMPRWidget::
262 GetZInteractor( )
263 {
264   return( this->m_ZImage->GetInteractor( ) );
265 }
266
267 // -------------------------------------------------------------------------
268 const vtkRenderWindowInteractor* cpExtensions::QT::SimpleMPRWidget::
269 GetZInteractor( ) const
270 {
271   return( this->m_ZImage->GetInteractor( ) );
272 }
273
274 // -------------------------------------------------------------------------
275 vtkRenderWindowInteractor* cpExtensions::QT::SimpleMPRWidget::
276 GetWInteractor( )
277 {
278   return( this->m_3DView->GetInteractor( ) );
279 }
280
281 // -------------------------------------------------------------------------
282 const vtkRenderWindowInteractor* cpExtensions::QT::SimpleMPRWidget::
283 GetWInteractor( ) const
284 {
285   return( this->m_3DView->GetInteractor( ) );
286 }
287
288 // -------------------------------------------------------------------------
289 vtkRenderWindow* cpExtensions::QT::SimpleMPRWidget::
290 GetXRenderWindow( )
291 {
292   return( this->m_XImage->GetRenderWindow( ) );
293 }
294
295 // -------------------------------------------------------------------------
296 const vtkRenderWindow* cpExtensions::QT::SimpleMPRWidget::
297 GetXRenderWindow( ) const
298 {
299   return( this->m_XImage->GetRenderWindow( ) );
300 }
301
302 // -------------------------------------------------------------------------
303 vtkRenderWindow* cpExtensions::QT::SimpleMPRWidget::
304 GetYRenderWindow( )
305 {
306   return( this->m_YImage->GetRenderWindow( ) );
307 }
308
309 // -------------------------------------------------------------------------
310 const vtkRenderWindow* cpExtensions::QT::SimpleMPRWidget::
311 GetYRenderWindow( ) const
312 {
313   return( this->m_YImage->GetRenderWindow( ) );
314 }
315
316 // -------------------------------------------------------------------------
317 vtkRenderWindow* cpExtensions::QT::SimpleMPRWidget::
318 GetZRenderWindow( )
319 {
320   return( this->m_ZImage->GetRenderWindow( ) );
321 }
322
323 // -------------------------------------------------------------------------
324 const vtkRenderWindow* cpExtensions::QT::SimpleMPRWidget::
325 GetZRenderWindow( ) const
326 {
327   return( this->m_ZImage->GetRenderWindow( ) );
328 }
329
330 // -------------------------------------------------------------------------
331 vtkRenderWindow* cpExtensions::QT::SimpleMPRWidget::
332 GetWRenderWindow( )
333 {
334   return( this->m_3DView->GetRenderWindow( ) );
335 }
336
337
338 // -------------------------------------------------------------------------
339 const vtkRenderWindow* cpExtensions::QT::SimpleMPRWidget::
340 GetWRenderWindow( ) const
341 {
342   return( this->m_3DView->GetRenderWindow( ) );
343 }
344
345 // -------------------------------------------------------------------------
346 void cpExtensions::QT::SimpleMPRWidget::
347 ResetCameras( )
348 {
349   this->m_XImage->ResetCamera( );
350   this->m_YImage->ResetCamera( );
351   this->m_ZImage->ResetCamera( );
352   this->m_3DView->ResetCamera( );
353 }
354
355 // -------------------------------------------------------------------------
356 void cpExtensions::QT::SimpleMPRWidget::
357 Render( )
358 {
359   this->m_XImage->Render( );
360   this->m_YImage->Render( );
361   this->m_ZImage->Render( );
362   this->m_3DView->Render( );
363 }
364
365 // -------------------------------------------------------------------------
366 std::set< vtkRenderWindowInteractor* > cpExtensions::QT::SimpleMPRWidget::
367 GetInteractors( ) const
368 {
369   std::set< vtkRenderWindowInteractor* > ret;
370   ret.insert( this->m_XImage->GetInteractor( ) );
371   ret.insert( this->m_YImage->GetInteractor( ) );
372   ret.insert( this->m_ZImage->GetInteractor( ) );
373   ret.insert( this->m_3DView->GetInteractor( ) );
374   return( ret );
375 }
376
377 // -------------------------------------------------------------------------
378 std::set< std::string > cpExtensions::QT::SimpleMPRWidget::
379 GetActorsNames( ) const
380 {
381   std::set< std::string > names = this->m_XImage->GetActorsNames( );
382   std::set< std::string > y = this->m_YImage->GetActorsNames( );
383   std::set< std::string > z = this->m_ZImage->GetActorsNames( );
384   std::set< std::string > w = this->m_3DView->GetActorsNames( );
385   names.insert( y.begin( ), y.end( ) );
386   names.insert( z.begin( ), z.end( ) );
387   names.insert( w.begin( ), w.end( ) );
388   return( names );
389 }
390
391 // -------------------------------------------------------------------------
392 bool cpExtensions::QT::SimpleMPRWidget::
393 IsWindowLevelImageActor( const std::string& name ) const
394 {
395   return( this->m_XImage->IsWindowLevelImageActor( name ) );
396 }
397
398 // -------------------------------------------------------------------------
399 bool cpExtensions::QT::SimpleMPRWidget::
400 IsLUTImageActor( const std::string& name ) const
401 {
402   return( this->m_XImage->IsLUTImageActor( name ) );
403 }
404
405 // -------------------------------------------------------------------------
406 bool cpExtensions::QT::SimpleMPRWidget::
407 Is3DActor( const std::string& name ) const
408 {
409   return(
410     this->m_XImage->Is3DActor( name ) || this->m_3DView->Is3DActor( name )
411     );
412 }
413
414 // -------------------------------------------------------------------------
415 void cpExtensions::QT::SimpleMPRWidget::
416 GetScalarRange( const std::string& name, double r[ 2 ] ) const
417 {
418   this->m_XImage->GetScalarRange( name, r );
419 }
420
421 // -------------------------------------------------------------------------
422 void cpExtensions::QT::SimpleMPRWidget::
423 GetWindowLevel( const std::string& name, double wl[ 2 ] ) const
424 {
425   this->m_XImage->GetWindowLevel( name, wl );
426 }
427
428 // -------------------------------------------------------------------------
429 double cpExtensions::QT::SimpleMPRWidget::
430 GetWindow( const std::string& name ) const
431 {
432   return( this->m_XImage->GetWindow( name ) );
433 }
434
435 // -------------------------------------------------------------------------
436 double cpExtensions::QT::SimpleMPRWidget::
437 GetLevel( const std::string& name ) const
438 {
439   return( this->m_XImage->GetLevel( name ) );
440 }
441
442 // -------------------------------------------------------------------------
443 char cpExtensions::QT::SimpleMPRWidget::
444 GetImageInterpolation( const std::string& name ) const
445 {
446   return( this->m_XImage->GetImageInterpolation( name ) );
447 }
448
449 // -------------------------------------------------------------------------
450 void cpExtensions::QT::SimpleMPRWidget::
451 GetColor( const std::string& name, double& r, double& g, double& b ) const
452 {
453   this->m_XImage->GetColor( name, r, g, b );
454 }
455
456 // -------------------------------------------------------------------------
457 double cpExtensions::QT::SimpleMPRWidget::
458 GetOpacity( const std::string& name ) const
459 {
460   return( this->m_XImage->GetOpacity( name ) );
461 }
462
463 // -------------------------------------------------------------------------
464 double cpExtensions::QT::SimpleMPRWidget::
465 GetPointSize( const std::string& name ) const
466 {
467   return( this->m_XImage->GetPointSize( name ) );
468 }
469
470 // -------------------------------------------------------------------------
471 double cpExtensions::QT::SimpleMPRWidget::
472 GetLineWidth( const std::string& name ) const
473 {
474   return( this->m_XImage->GetLineWidth( name ) );
475 }
476
477 // -------------------------------------------------------------------------
478 int cpExtensions::QT::SimpleMPRWidget::
479 GetRepresentation( const std::string& name ) const
480 {
481   return( this->m_XImage->GetRepresentation( name ) );
482 }
483
484 // -------------------------------------------------------------------------
485 void cpExtensions::QT::SimpleMPRWidget::
486 SetScalarRange( const std::string& name, double r[ 2 ] )
487 {
488   this->m_XImage->SetScalarRange( name, r );
489   this->m_YImage->SetScalarRange( name, r );
490   this->m_ZImage->SetScalarRange( name, r );
491   this->m_3DView->SetScalarRange( name, r );
492 }
493
494 // -------------------------------------------------------------------------
495 void cpExtensions::QT::SimpleMPRWidget::
496 SetScalarRange( const std::string& name, double min, double max )
497 {
498   this->m_XImage->SetScalarRange( name, min, max );
499   this->m_YImage->SetScalarRange( name, min, max );
500   this->m_ZImage->SetScalarRange( name, min, max );
501   this->m_3DView->SetScalarRange( name, min, max );
502 }
503
504 // -------------------------------------------------------------------------
505 void cpExtensions::QT::SimpleMPRWidget::
506 SetWindowLevel( const std::string& name, double wl[ 2 ] )
507 {
508   this->m_XImage->SetWindowLevel( name, wl );
509   this->m_YImage->SetWindowLevel( name, wl );
510   this->m_ZImage->SetWindowLevel( name, wl );
511   this->m_3DView->SetWindowLevel( name, wl );
512 }
513
514 // -------------------------------------------------------------------------
515 void cpExtensions::QT::SimpleMPRWidget::
516 SetWindowLevel( const std::string& name, double w, double l )
517 {
518   this->m_XImage->SetWindowLevel( name, w, l );
519   this->m_YImage->SetWindowLevel( name, w, l );
520   this->m_ZImage->SetWindowLevel( name, w, l );
521   this->m_3DView->SetWindowLevel( name, w, l );
522 }
523
524 // -------------------------------------------------------------------------
525 void cpExtensions::QT::SimpleMPRWidget::
526 SetWindow( const std::string& name, double w )
527 {
528   this->m_XImage->SetWindow( name, w );
529   this->m_YImage->SetWindow( name, w );
530   this->m_ZImage->SetWindow( name, w );
531   this->m_3DView->SetWindow( name, w );
532 }
533
534 // -------------------------------------------------------------------------
535 void cpExtensions::QT::SimpleMPRWidget::
536 SetLevel( const std::string& name, double l )
537 {
538   this->m_XImage->SetLevel( name, l );
539   this->m_YImage->SetLevel( name, l );
540   this->m_ZImage->SetLevel( name, l );
541   this->m_3DView->SetLevel( name, l );
542 }
543
544 // -------------------------------------------------------------------------
545 void cpExtensions::QT::SimpleMPRWidget::
546 SetImageInterpolation( const std::string& name, char i )
547 {
548   this->m_XImage->SetImageInterpolation( name, i );
549   this->m_YImage->SetImageInterpolation( name, i );
550   this->m_ZImage->SetImageInterpolation( name, i );
551   this->m_3DView->SetImageInterpolation( name, i );
552 }
553
554 // -------------------------------------------------------------------------
555 void cpExtensions::QT::SimpleMPRWidget::
556 SetColor( const std::string& name, double r, double g, double b )
557 {
558   this->m_XImage->SetColor( name, r, g, b );
559   this->m_YImage->SetColor( name, r, g, b );
560   this->m_ZImage->SetColor( name, r, g, b );
561   this->m_3DView->SetColor( name, r, g, b );
562 }
563
564 // -------------------------------------------------------------------------
565 void cpExtensions::QT::SimpleMPRWidget::
566 SetOpacity( const std::string& name, double o )
567 {
568   this->m_XImage->SetOpacity( name, o );
569   this->m_YImage->SetOpacity( name, o );
570   this->m_ZImage->SetOpacity( name, o );
571   this->m_3DView->SetOpacity( name, o );
572 }
573
574 // -------------------------------------------------------------------------
575 void cpExtensions::QT::SimpleMPRWidget::
576 SetPointSize( const std::string& name, double s )
577 {
578   this->m_XImage->SetPointSize( name, s );
579   this->m_YImage->SetPointSize( name, s );
580   this->m_ZImage->SetPointSize( name, s );
581   this->m_3DView->SetPointSize( name, s );
582 }
583
584 // -------------------------------------------------------------------------
585 void cpExtensions::QT::SimpleMPRWidget::
586 SetLineWidth( const std::string& name, double w )
587 {
588   this->m_XImage->SetLineWidth( name, w );
589   this->m_YImage->SetLineWidth( name, w );
590   this->m_ZImage->SetLineWidth( name, w );
591   this->m_3DView->SetLineWidth( name, w );
592 }
593
594 // -------------------------------------------------------------------------
595 void cpExtensions::QT::SimpleMPRWidget::
596 SetRepresentationToPoints( const std::string& name )
597 {
598   this->m_XImage->SetRepresentationToPoints( name );
599   this->m_YImage->SetRepresentationToPoints( name );
600   this->m_ZImage->SetRepresentationToPoints( name );
601   this->m_3DView->SetRepresentationToPoints( name );
602 }
603
604 // -------------------------------------------------------------------------
605 void cpExtensions::QT::SimpleMPRWidget::
606 SetRepresentationToSurface( const std::string& name )
607 {
608   this->m_XImage->SetRepresentationToSurface( name );
609   this->m_YImage->SetRepresentationToSurface( name );
610   this->m_ZImage->SetRepresentationToSurface( name );
611   this->m_3DView->SetRepresentationToSurface( name );
612 }
613
614 // -------------------------------------------------------------------------
615 void cpExtensions::QT::SimpleMPRWidget::
616 SetRepresentationToWireframe( const std::string& name )
617 {
618   this->m_XImage->SetRepresentationToWireframe( name );
619   this->m_YImage->SetRepresentationToWireframe( name );
620   this->m_ZImage->SetRepresentationToWireframe( name );
621   this->m_3DView->SetRepresentationToWireframe( name );
622 }
623
624 // -------------------------------------------------------------------------
625 void cpExtensions::QT::SimpleMPRWidget::
626 _SyncBottom( int a, int b )
627 {
628   this->m_UI->Bottom->setSizes( this->m_UI->Top->sizes( ) );
629 }
630
631 // -------------------------------------------------------------------------
632 void cpExtensions::QT::SimpleMPRWidget::
633 _SyncTop( int a, int b )
634 {
635   this->m_UI->Top->setSizes( this->m_UI->Bottom->sizes( ) );
636 }
637
638 #endif // cpExtensions_QT4
639
640 // eof - $RCSfile$