]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.cxx
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / vtkClipping3DDataViewer.cxx
1
2 #include "vtkClipping3DDataViewer.h"
3 #include "vtkDataSetReader.h"
4 #include "vtkProperty.h"
5
6 vtkClipping3DDataViewer::vtkClipping3DDataViewer()
7 {
8         int i;
9         for (i=0; i<VTKMPRDATA_MAXTISSUE; i++){
10                 _visibleTissue[i]               = false;
11                 _representationType[i]  = true;
12         }
13         _visibleVolume=false;
14 }
15 //-------------------------------------------------------------------
16 vtkClipping3DDataViewer::~vtkClipping3DDataViewer()
17 {
18         int i;
19         for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++){
20                 _mCubes[i]->Delete();
21                 _tissueStripper[i]->Delete();
22                 _tissueMapper[i]->Delete();
23                 _tissuePlanes[i]->Delete();
24                 _tissueClipper[i]->Delete();
25         }
26         _outlineData->Delete();
27         _mapOutline->Delete();
28         _outline->Delete();
29         // Volume
30         _tfun->Delete();
31         _ctfun->Delete();
32         _compositeFunction->Delete();
33         _volumeMapper->Delete();
34         _volumeProperty->Delete();
35         _newvol->Delete();
36         _volumePlanes->Delete();
37
38         for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++){
39                 _tissue[i]-> Delete();
40                 _observerS[i]-> Delete();
41         }
42         _observerV-> Delete();
43 }
44 //-------------------------------------------------------------------
45 vtkActor* vtkClipping3DDataViewer::GetOutlineActor()
46 {
47         return _outline;
48 }
49 //-------------------------------------------------------------------
50 vtkClipPolyData* vtkClipping3DDataViewer::GetTissueClipper(int id)
51 {
52         return this->_tissueClipper[id];
53 }
54 //-------------------------------------------------------------------
55 vtkPolyDataMapper* vtkClipping3DDataViewer::GetTissueMapper(int id)
56 {
57         return _tissueMapper[id];
58 }
59 //-------------------------------------------------------------------
60 vtkPlanes* vtkClipping3DDataViewer::GetTissuePlanes(int id)
61 {
62         return _tissuePlanes[id];
63 }
64 //-------------------------------------------------------------------
65 vtkStripper* vtkClipping3DDataViewer::GetTissueStripper(int id)
66 {
67         return _tissueStripper[id];
68 }
69 //-------------------------------------------------------------------
70 void vtkClipping3DDataViewer::Refresh()
71 {
72 //      _volumeMapper->SetClippingPlanes(_volumePlanes);
73
74 //      this->_volumeMapper->Update();
75 //      this->_newvol->Update();
76
77 //      _newvol->VisibilityOn();
78
79         
80 // _volumeMapper = vtkVolumeRayCastMapper::New();
81 //      _volumeMapper->SetInput( this->GetVtkMPRBaseData()->GetImageData() );
82 //      _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
83 //      _volumeMapper->SetClippingPlanes( _volumePlanes );
84 //      _newvol->SetMapper(_volumeMapper );
85
86
87 }
88 //-------------------------------------------------------------------
89 void vtkClipping3DDataViewer::RefreshSurface()
90 {
91         int i;
92         for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++)
93         {
94                 SetIsovalue(i, (int) (GetIsovalue(i)+1) );
95 //              this->GetMCubes(i)->Update();
96         }
97 }
98 //-------------------------------------------------------------------
99 void vtkClipping3DDataViewer::SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata)
100 {
101         _vtkmprbasedata=vtkmprbasedata;
102 }
103 //-------------------------------------------------------------------
104 vtkMPRBaseData* vtkClipping3DDataViewer::GetVtkMPRBaseData()
105 {
106         return _vtkmprbasedata;
107 }
108
109
110 //-------------------------------------------------------------------
111 void vtkClipping3DDataViewer::SetVisibleTissue(int idTissue, bool visible)
112 {
113         _visibleTissue[idTissue]=visible;
114 }
115 //-------------------------------------------------------------------
116 bool vtkClipping3DDataViewer::GetVisibleTissue(int idTissue){
117         return _visibleTissue[idTissue];
118 }
119 //-------------------------------------------------------------------
120 void vtkClipping3DDataViewer::SetRepresentationType(int idTissue, bool representationType)
121 {
122         _representationType[idTissue]=representationType;
123 }
124 //-------------------------------------------------------------------
125 bool vtkClipping3DDataViewer::GetRepresentationType(int idTissue)
126 {
127         return _representationType[idTissue];
128 }
129
130 //-------------------------------------------------------------------
131 vtkActor* vtkClipping3DDataViewer::GetTissueActor(int id){
132         return _tissue[id];
133 }
134
135 //-------------------------------------------------------------------
136 boxSurfaceObserver *vtkClipping3DDataViewer::GetObserverS(int idObserverS)
137 {
138         return _observerS[idObserverS];
139 }
140 //-------------------------------------------------------------------
141 boxSurfaceObserver *vtkClipping3DDataViewer::GetObserverV()
142 {
143         return _observerV;
144 }
145
146 //-------------------------------------------------------------------
147 bool vtkClipping3DDataViewer::GetVisibleVolume()
148 {
149         return _visibleVolume;
150 }
151 //-------------------------------------------------------------------
152 void vtkClipping3DDataViewer::SetVisibleVolume(bool visiblevolume)
153 {
154         _visibleVolume = visiblevolume;
155 }
156
157
158 //-------------------------------------------------------------------
159 void vtkClipping3DDataViewer::Configure_Tissue()
160 {
161
162         double range[2];
163         int i;
164         for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++){
165                 // Visualisation - original volume
166                 vtkImageData *imagedata=_vtkmprbasedata->GetImageData();
167                 imagedata->GetScalarRange( range );
168                 _mCubes[i] = vtkMarchingCubes::New( );
169                 _mCubes[i]->SetInput( imagedata );
170
171                 _mCubes[i]->SetValue( 0, range[1]*(4+i) / 8 );
172 //              _mCubes[i]->SetValue( 0, 1500 );
173
174             _tissueStripper[i] = vtkStripper::New();
175             _tissueStripper[i]->SetInput( _mCubes[i]->GetOutput( ) );
176
177
178
179                 _tissuePlanes[i]  = vtkPlanes::New();
180    
181                 int x1,x2,y1,y2,z1,z2;
182                 imagedata->GetExtent(x1,x2,y1,y2,z1,z2);
183                 _tissuePlanes[i]->SetBounds  (x1,x2,y1,y2,z1,z2);
184                 
185                 _tissueClipper[i] = vtkClipPolyData::New();
186                 _tissueClipper[i]->SetInput( _tissueStripper[i]->GetOutput() );
187                 _tissueClipper[i]->SetClipFunction( _tissuePlanes[i] );
188                 _tissueClipper[i]->InsideOutOn( );
189
190                 _tissueMapper[i] = vtkPolyDataMapper::New( );
191                 _tissueMapper[i]->SetInput( _tissueClipper[i]->GetOutput() );
192                 _tissueMapper[i]->ScalarVisibilityOff( );
193 //              _tissueMapper[i]->Update();
194
195         }
196                 
197
198
199         // vtkActor tissue
200         for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++){
201                 // tissue
202                 _tissue[i] = vtkActor::New();
203                 _tissue[i]->SetMapper( GetTissueMapper(i) );
204                 float cr=1,cg=0.5,cb=0.5;
205                 _tissue[i]->GetProperty()->SetDiffuseColor(cr/255, cg/255   , cb/255   );
206                 _tissue[i]->GetProperty()->SetSpecular(.3);
207                 _tissue[i]->GetProperty()->SetSpecularPower(20);
208                 _tissue[i]->GetProperty()->SetOpacity(0.5);
209                 if (i==0) _tissue[i]->GetProperty()->SetColor(0.85, 0.85   , 0.85   );
210                 if (i==1) _tissue[i]->GetProperty()->SetColor(0, 0  ,  1  );
211                 if (i==2) _tissue[i]->GetProperty()->SetColor(0.85, 0.20   , 0.20   );
212                 if (i==3) _tissue[i]->GetProperty()->SetColor(0, 1   , 0   );
213         }
214
215         for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++)
216         {
217                 _observerS[i] = boxSurfaceObserver::New();
218                 _observerS[i]->SetPlanes( GetTissuePlanes(i) );
219                 _observerS[i]->SetActor( _tissue[i] );
220         }
221
222 }
223
224 //-----------------------------------------------------------------------------
225
226 void vtkClipping3DDataViewer::Configure_Volume()
227 {
228   // Volume
229
230   _tfun = vtkPiecewiseFunction::New();
231   _ctfun = vtkColorTransferFunction::New();
232
233         double range[2];
234         this->_vtkmprbasedata->GetImageData()->GetScalarRange(range);
235         double max = range[1];
236
237         /*
238         adding the poinst of the transference function
239         */
240         //X
241         greyValuesTransferenceFVector.push_back(max * 0/2);  // JPR ?? 0/2
242         greyValuesTransferenceFVector.push_back(max * 1/2);  // JPR ?? division entiere?
243         greyValuesTransferenceFVector.push_back(max * 2/2);
244         //Y
245         intensityValuesTransferenceFVector.push_back(0.0);
246         intensityValuesTransferenceFVector.push_back(1.0);
247         intensityValuesTransferenceFVector.push_back(1.0);
248
249         _tfun->AddPoint(max * 0/2 , 0.0);
250         _tfun->AddPoint(max * 1/2 , 1.0);
251         _tfun->AddPoint(max * 2/2 , 1.0);
252
253         /*
254                 Adding the colors to the vectors        
255         */
256         //RED
257         redColorsOfColorTransferenceFVector.push_back(0.0);
258         redColorsOfColorTransferenceFVector.push_back(1.0);
259         redColorsOfColorTransferenceFVector.push_back(0.0);
260         redColorsOfColorTransferenceFVector.push_back(0.0);
261         redColorsOfColorTransferenceFVector.push_back(0.0);
262
263         //GREEN
264         greenColorsOfColorTransferenceFVector.push_back(0.0);
265         greenColorsOfColorTransferenceFVector.push_back(0.0);
266         greenColorsOfColorTransferenceFVector.push_back(0.0);
267         greenColorsOfColorTransferenceFVector.push_back(1.0);
268         greenColorsOfColorTransferenceFVector.push_back(0.2);
269         
270         //BLUE
271         blueColorsOfColorTransferenceFVector.push_back(0.0);
272         blueColorsOfColorTransferenceFVector.push_back(0.0);
273         blueColorsOfColorTransferenceFVector.push_back(1.0);
274         blueColorsOfColorTransferenceFVector.push_back(0.0);
275         blueColorsOfColorTransferenceFVector.push_back(0.0);
276         //GREY VALUE    
277         greyValueColorsOfColorTransferenceFVector.push_back(max*0/4);
278         greyValueColorsOfColorTransferenceFVector.push_back(max*1/4);
279         greyValueColorsOfColorTransferenceFVector.push_back(max*2/4);
280         greyValueColorsOfColorTransferenceFVector.push_back(max*3/4);
281         greyValueColorsOfColorTransferenceFVector.push_back(max*4/4);
282
283         _ctfun->AddRGBPoint( max*0/4 , 0.0, 0.0, 0.0);
284         _ctfun->AddRGBPoint( max*1/4 , 1.0, 0.0, 0.0);
285         _ctfun->AddRGBPoint( max*2/4 , 0.0, 0.0, 1.0);
286         _ctfun->AddRGBPoint( max*3/4 , 0.0, 1.0, 0.0);
287         _ctfun->AddRGBPoint( max*4/4 , 0.0, 0.2, 0.0);
288
289   _volumePlanes  = vtkPlanes::New();
290 //      int x1,x2,y1,y2,z1,z2;
291 //      vtkImageData *imagedata=_vtkmprbasedata->GetImageData();
292 //      imagedata->GetExtent(x1,x2,y1,y2,z1,z2);
293 //      _volumePlanes->SetBounds(x1,x2,y1,y2,z1,z2);
294
295   _compositeFunction = vtkVolumeRayCastCompositeFunction::New();
296
297   _volumeMapper = vtkVolumeRayCastMapper::New();
298         _volumeMapper->SetInput( this->GetVtkMPRBaseData()->GetImageData() );
299         _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
300         _volumeMapper->SetClippingPlanes( _volumePlanes );
301         _volumeMapper->AutoAdjustSampleDistancesOn();
302
303   _volumeProperty = vtkVolumeProperty::New();
304         _volumeProperty->SetColor(_ctfun);
305         _volumeProperty->SetScalarOpacity( _tfun );
306 // EED 31/03/2008
307         _volumeProperty->SetInterpolationTypeToLinear();
308         _volumeProperty->ShadeOn();
309         _volumeProperty->DisableGradientOpacityOn();
310
311 //      _volumeProperty->SetInterpolationTypeToNearest();
312 //      _volumeProperty->ShadeOff();
313 //      _volumeProperty->SetAmbient(0.3);
314 //      _volumeProperty->SetDiffuse(0.1);
315 //      _volumeProperty->SetSpecular(0.8);
316 //      _volumeProperty->DisableGradientOpacityOn();
317
318   _newvol = vtkVolume::New();
319         _newvol->SetMapper(_volumeMapper );
320         _newvol->SetProperty(_volumeProperty );
321
322   _observerV = boxSurfaceObserver::New();
323         _observerV->SetPlanes( _volumePlanes );
324         _observerV->SetActor( _newvol );
325         _observerV->SetvtkVolumeRayCastMapper( _volumeMapper );
326 }
327
328
329 //-------------------------------------------------------------------
330 void vtkClipping3DDataViewer::Configure()
331 {
332         Configure_Tissue();
333         Configure_Volume();
334
335   // An outline provides context around the data.
336   //
337         _outlineData = vtkOutlineFilter::New();
338     _outlineData->SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
339         _mapOutline = vtkPolyDataMapper::New();
340     _mapOutline->SetInput(_outlineData->GetOutput());
341         _outline = vtkActor::New();
342     _outline->SetMapper(_mapOutline);
343     _outline->GetProperty()->SetColor(0,0,0);
344 }
345
346
347 //-------------------------------------------------------------------
348 void vtkClipping3DDataViewer::SetIsovalue(int idTissue, int isoValue)
349 {
350         _mCubes[idTissue]->SetValue(0, isoValue);
351 }
352 //-------------------------------------------------------------------
353 double vtkClipping3DDataViewer::GetIsovalue(int idTissue)
354 {
355         return _mCubes[idTissue]->GetValue(0);
356 }
357 //-------------------------------------------------------------------
358 vtkVolume* vtkClipping3DDataViewer::GetVolumeActor()
359 {
360    return _newvol;
361 }
362 //-------------------------------------------------------------------
363 vtkVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper(){
364         return _volumeMapper;
365 }
366 //-------------------------------------------------------------------
367 vtkPlanes* vtkClipping3DDataViewer::GetVolumePlanes()
368 {
369         return _volumePlanes;
370 }
371
372 //-------------------------------------------------------------------
373 vtkMarchingCubes *vtkClipping3DDataViewer::GetMCubes(int idTissue)
374 {
375         return _mCubes[idTissue];
376 }
377 //--------------------------------------------------------------------
378 //-------------------
379 //Getters Vectors
380 //-------------------
381
382 std::vector<double>*    vtkClipping3DDataViewer::GetGreyValuesTransferenceFVector()
383 {
384         return &greyValuesTransferenceFVector;
385 }
386 //--------------------------------------------------------------------
387 std::vector<double>*    vtkClipping3DDataViewer::GetIntensityValuesTransferenceFVector()
388 {
389         return &intensityValuesTransferenceFVector;
390 }
391 //--------------------------------------------------------------------
392 std::vector<double>*    vtkClipping3DDataViewer::GetRedColorsOfColorTransferenceFVector()
393 {
394         return &redColorsOfColorTransferenceFVector;
395 }
396 //--------------------------------------------------------------------
397 std::vector<double>*    vtkClipping3DDataViewer::GetGreenColorsOfColorTransferenceFVector()
398 {
399         return &greenColorsOfColorTransferenceFVector;
400 }
401 //--------------------------------------------------------------------
402 std::vector<double>*    vtkClipping3DDataViewer::GetBlueColorsOfColorTransferenceFVector()
403 {       
404         return &blueColorsOfColorTransferenceFVector;
405 }
406 //--------------------------------------------------------------------
407 std::vector<double>*    vtkClipping3DDataViewer::GetGreyValueColorsOfColorTransferenceFVector()
408 {
409         return &greyValueColorsOfColorTransferenceFVector;
410 }
411 //--------------------------------------------------------------------
412 //--------------------------------------
413 //Getters transference function
414 //and color of the transference function
415 //---------------------------------------
416 vtkPiecewiseFunction* vtkClipping3DDataViewer::GetTransferencefunction()
417 {
418         return this->_tfun;
419 }
420 //--------------------------------------------------------------------
421 vtkColorTransferFunction* vtkClipping3DDataViewer::GetColorTransferenceFunction()
422 {
423         return this->_ctfun;
424 }
425
426 //-------------------------------------------------------------------
427
428 void vtkClipping3DDataViewer::ReadVolumeFunctions()
429 {
430 /*
431         int i=0,xi,yi,r,g,b,gValue;
432         vtkImageData *imagedata = this->_vtkmprbasedata->GetImageData();
433         
434         HistogramDialog* hDlg=new HistogramDialog(NULL,_T("Histogram Dialog"),imagedata);
435         // 
436         // put in a method
437         //
438         int tfSize=this->greyValuesTransferenceFVector.size();
439                 if(tfSize>0)
440                 {
441                         int i=0,y;
442                         hDlg->erasePointsTransferenceFunction();
443                         while(i<tfSize)
444                         {
445                                 double g=greyValuesTransferenceFVector[i];
446                                 double in=intensityValuesTransferenceFVector[i];
447                                 hDlg->addPointToTransferenceFunction(g,in*100);
448                                 i++;
449                         }
450                         
451                 }
452
453         int ctfSize=this->redColorsOfColorTransferenceFVector.size();
454         if(ctfSize>0)
455         {
456                 int i=0,y;
457                         while(i<ctfSize)
458                         {
459                                 double gr=greyValueColorsOfColorTransferenceFVector[i];
460                                 double r=redColorsOfColorTransferenceFVector[i];
461                                 double g=greenColorsOfColorTransferenceFVector[i];
462                                 double b=blueColorsOfColorTransferenceFVector[i];
463                                 hDlg->addColorPoint(gr,r*255,g*255,b*255);
464                                 i++;
465                         }
466         }
467         //If it is smooth activate next line
468         //hDlg->updatePlotter();
469         //setting variables if the user wants to do refresh
470         hDlg->setCTF(_ctfun);
471         hDlg->setTF(_tfun);
472         
473         //
474         // when the user had changed the transference Function
475         //
476         if(hDlg->ShowModal()== wxID_OK )
477         {       
478                         // -- vtkPiecewiseFunction --
479                         this->_tfun->RemoveAllPoints();
480                         greyValuesTransferenceFVector.clear();
481                         intensityValuesTransferenceFVector.clear();
482                 
483                         int nTFPoints=hDlg->getSizeTransferenceFunction();
484                         i=0;
485                         while(i<nTFPoints)
486                         {
487                                 hDlg->getTransferenceFunctionPoint(i,xi,yi);
488                                 this->_tfun->AddPoint( xi , yi/100.0 );
489                                 greyValuesTransferenceFVector.push_back(xi);
490                                 intensityValuesTransferenceFVector.push_back(yi/100.0);
491                                 i++;
492                         }       
493                         // -- vtkColorTransferFunction  --
494                         this->_ctfun->RemoveAllPoints ();
495                         //clean colors
496                         redColorsOfColorTransferenceFVector.clear();
497                         greenColorsOfColorTransferenceFVector.clear();
498                         blueColorsOfColorTransferenceFVector.clear();
499                         greyValueColorsOfColorTransferenceFVector.clear();
500
501                         int nCTFpoints=hDlg->getSizeBarColor();
502                         i=0;    
503                         while(i<nCTFpoints)
504                         {
505                                 hDlg->getDataBarColorPoint(i,xi,r,g,b);
506                                 this->_ctfun->AddRGBPoint(xi,r/255.0,g/255.0,b/255.0 );
507                                 redColorsOfColorTransferenceFVector.push_back(r/255.0);
508                                 greenColorsOfColorTransferenceFVector.push_back(g/255.0);
509                                 blueColorsOfColorTransferenceFVector.push_back(b/255.0);
510                                 greyValueColorsOfColorTransferenceFVector.push_back(xi);
511                                 i++;
512                         }
513                         
514                         this->_volumeMapper->Update();
515                         this->_newvol->Update();
516         }
517         
518         else
519         {
520                 
521                 if(hDlg->getRefreshed())
522                 {
523                         int i=0,size;
524                         //--Transference Function----
525                         this->_tfun->RemoveAllPoints();
526                         i=0;
527                         size=greyValuesTransferenceFVector.size();
528                         for(i=0;i<size;i++)
529                         {
530                                 double grey1=greyValuesTransferenceFVector[i];
531                                 double  in2=intensityValuesTransferenceFVector[i];
532                                 this->_tfun->AddPoint( grey1 , in2 );
533                         }
534                         
535                         // -- vtkColorTransferFunction  --
536                         _ctfun->RemoveAllPoints ();
537                         
538                         i=0;
539                         size=greyValueColorsOfColorTransferenceFVector.size();          
540                         for(i=0;i<size;i++)
541                         {
542                                 double grey2=(greyValueColorsOfColorTransferenceFVector)[i];
543                                 double red =(redColorsOfColorTransferenceFVector)[i];
544                                 double green =(greenColorsOfColorTransferenceFVector)[i];
545                                 double blue = (blueColorsOfColorTransferenceFVector)[i];
546                                 _ctfun->AddRGBPoint(grey2,red,green,blue);
547                         }
548                         this->_volumeMapper->Update();
549                         this->_newvol->Update();
550                  }
551                  
552         }
553         hDlg->Destroy();
554 */
555 }
556 /*
557 void vtkClipping3DDataViewer::ReadVolumeFunctions(char *namefile)
558 {
559         char tmp[256];
560         short int       max;
561         double          range[2];
562         double          x,val,r,g,b;
563
564         FILE *ff = fopen ( namefile ,"r");
565
566         // --  MAX  --
567         fscanf(ff,"%s",tmp);
568         if (strcmp(tmp,"MAX")==0)
569         {
570                 vtkImageData *vtkimagedata              = this->_vtkmprbasedata->GetImageData();
571                 vtkimagedata->GetScalarRange(range);
572                 max = (int) (range[1]);
573         } else {
574                 max = atoi(tmp);
575         }
576
577         fscanf(ff,"%s",tmp);   // --
578
579         // -- vtkPiecewiseFunction --
580         this->_tfun->RemoveAllPoints();
581         fscanf(ff,"%s",tmp);   
582         while ( strcmp(tmp,"--")!=0 )
583         {
584                 x=atof(tmp);
585                 fscanf(ff,"%s",tmp);   
586                 val=atof(tmp);
587                 this->_tfun->AddPoint( x*max , val );
588                 fscanf(ff,"%s",tmp);   
589         }
590
591         this->_ctfun->RemoveAllPoints ();
592         // -- vtkColorTransferFunction  --
593         while ( !feof(ff))
594         {
595                 fscanf(ff,"%s",tmp);   
596                 x=atof(tmp);
597                 fscanf(ff,"%s",tmp);   
598                 r=atof(tmp);
599                 fscanf(ff,"%s",tmp);   
600                 g=atof(tmp);
601                 fscanf(ff,"%s",tmp);   
602                 b=atof(tmp);
603                 this->_ctfun->AddRGBPoint( x*max , r,g,b );                     
604         }
605
606
607         this->_volumeMapper->Update();
608         this->_newvol->Update();
609
610
611         fclose(ff);
612 }
613 */
614
615 //-------------------------------------------------------------------
616 // EED 23 Mai 2007
617 void vtkClipping3DDataViewer::ReadMeshVTK(char *namefile)
618 {
619         vtkDataSetReader *reader = vtkDataSetReader::New();
620         reader->SetFileName(namefile);
621         reader->Update();
622         _tissueStripper[3]->SetInput( reader->GetPolyDataOutput()  );
623 }
624
625 void vtkClipping3DDataViewer::setColorTransferFunction(vtkColorTransferFunction* colortable){
626         
627         _volumeProperty->SetColor(colortable);
628         
629 }