]> Creatis software - creaMaracasVisu.git/commitdiff
BUG vtk contours
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Thu, 7 May 2009 10:22:46 +0000 (10:22 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Thu, 7 May 2009 10:22:46 +0000 (10:22 +0000)
lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx

index e8bd527a41d416506b394e1ea4cce9f39ef77906..af53c28d5423b09f7d35251b4315d741e82f71e7 100644 (file)
@@ -610,6 +610,10 @@ manualContourModel::~manualContourModel()
        }
        _lstPoints.clear();
 
+       _cntSplineX->RemoveAllPoints();
+       _cntSplineY->RemoveAllPoints();
+       _cntSplineZ->RemoveAllPoints();
+       
        _cntSplineX->Delete();
        _cntSplineY->Delete();
        _cntSplineZ->Delete();
@@ -1315,15 +1319,16 @@ vtkActor* manualViewPoint::CreateVtkPointActor()
 
        _pts = vtkPoints::New();
        _pts->SetNumberOfPoints(8);
+
        _pts->SetPoint(0, -1000 , -1000 , 0 );
-       _pts->SetPoint(1,  1000 , -1000 , 0     );
+       _pts->SetPoint(1,  1000 , -1000 , 0 );
        _pts->SetPoint(2,  1000 ,  1000 , 0 );
        _pts->SetPoint(3, -1000 ,  1000 , 0 );
        _pts->SetPoint(4, -1000 ,  1000 , 0 );
        _pts->SetPoint(5, -1000 ,  1000 , 0 );
        _pts->SetPoint(6, -1000 ,  1000 , 0 );
        _pts->SetPoint(7, -1000 ,  1000 , 0 );
-
+       
        vtkCellArray *lines = vtkCellArray::New();
        lines->InsertNextCell(17);
        lines->InsertCellPoint(0);
@@ -1347,17 +1352,17 @@ vtkActor* manualViewPoint::CreateVtkPointActor()
        _pd = vtkPolyData::New();
        _pd->SetPoints( _pts );
        _pd->SetLines( lines );
-       lines->Delete();  //do not delete lines ??
+//     lines->Delete();  //do not delete lines ??
 
        _pointVtkActor  =       vtkActor::New();
     _bboxMapper                =       vtkPolyDataMapper::New();
 
        _bboxMapper->SetInput(_pd);
-       _bboxMapper->ImmediateModeRenderingOn();
+//     _bboxMapper->ImmediateModeRenderingOn();
        _pointVtkActor->SetMapper(_bboxMapper);
-       _pointVtkActor->GetProperty()->BackfaceCullingOn();
+//     _pointVtkActor->GetProperty()->BackfaceCullingOn();
        UpdateColorActor();
-       _pd->ComputeBounds();
+//     _pd->ComputeBounds();
 
        return _pointVtkActor;
 }
@@ -1553,7 +1558,7 @@ void manualViewContour::RefreshText()  // virtual
                }
 
                _textActor->SetInput(resultText);
-
+               
                if (size>=1){
 
                        int i;
@@ -2953,7 +2958,7 @@ void manualViewBaseContour::AddPoint( manualViewPoint * manualViewPoint )
        manualViewPoint->SetSpacing(_spc);
 
        vtkActor *actor = manualViewPoint->CreateVtkPointActor();
-       _wxvtkbaseview->GetRenderer()->AddActor( actor );
+       _wxvtkbaseview->GetRenderer()->AddActor( actor );       
 }
 
 // ----------------------------------------------------------------------------
index 8585c97927c017c297bfaa3e3b79651465bfadc0..7bbda0afddaf0f87117dbe6ac11cff696a48df19 100644 (file)
@@ -1498,6 +1498,7 @@ bool vtkInfoTextImageInteractor::OnMouseMove()
        double xx=X,yy=Y,zz=z;
        _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->TransfromeCoordScreenToWorld(xx,yy,zz);
 
+       
        GetVtkInfoTextImage()->PutWindowLevel();
        GetVtkInfoTextImage()->PutColorLevel();
        GetVtkInfoTextImage()->PutPosition( (int)xx , (int)yy , (int)zz );