X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FvtkMPR3DDataViewer.cxx;fp=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FvtkMPR3DDataViewer.cxx;h=45e4f3869ec476ca0f8295b8eca3fc199be8c3c7;hb=69c806e632999e11e12e8626609f4192d3aec364;hp=242c9bd68a415e957e507a4b342621031bfd4746;hpb=00b3b34355fb96a6cdfcb3502950baac74d0fd0e;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx index 242c9bd..45e4f38 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx @@ -34,7 +34,6 @@ vtkMPR3DDataViewer::vtkMPR3DDataViewer() _visiblePosition[2]=false; _ctfun = NULL; _vtkmprbasedata = NULL; - _ctfun = NULL; _saggitalColors = NULL; _saggital = NULL; @@ -142,9 +141,10 @@ std::vector* vtkMPR3DDataViewer::GetctFunVectorBlue() //------------------------------------------------------------------- void vtkMPR3DDataViewer::SetImage() { - _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() ); - _axialColors->SetInput( _vtkmprbasedata->GetImageData() ); - _coronalColors->SetInput( _vtkmprbasedata->GetImageData() ); + _saggitalColors -> SetInput( _vtkmprbasedata->GetImageData() ); + _axialColors -> SetInput( _vtkmprbasedata->GetImageData() ); + _coronalColors -> SetInput( _vtkmprbasedata->GetImageData() ); + _outlineData -> SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() ); } //------------------------------------------------------------------- @@ -175,10 +175,8 @@ void vtkMPR3DDataViewer::Configure() _satLut->SetValueRange (1, 1); */ - double range[2]; double delta; - if(_vtkmprbasedata->GetImageData()) { _vtkmprbasedata->GetImageData()->Update(); @@ -270,12 +268,8 @@ void vtkMPR3DDataViewer::Configure() } _saggitalColors->RemoveAllInputs(); _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() ); - // _saggitalColors->SetLookupTable(_bwLut); - _saggitalColors->SetLookupTable(_ctfun); - - if(_saggital==NULL) { _saggital = vtkImageActor::New(); @@ -283,22 +277,17 @@ void vtkMPR3DDataViewer::Configure() } //_saggitalColors->Update(); - - // Create the second (axial) plane of the three planes. We use the // same approach as before except that the extent differs. - if(_axialColors==NULL) { _axialColors = vtkImageMapToColors::New(); } - _axialColors->RemoveAllInputs(); _axialColors->SetInput( _vtkmprbasedata->GetImageData() ); // _axialColors->SetLookupTable(_hueLut); _axialColors->SetLookupTable(_ctfun); - if(_axial==NULL) { _axial = vtkImageActor::New(); @@ -306,8 +295,6 @@ void vtkMPR3DDataViewer::Configure() } //_axialColors->Update(); - - // Create the third (coronal) plane of the three planes. We use // the same approach as before except that the extent differs. if(_coronalColors==NULL) @@ -318,15 +305,12 @@ void vtkMPR3DDataViewer::Configure() _coronalColors->SetInput( _vtkmprbasedata->GetImageData() ); // _coronalColors->SetLookupTable(_satLut); _coronalColors->SetLookupTable(_ctfun); - if(_coronal==NULL) { _coronal = vtkImageActor::New(); _coronal->SetInput(_coronalColors->GetOutput()); } - - // An outline provides context around the data. // if(_outlineData==NULL) @@ -354,7 +338,6 @@ void vtkMPR3DDataViewer::Configure() _outline->GetProperty()->SetColor(0,0,0); } } - //int ext[6]; //_vtkmprbasedata->GetImageData()->GetExtent(ext); }