From 53c898cabe15ab173f0574689ff707930a01099f Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Thu, 7 May 2009 10:22:46 +0000 Subject: [PATCH] BUG vtk contours --- .../src/interface/wxWindows/manualContour.cpp | 21 ++++++++++++------- .../wxWindows/widgets/wxVtkBaseView.cxx | 1 + 2 files changed, 14 insertions(+), 8 deletions(-) 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 ); } // ---------------------------------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx index 8585c97..7bbda0a 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx @@ -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 ); -- 2.46.0