}
_lstPoints.clear();
+ _cntSplineX->RemoveAllPoints();
+ _cntSplineY->RemoveAllPoints();
+ _cntSplineZ->RemoveAllPoints();
+
_cntSplineX->Delete();
_cntSplineY->Delete();
_cntSplineZ->Delete();
_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);
_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;
}
// ----------------------------------------------------------------------------
void manualViewContour::RefreshText() // virtual
{
-
if ((_textActor!=NULL) && ( _textActor->GetProperty()->GetOpacity()!=0 )){
int size = GetNumberOfPoints();
char text[50];
}
_textActor->SetInput(resultText);
-
+
if (size>=1){
int i;
// Text
_textActor = vtkTextActor::New();
// _textActor->SetDisplayPosition(200, 200);
- _textActor->SetInput("");
+ _textActor->SetInput("00");
// Set coordinates to match the old vtkScaledTextActor default value
// _textActor->GetPosition2Coordinate()->SetCoordinateSystemToNormalizedViewport();
// _textActor->GetPosition2Coordinate()->SetValue( 0.2 , 0.2 );
manualViewPoint->SetSpacing(_spc);
vtkActor *actor = manualViewPoint->CreateVtkPointActor();
- _wxvtkbaseview->GetRenderer()->AddActor( actor );
+ _wxvtkbaseview->GetRenderer()->AddActor( actor );
}
// ----------------------------------------------------------------------------
void manualViewBaseContour::RefreshText() // virtual
{
if( _textActor!=NULL)
- _textActor -> SetInput(" ");
+ _textActor -> SetInput("00");
}
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetColorNormalContour(double r, double g, double b)
{
opacity=1;
} else {
- opacity=0;
+ opacity=0.5;
}
-
vtkActor *actor;
int i,size=_lstViewPoints.size();
for (i=0;i<size;i++){
}
_contourVtkActor->GetProperty()->SetOpacity( opacity );
_textActor->GetProperty()->SetOpacity( opacity );
- _textActor->SetInput(" ");
+ _textActor->SetInput("00");
}
// ----------------------------------------------------------------------------
_show_text = ok;
if (_show_text==false)
{
- _textActor->SetInput(" ");
+ _textActor->SetInput("00");
}
}
// ----------------------------------------------------------------------------
if (!IsEditable())
{
GetManualViewBaseContour()->RemoveControlPoints();
- GetManualViewBaseContour()->RemoveTextActor();
+// GetManualViewBaseContour()->RemoveTextActor();
GetManualViewBaseContour()->Refresh();
this->_vtkInteractorStyleBaseView->SetRefresh_waiting();
}
AddPoint(x,y,z);
AddPoint(x,y,z);
bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z);
- SetState(5);
+ SetState(1);
}
}
GetManualViewBaseContour()->SelectPosibleContour(x,y,z);
GetManualViewBaseContour()->SelectPosiblePoint(x,y,z);
- if (GetState()==5){
+
+ if ( (GetState()==5) || (GetState()==1) ){
SetPoint( bakIdPoint , x , y ,z);
if (bakIdPoint==0)
{
AddPoint(x,y,z);
AddPoint(x,y,z);
bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z);
- SetState(5);
+ SetState(1);
}
}
GetManualViewBaseContour()->SelectPosibleContour(x,y,z);
GetManualViewBaseContour()->SelectPosiblePoint(x,y,z);
- if (GetState()==5){
- SetPoint( bakIdPoint , x , y ,z);
- }
+ if (GetState()==1){ SetPoint( bakIdPoint , x , y ,z); }
+ if (GetState()==5){ SetPoint( bakIdPoint , x , y ,z); }
+
if (GetState()==6){
GetManualViewBaseContour()->MoveContour(x,y,z);
}
AddPoint(x,y,z);
AddPoint(x,y,z);
bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z);
- SetState(5);
+ SetState(1);
}
}
GetManualViewBaseContour()->SelectPosibleContour(x,y,z);
GetManualViewBaseContour()->SelectPosiblePoint(x,y,z);
- if (GetState()==5)
- {
- SetPoint( bakIdPoint , x , y ,z);
- }
+ if (GetState()==1) { SetPoint( bakIdPoint , x , y ,z); }
+ if (GetState()==5) { SetPoint( bakIdPoint , x , y ,z); }
+
if (GetState()==6)
{
GetManualViewBaseContour()->MoveContour(x,y,z);