//int manualViewCircle::GetType() 3;
//int manualViewStar::GetType() 4;
//int manualViewLine::GetType() 6;
+//int manualViewPoints::GetType() 7;
return 0;
// ----------------------------------------------------------------------------
void manualViewBaseContour::ConstructVTKObjects()
{
+
+
//JSTG 29-02-08 -----------------------------------------------
//int i , nps = _sizePointsContour;
int i;
int nps = _manContModel->GetNumberOfPointsSpline();
//-------------------------------------------------------------
+
DeleteVtkObjects();
_pts = vtkPoints::New();
_pts->SetNumberOfPoints(nps);
-
for (i=0 ; i<nps ; i++){
_pts->SetPoint(i, 0 , 0 , 0 );
}
// This is for the boundaring inicialisation
//EED 29Mars2009
- _pts->SetPoint(0, 0 , 0 , -1000 );
- _pts->SetPoint(1, 0 , 0 , 1000 );
-// _pts->SetPoint(0, -1000 , -1000 , -1000 );
-// _pts->SetPoint(1, 1000 , 1000 , 1000 );
-
+ //_pts->SetPoint(0, 0 , 0 , -1000 );
+ //_pts->SetPoint(1, 0 , 0 , 1000 );
+ _pts->SetPoint(0, -1000 , -1000 , -1000 );
+ _pts->SetPoint(1, 1000 , 1000 , 1000 );
vtkCellArray *lines = vtkCellArray::New();
lines->InsertNextCell( nps /* +1 */ );
for ( i=0 ; i<nps+1 ; i++ ){
lines->InsertCellPoint(i % nps );
}
-
_pd = vtkPolyData::New();
_pd->SetPoints( _pts );
_pd->SetLines( lines );
_bboxMapper = vtkPolyDataMapper::New();
_bboxMapper->ScalarVisibilityOff( );
+
_bboxMapper->SetInput(_pd);
_bboxMapper->ImmediateModeRenderingOn();
_contourVtkActor->SetMapper(_bboxMapper);
_contourVtkActor->GetProperty()->BackfaceCullingOff();
+
UpdateColorActor();
_pd->ComputeBounds();
+ InitTextActor();
+
+
+}
+
+void manualViewBaseContour::InitTextActor()
+{
// Text
_textActor = vtkTextActor::New();
// _textActor->SetDisplayPosition(200, 200);
tprop->SetFontFamilyToArial();
tprop->SetColor(0, 0, 1);
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::CreateNewContour()
{
bool result=false;
SetPosibleSelected(result);
int id = GetIdPoint(x,y,z);
+
if( !GetEditable() && !_selected && id!= -1)
{
result=true;
- SetPosibleSelected(result);
+ _posibleSelected=true;
}
else
{
}
}
-
}
return result;
}
Refresh();
}
// ----------------------------------------------------------------------------
-void manualViewBaseContour::SetModel(manualContourModel *manContModel){
+void manualViewBaseContour::SetModel(manualBaseModel *manContModel){
_manContModel=manContModel;
}
// ----------------------------------------------------------------------------