]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp
BUG vtk contours
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / manualContour.cpp
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 );       
 }
 
 // ----------------------------------------------------------------------------