X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2FmanualContour.cpp;h=af53c28d5423b09f7d35251b4315d741e82f71e7;hb=8b75d0d7ee7c2aed68f1663282127c8e9932e705;hp=e8bd527a41d416506b394e1ea4cce9f39ef77906;hpb=917efb35310973ce696b887dc1701f0cd453d91d;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp index e8bd527..af53c28 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp @@ -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 ); } // ----------------------------------------------------------------------------