-
- myScalarBarActor->SetLabelTextProperty( aScalarBarLabelProp );
- aScalarBarLabelProp->Delete();
-
- bool horiz = ( mgr->integerValue( "SMESH", "scalar_bar_orientation" ) == 1 );
- QString name = QString( "scalar_bar_%1_" ).arg( horiz ? "horizontal" : "vertical" );
- if( horiz )
- myScalarBarActor->SetOrientationToHorizontal();
- else
- myScalarBarActor->SetOrientationToVertical();
-
-
- float aXVal = horiz ? 0.20 : 0.01;
- if( mgr->hasValue( "SMESH", name + "x" ) )
- aXVal = mgr->doubleValue( "SMESH", name + "x", aXVal );
-
- float aYVal = horiz ? 0.01 : 0.1;
- if( mgr->hasValue( "SMESH", name + "y" ) )
- aYVal = mgr->doubleValue( "SMESH", name + "y", aYVal );
- myScalarBarActor->SetPosition( aXVal, aYVal );
-
- float aWVal = horiz ? 0.60 : 0.10;
- if( mgr->hasValue( "SMESH", name + "width" ) )
- aWVal = mgr->doubleValue( "SMESH", name + "width", aWVal );
- myScalarBarActor->SetWidth( aWVal );
-
- float aHVal = horiz ? 0.12 : 0.80;
- if( mgr->hasValue( "SMESH", name + "height" ) )
- aHVal = mgr->doubleValue( "SMESH", name + "height", aHVal );
- myScalarBarActor->SetHeight( aHVal );
-
- int anIntVal = 5;
- if( mgr->hasValue( "SMESH", "scalar_bar_num_labels" ) )
- anIntVal = mgr->integerValue( "SMESH", "scalar_bar_num_labels", anIntVal );
- myScalarBarActor->SetNumberOfLabels( anIntVal == 0 ? 5: anIntVal );
-
- anIntVal = 64;
- if( mgr->hasValue( "SMESH", "scalar_bar_num_colors" ) )
- anIntVal = mgr->integerValue( "SMESH", "scalar_bar_num_colors", anIntVal );
- myScalarBarActor->SetMaximumNumberOfColors( anIntVal == 0 ? 64 : anIntVal );
-
-
- //Definition of points numbering pipeline
- //---------------------------------------
- myPointsNumDataSet = vtkUnstructuredGrid::New();
-
- myPtsMaskPoints = vtkMaskPoints::New();
- myPtsMaskPoints->SetInput(myPointsNumDataSet);
- myPtsMaskPoints->SetOnRatio(1);
-
- myPtsSelectVisiblePoints = vtkSelectVisiblePoints::New();
- myPtsSelectVisiblePoints->SetInput(myPtsMaskPoints->GetOutput());
- myPtsSelectVisiblePoints->SelectInvisibleOff();
- myPtsSelectVisiblePoints->SetTolerance(0.1);
-
- myPtsLabeledDataMapper = vtkLabeledDataMapper::New();
- myPtsLabeledDataMapper->SetInput(myPtsSelectVisiblePoints->GetOutput());
- myPtsLabeledDataMapper->SetLabelFormat("%g");
- myPtsLabeledDataMapper->SetLabelModeToLabelScalars();
-
- vtkTextProperty* aPtsTextProp = vtkTextProperty::New();
- aPtsTextProp->SetFontFamilyToTimes();
- static int aPointsFontSize = 10;
- aPtsTextProp->SetFontSize(aPointsFontSize);
- aPtsTextProp->SetBold(1);
- aPtsTextProp->SetItalic(0);
- aPtsTextProp->SetShadow(0);
- myPtsLabeledDataMapper->SetLabelTextProperty(aPtsTextProp);
- aPtsTextProp->Delete();