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