Exemplo n.º 1
0
        private void CreateScalarBar()
        {
            // Initialize ScalarBar actor
            ScalarBar = vtkScalarBarActor.New();
            ScalarBar.SetLookupTable(colorLookupTable);

            // Assign default number of colors and label format
            ScalarBar.SetNumberOfLabels(10);
            ScalarBar.SetLabelFormat("%.2e");

            TextProp = vtkTextProperty.New();
            TextProp.SetFontSize(12);
            TextProp.SetBold(0);
            TextProp.SetFontFamilyToArial();
            TextProp.ItalicOff();
            TextProp.SetJustificationToLeft();
            TextProp.SetVerticalJustificationToBottom();
            TextProp.ShadowOff();
            TextProp.SetColor(1, 1, 1);

            ScalarBar.SetTitleTextProperty(TextProp);
            ScalarBar.SetLabelTextProperty(TextProp);

            // Assign default size of Scalar Bar
            ScalarBar.SetMaximumWidthInPixels(120);
            ScalarBar.SetPosition(0.015, 0.10);
            ScalarBar.SetPosition2(0.16, 0.90);

            //Hide ScalarBar
            ScalarBar.VisibilityOff();

            //Add to Viewport
            Viewport.AddActor2D(ScalarBar);
        }
Exemplo n.º 2
0
 public void HideScalarBar()
 {
     ScalarBar.VisibilityOff();
 }