]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx
849a6e7889d9586f4eb7e9f04d86b72d74432f35
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxVtkMPR2DView.cxx
1 #include "wxVtkMPR2DView.h"
2
3 #include "vtkInteractorStyleBaseView.h"
4
5 #include "vtkCellArray.h"
6 #ifdef WIN32
7 #include <mathdefs.h>
8 using namespace gtm;
9 #endif
10
11 wxVtkMPR2DView::wxVtkMPR2DView( wxWindow *parent, int direction)
12  :wxVtk2DBaseView(parent)
13 {
14         _backX                  = -99999;
15         _backY                  = -99999;
16         _backZ                  = -99999;
17         _direction              = direction;
18         _ptsA                   = NULL;
19         _lineAActor             = NULL;
20         _lineAMapper    = NULL;
21         _pdA                    = NULL;
22         _ptsB                   = NULL;
23         _lineBActor             = NULL;
24         _lineBMapper    = NULL;
25         _pdB                    = NULL;
26         _interactorstylemprview = NULL;
27 }
28
29 //-------------------------------------------------------------------
30 wxVtkMPR2DView::~wxVtkMPR2DView()
31 {
32         if (_ptsA!=NULL)            { _ptsA                 -> Delete(); }
33         if (_lineAActor!=NULL)  { _lineAActor   -> Delete(); }
34         if (_lineAMapper!=NULL) { _lineAMapper  -> Delete(); }
35         if (_pdA!=NULL)             { _pdA                  -> Delete(); }
36         if (_ptsB!=NULL)            { _ptsB                 -> Delete(); }
37         if (_lineBActor!=NULL)  { _lineBActor   -> Delete(); }
38         if (_lineBMapper!=NULL) { _lineBMapper  -> Delete(); }
39         if (_pdB!=NULL)             { _pdB                  -> Delete(); }
40 }
41 //-------------------------------------------------------------------
42 vtkMPRBaseData *wxVtkMPR2DView::GetVtkmprbasedata()
43 {
44         return (vtkMPRBaseData*)GetVtkBaseData();
45 }
46 //-------------------------------------------------------------------
47 void wxVtkMPR2DView::Configure(){
48         wxVtk2DBaseView::Configure();
49
50
51         int x1,x2,y1,y2,z1,z2;
52         GetVtkmprbasedata()     -> GetDimensionExtention(&x1,&x2,&y1,&y2,&z1,&z2);
53
54         double spc[3];
55         vtkImageData* img =  GetVtkmprbasedata()->GetImageData();
56         if(_interactorstylemprview==NULL)
57         {
58                 _interactorstylemprview = new vtkInteractorStyleMPRView();
59                 ((vtkInteractorStyleBaseView*)GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _interactorstylemprview );
60         }
61
62         if(img!=NULL){
63                 double* origin = img->GetOrigin();
64                 img->GetExtent(x1,x2,y1,y2,z1,z2);
65                 img->GetSpacing(spc);
66                 x1 += origin[0];
67                 x2 += origin[0];
68                 y1 += origin[1];
69                 y2 += origin[1];
70                 z1 += origin[2];
71                 z2 += origin[2];
72                 x1 = (int)(x1*spc[0]);
73                 y1 = (int)(y1*spc[1]);
74                 z1 = (int)(z1*spc[2]);
75
76                 x2 = (int)(x2*spc[0]);
77                 y2 = (int)(y2*spc[1]);
78                 z2 = (int)(z2*spc[2]);
79
80                 _visibleAxis = true;
81
82
83
84         }
85
86         // Axe A
87         if(_lineAActor==NULL){
88                 _lineAActor = vtkActor::New();
89                 _lineAActor->GetProperty()->SetDiffuseColor(1,0,0);
90                 _lineAActor->GetProperty()->SetLineWidth(0.5);
91
92                 _ptsA = vtkPoints::New();
93                 _ptsA->SetNumberOfPoints(2);
94                 _ptsA->SetPoint(0, -1000        , -1000 , -1000 );
95                 _ptsA->SetPoint(1,  1000        ,  1000 ,  1000 );
96
97                 _pdA = vtkPolyData::New();
98
99                 _lineAMapper = vtkPolyDataMapper::New();
100
101                 _lineAMapper->SetInput(_pdA);
102                 _lineAMapper->ImmediateModeRenderingOn();
103                 _lineAActor->SetMapper(_lineAMapper);
104         }
105
106         vtkCellArray *linesA = vtkCellArray::New();
107         linesA->InsertNextCell(2);
108         linesA->InsertCellPoint(0);
109         linesA->InsertCellPoint(1);
110         _pdA->SetPoints( _ptsA );
111         _pdA->SetLines( linesA );
112         linesA->Delete();  //do not delete lines ??
113 //              _lineAActor->GetProperty()->BackfaceCullingOn();
114
115
116 // Axe B
117         if(_lineBActor==NULL){
118                 _lineBActor                                             =       vtkActor::New();
119                 _lineBActor->GetProperty()->SetDiffuseColor(1,0,0);
120                 _lineBActor->GetProperty()->SetLineWidth(0.5);
121                 _lineBMapper                                    =       vtkPolyDataMapper::New();
122                 _lineBActor->SetMapper(_lineBMapper);
123
124                 _ptsB = vtkPoints::New();
125                 _ptsB->SetNumberOfPoints(2);
126                 _ptsB->SetPoint(0, -1000        , -1000 , -1000 );
127                 _ptsB->SetPoint(1,  1000        ,  1000 ,  1000 );
128
129 //              _lineBActor->GetProperty()->BackfaceCullingOn();
130         }
131
132         vtkCellArray *linesB;
133         linesB = vtkCellArray::New();
134         linesB->InsertNextCell(2);
135         linesB->InsertCellPoint(0);
136         linesB->InsertCellPoint(1);
137         _pdB = vtkPolyData::New();
138         _pdB->SetPoints( _ptsB );
139         _pdB->SetLines( linesB );
140         linesB->Delete();  //do not delete lines ??
141
142
143         _lineBMapper->SetInput(_pdB);
144         _lineBMapper->ImmediateModeRenderingOn();
145
146
147         if(_imageViewer2XYZ){
148                 _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
149                 _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineBActor );
150                 vtkCamera *camera =_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->GetActiveCamera();
151
152         //EED 17Avril2009
153     //EED 21 mars 2012  FLIP problem  ..PLOP..
154
155                 if (_direction==0) {  // YZ
156                         camera->SetViewUp               (   0   ,    0          ,     1         );
157                         camera->SetPosition             ( 10000,(y1+y2)/2       , (z1+z2)/2     );
158                         camera->SetFocalPoint   (   0   , (y1+y2)/2     , (z1+z2)/2     );
159                         camera->SetParallelScale( (z2-z1)/3.0 );
160                 }
161
162                 if (_direction==1) { // XZ
163                         camera->SetViewUp               (       0               ,       0       ,       1               );
164                         camera->SetPosition             ((x1+x2)/2      , -10000        , (z1+z2)/2     );
165                         camera->SetFocalPoint   ((x1+x2)/2      ,   0   , (z1+z2)/2     );
166                         camera->SetParallelScale( (x2-x1)/3.0 );
167                 }
168
169                 if (_direction==2) {  // XY
170                         camera->SetViewUp               (       0               ,       -1              ,       0       );
171                         camera->SetPosition             ((x1+x2)/2      , (y1+y2)/2     , -10000);
172                         camera->SetFocalPoint   ((x1+x2)/2      , (y1+y2)/2     ,       0       );
173                         camera->SetParallelScale( (x2-x1)/3.0 );
174                 }
175
176 /*
177                 if (_direction==0) {    // YZ
178                         camera->SetViewUp               (   0   ,     1         ,     0         );
179                         camera->SetPosition             (  10000,(y1+y2)/2      , (z1+z2)/2     );
180                         camera->SetFocalPoint   (   0   , (y1+y2)/2     , (z1+z2)/2     );
181                         camera->SetParallelScale( (z2-z1)/3.0 );
182                 }
183
184                 if (_direction==1) {    // XZ
185                         camera->SetViewUp               (       0               ,       0       ,       -1              );
186                         camera->SetPosition             ((x1+x2)/2      , 10000 , (z1+z2)/2     );
187                         camera->SetFocalPoint   ((x1+x2)/2      ,   0   , (z1+z2)/2     );
188                         camera->SetParallelScale( (x2-x1)/3.0 );
189                 }
190
191                 if (_direction==2) {    // XY
192                         camera->SetViewUp               (       0               ,       1               ,       0       );
193                         camera->SetPosition             ((x1+x2)/2      , (y1+y2)/2     ,  10000);
194                         camera->SetFocalPoint   ((x1+x2)/2      , (y1+y2)/2     ,       0       );
195                         camera->SetParallelScale( (x2-x1)/3.0 );
196                 }
197 */
198
199         //      _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow (160);
200         //      _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel (800);
201         }
202
203 }
204
205 void wxVtkMPR2DView::SetVisibleAxis(bool ok)
206 {
207         if (ok!=_visibleAxis)
208         {
209                 _visibleAxis=ok;
210                 if (_visibleAxis==true)
211                 {
212                         _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
213                         _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineBActor );
214                 }
215                 if (_visibleAxis==false)
216                 {
217                         _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->RemoveActor( _lineAActor );
218                         _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->RemoveActor( _lineBActor );
219                 }
220
221         }
222 }
223
224 //-------------------------------------------------------------------
225 void wxVtkMPR2DView::Refresh()
226 {
227
228
229         //wxVtk2DBaseView::Refresh();
230
231
232         //vtkImageViewer2 *IV2=_imageViewer2XYZ->GetVtkImageViewer2(); // JPRx
233         //vtkCamera *camera = IV2->GetRenderer()->GetActiveCamera(); // JPRx
234
235
236         int x1 = 0,x2 = 0,y1 = 0,y2 = 0,z1 = 0,z2 = 0;
237         int x = 0, y = 0, z = 0;
238         int xx = 0, yy = 0, zz = 0;
239         double *spc     = 0;
240         double *origin  = 0;
241         
242         double xx1,yy1,zz1,xx2,yy2,zz2;
243         
244
245         //GetVtkmprbasedata()->GetDimensionExtention(&x1,&x2,&y1,&y2,&z1,&z2);
246
247
248         vtkImageData* img = GetVtkmprbasedata()->GetImageData();
249         if(img!=NULL){
250                 origin = img->GetOrigin();
251                 img->GetExtent(x1,x2,y1,y2,z1,z2);
252                 spc = img->GetSpacing();
253                 x1 += origin[0];
254                 x2 += origin[0];
255                 y1 += origin[1];
256                 y2 += origin[1];
257                 z1 += origin[2];
258                 z2 += origin[2];
259                 
260                 xx1 =           x1*spc[0];
261                 yy1 =           y1*spc[1];
262                 zz1 =           z1*spc[2];
263                 
264                 xx2 =           x2*spc[0];
265                 yy2 =           y2*spc[1];
266                 zz2 =           z2*spc[2];
267                 
268                 x1 = (int)(x1*spc[0]);
269                 y1 = (int)(y1*spc[1]);
270                 z1 = (int)(z1*spc[2]);
271                 
272                 x2      = (int)(x2*spc[0]);
273                 y2      = (int)(y2*spc[1]);
274                 z2      = (int)(z2*spc[2]);
275
276                 xx = (int)(GetVtkmprbasedata()->GetX());
277                 yy = (int)(GetVtkmprbasedata()->GetY());
278                 zz = (int)(GetVtkmprbasedata()->GetZ());
279
280                 x =  round(xx*spc[0]);
281                 y =  round(yy*spc[1]);
282                 z =  round(zz*spc[2]);
283                 
284                 if ((xx!=_backX) || (yy!=_backY) || (zz!=_backZ)) {
285
286                         if (_direction==0) {    // YZ
287                                 if(_imageViewer2XYZ)
288                                 {
289                                         _imageViewer2XYZ->SetXSlice( (int)(GetVtkmprbasedata()->GetX()) );
290                                 }
291 //EED 21 mars 2012  FLIP probleme  ..PLOP..
292                                 //_ptsA->SetPoint(0, x2, y1  , z );
293                                 //_ptsA->SetPoint(1, x2, y2  , z );
294                                 //_ptsB->SetPoint(0, x2, y   , z1);
295                                 //_ptsB->SetPoint(1, x2, y   , z2);
296                                 _ptsA->SetPoint(0, xx2, yy1  , z  );
297                                 _ptsA->SetPoint(1, xx2, yy2  , z  );
298                                 _ptsB->SetPoint(0, xx2, y    , zz1);
299                                 _ptsB->SetPoint(1, xx2, y    , zz2);
300                         }
301                         if (_direction==1) {    // XZ
302                                 if(_imageViewer2XYZ)
303                                 {
304                                         _imageViewer2XYZ->SetYSlice( (int)(GetVtkmprbasedata()->GetY()) );
305                                 }
306 //EED 21 mars 2012  FLIP probleme  ..PLOP..
307                             //_ptsA->SetPoint(0, x1 , y2 , z );
308                                 //_ptsA->SetPoint(1, x2 , y2 , z );
309                                 //_ptsB->SetPoint(0, x  , y2 , z1);
310                                 //_ptsB->SetPoint(1, x  , y2 , z2);
311                             _ptsA->SetPoint(0, xx1 , y1 , z  );
312                                 _ptsA->SetPoint(1, xx2 , y1 , z  );
313                                 _ptsB->SetPoint(0, x   , y1 , zz1);
314                                 _ptsB->SetPoint(1, x   , y1 , zz2);
315                         }
316                         if (_direction==2) {    // XY
317                                 if(_imageViewer2XYZ)
318                                 {
319                                         _imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) );
320                                 }
321                         //      _ptsA->SetPoint(0, x1 , y , -z2 );
322                         //      _ptsA->SetPoint(1, x2 , y , -z2 );
323                         //      _ptsB->SetPoint(0, x  , y1, -z2 );
324                         //      _ptsB->SetPoint(1, x  , y2, -z2 );
325
326                                 
327 //EED 21 mars 2012  FLIP probleme  ..PLOP..
328                                 //_ptsA->SetPoint(0, x1 , y , z2 );
329                                 //_ptsA->SetPoint(1, x2 , y , z2 );
330                                 //_ptsB->SetPoint(0, x  , y1, z2 );
331                                 //_ptsB->SetPoint(1, x  , y2, z2 );
332                                 
333                                 _ptsA->SetPoint(0, xx1 , y  , z1 );
334                                 _ptsA->SetPoint(1, xx2 , y  , z1 );
335                                 _ptsB->SetPoint(0, x   , yy1, z1 );
336                                 _ptsB->SetPoint(1, x   , yy2, z1 );
337                                 
338                                 
339                         }
340                         _backX=xx;
341                         _backY=yy;
342                         _backZ=zz;
343                 }
344
345 //EED 24oct2010
346 _imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel()->Modified();
347
348                 wxVtkBaseView::Refresh();
349         }
350 }
351 //-------------------------------------------------------------------
352 int wxVtkMPR2DView::GetActualSlice()   // virtual
353 {
354         int result;
355         if (_direction==0)
356         {
357                 result = (int)(GetVtkmprbasedata()->GetX());
358         }
359         if (_direction==1)
360         {
361                 result = (int)(GetVtkmprbasedata()->GetY());
362         }
363         if (_direction==2)
364         {
365                 result = (int)(GetVtkmprbasedata()->GetZ());
366         }
367         return result;
368 }
369 //-------------------------------------------------------------------
370 void wxVtkMPR2DView::SetActualSlice(int slice)   // virtual
371 {
372         if (_direction==0)
373         {
374                 GetVtkmprbasedata()->SetX(slice);
375         }
376         if (_direction==1)
377         {
378                 GetVtkmprbasedata()->SetY(slice);
379         }
380         if (_direction==2)
381         {
382                 GetVtkmprbasedata()->SetZ(slice);
383         }
384 }
385 //-------------------------------------------------------------------
386 bool wxVtkMPR2DView::IfMouseTouchX(double x, double y, double z)
387 {
388         double delta=5;
389         bool result=false;
390         if (_direction==0)
391         {
392         }
393         if (_direction==1)
394         {
395                 if (( x<GetVtkmprbasedata()->GetX()+delta ) && ( x>GetVtkmprbasedata()->GetX()-delta ))
396                 {
397                         result = true;
398                 }
399         }
400         if (_direction==2)
401         {
402                 if (( x<GetVtkmprbasedata()->GetX()+delta ) && ( x>GetVtkmprbasedata()->GetX()-delta ))
403                 {
404                         result = true;
405                 }
406         }
407         return result;
408 }
409 //-------------------------------------------------------------------
410 bool wxVtkMPR2DView::IfMouseTouchY(double x, double y, double z)
411 {
412         double delta=5;
413         bool result=false;
414         if (_direction==0)
415         {
416                 if (( y<GetVtkmprbasedata()->GetY()+delta ) && ( y>GetVtkmprbasedata()->GetY()-delta ))
417                 {
418                         result = true;
419                 }
420         }
421         if (_direction==1)
422         {
423         }
424         if (_direction==2)
425         {
426                 if (( y<GetVtkmprbasedata()->GetY()+delta ) && ( y>GetVtkmprbasedata()->GetY()-delta ))
427                 {
428                         result = true;
429                 }
430         }
431         return result;
432 }
433 //-------------------------------------------------------------------
434 bool wxVtkMPR2DView::IfMouseTouchZ(double x, double y, double z)
435 {
436         double delta=5;
437         bool result=false;
438         if (_direction==0)
439         {
440                 if (( z<GetVtkmprbasedata()->GetZ()+delta ) && ( z>GetVtkmprbasedata()->GetZ()-delta ))
441                 {
442                         result = true;
443                 }
444         }
445         if (_direction==1)
446         {
447                 if (( z<GetVtkmprbasedata()->GetZ()+delta ) && ( z>GetVtkmprbasedata()->GetZ()-delta ))
448                 {
449                         result = true;
450                 }
451         }
452         if (_direction==2)
453         {
454         }
455         return result;
456 }
457 //-------------------------------------------------------------------
458 void wxVtkMPR2DView::MoveX(double x, double y, double z)
459 {
460         if (_direction==0)
461         {
462         }
463         if (_direction==1)
464         {
465                 GetVtkmprbasedata()->SetX(x);
466         }
467         if (_direction==2)
468         {
469                 GetVtkmprbasedata()->SetX(x);
470         }
471 }
472 //-------------------------------------------------------------------
473 void wxVtkMPR2DView::MoveY(double x, double y, double z)
474 {
475         if (_direction==0)
476         {
477                 GetVtkmprbasedata()->SetY(y);
478         }
479         if (_direction==1)
480         {
481         }
482         if (_direction==2)
483         {
484                 GetVtkmprbasedata()->SetY(y);
485         }
486 }
487 //-------------------------------------------------------------------
488 void wxVtkMPR2DView::MoveZ(double x, double y, double z)
489 {
490         if (_direction==0)
491         {
492                 GetVtkmprbasedata()->SetZ(z);
493         }
494         if (_direction==1)
495         {
496                 GetVtkmprbasedata()->SetZ(z);
497         }
498         if (_direction==2)
499         {
500         }
501 }
502 //-------------------------------------------------------------------
503 void wxVtkMPR2DView::ChangeAxisColor(double x, double y, double z)
504 {
505         double c1r=1,c1g=1,c1b=0;
506         double c2r=1,c2g=0,c2b=0;
507
508         if (_direction==0)
509         {
510                 if (IfMouseTouchY(x,y,z)==true)
511                 {
512                         _lineBActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
513                 } else {
514                         _lineBActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
515                 }
516                 if (IfMouseTouchZ(x,y,z)==true)
517                 {
518                         _lineAActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
519                 } else {
520                         _lineAActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
521                 }
522         }
523
524         if (_direction==1)
525         {
526                 if (IfMouseTouchX(x,y,z)==true)
527                 {
528                         _lineBActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
529                 } else {
530                         _lineBActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
531                 }
532                 if (IfMouseTouchZ(x,y,z)==true)
533                 {
534                         _lineAActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
535                 } else {
536                         _lineAActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
537                 }
538         }
539
540         if (_direction==2)
541         {
542                 if (IfMouseTouchX(x,y,z)==true)
543                 {
544                         _lineBActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
545                 } else {
546                         _lineBActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
547                 }
548                 if (IfMouseTouchY(x,y,z)==true)
549                 {
550                         _lineAActor->GetProperty()->SetDiffuseColor(c1r,c1g,c1b);
551                 } else {
552                         _lineAActor->GetProperty()->SetDiffuseColor(c2r,c2g,c2b);
553                 }
554         }
555         Refresh();
556 }
557
558
559 //EED 5 juin 2009
560 //void wxVtkMPR2DView::TransfromCoordViewWorld(double &X, double &Y, double &Z, int type) // virtual
561 void wxVtkMPR2DView::TransFromCoordScreenToWorld(double &X, double &Y, double &Z, bool keepNormalDirection, int type) //virtual //keepNormalDirection=false, type=2
562 {
563
564         wxVtkBaseView::TransFromCoordScreenToWorld(X,Y,Z,keepNormalDirection,_direction);
565
566         if ((_direction==0) && (keepNormalDirection==true) )
567         {
568                 X = ((vtkMPRBaseData*)GetVtkBaseData())->GetX();
569         }
570
571         if ((_direction==1) && (keepNormalDirection==true) )
572         {
573                 Y = ((vtkMPRBaseData*)GetVtkBaseData())->GetY();
574         }
575
576         if ((_direction==2) && (keepNormalDirection==true) )
577         {
578                 Z = ((vtkMPRBaseData*)GetVtkBaseData())->GetZ();
579         }
580
581 }
582
583 //-------------------------------------------------------------------
584 int wxVtkMPR2DView::GetDirection() // virtual
585 {
586     return _direction;
587 }
588
589
590 //-------------------------------------------------------------------
591 //-------------------------------------------------------------------
592 //-------------------------------------------------------------------
593 //void boxVolumeObserver::Execute(vtkObject *wdg, unsigned long eventId, void* calldata) {  // virtual
594 //      if (eventId==vtkCommand::StartInteractionEvent){
595 //              _renWin->SetDesiredUpdateRate(10);
596 //      }
597 //      if (eventId==vtkCommand::InteractionEvent){
598 //              _renWin->SetDesiredUpdateRate(0.001);
599 //      }
600 //      if (eventId==vtkCommand::EndInteractionEvent){
601 //              vtkPlanes *planes = vtkPlanes::New();
602 //              vtkBoxWidget *boxwidget = reinterpret_cast<vtkBoxWidget*>(wdg);
603 //              boxwidget->GetPlanes(planes);
604 //              _volumeMapper->SetClippingPlanes(planes);
605 //              planes -> Delete();
606 //      }
607 //}
608
609 //-------------------------------------------------------------------
610 //void boxVolumeObserver::SetRenWin( vtkRenderWindow *renWin ){
611 //      _renWin = renWin;
612 //}
613 //-------------------------------------------------------------------
614 //void boxVolumeObserver::SetVolumeMapper(vtkVolumeRayCastMapper *volumeMapper){
615 //      _volumeMapper = volumeMapper;
616 //}