[vtkusers] Color of vtkTensorGlyph

L.J. van Ruijven (ACTA) L.J.vanRuijven at amc.uva.nl
Wed Oct 11 11:43:25 EDT 2000


<color><param>0100,0100,0100</param>Hi,

I want to visualize data obtained from a FE analysis. I use 
vtkTensorGlyph with inputs: vtkSphereSource, and 
vtkUnstructuredGrid with a tensor defined for every point. The 
ellipsoids produced have the right shape, but they don't have the 
same color. I tried several things but nothing solves the problem.  
This is a part of the program:


<FontFamily><param>Courier New</param>vtkDataSetReader MILreader

    MILreader SetFileName "MILS_Droog.VTK"

    MILreader Update


# Generate ellipsoids

vtkSphereSource sphere

    sphere SetThetaResolution 15

    sphere SetPhiResolution 15

vtkTensorGlyph MILellipsoids

    MILellipsoids SetInput [MILreader GetOutput]

    MILellipsoids SetSource [sphere GetOutput]

    MILellipsoids SetScaleFactor 10

    MILellipsoids ClampScalingOn

    MILellipsoids ColorGlyphsOff


# Map contour

vtkPolyDataMapper MILMapper

    MILMapper SetInput [MILellipsoids GetOutput]

    MILMapper ScalarVisibilityOff

vtkActor MILActor

    MILActor SetMapper MILMapper



<FontFamily><param>Arial</param>The data used (MILS_Droog.VTK) is:


<FontFamily><param>Courier New</param># vtk DataFile Version 3.0

vtk output

ASCII

DATASET UNSTRUCTURED_GRID

POINTS 11 float

5.576 10.132 3.570

6.256 11.730 7.208

6.256 11.730 10.846

6.256 11.730 14.484

5.644 10.370 18.088

6.154 8.602 6.766

6.596 8.602 10.982

6.664 8.602 15.198

5.168 5.066 6.766

6.086 4.726 10.982

5.168 4.964 15.198


CELLS 11 22

1 0

1 1

1 2

1 3

1 4

1 5

1 6

1 7

1 8

1 9

1 10


CELL_TYPES 11

1

1

1

1

1

1

1

1

1

1

1


POINT_DATA 11

TENSORS tensors float

-7.03E-02 3.83E-01 -6.90E-02

-3.31E-01 -7.05E-02 -5.42E-02

-4.96E-02 3.69E-02 2.55E-01

1.91E-01 3.46E-01 -1.22E-02

-3.22E-01 1.76E-01 -5.60E-02

-2.75E-02 2.32E-02 2.31E-01

8.59E-02 3.89E-01 2.99E-02

-3.66E-01 8.27E-02 -2.40E-02

-1.77E-02 -1.33E-02 2.24E-01

-1.14E-01 3.92E-01 1.92E-02

-3.36E-01 -9.84E-02 1.65E-02

1.41E-02 -7.73E-03 2.41E-01

-1.67E-01 3.60E-01 5.21E-02

-3.04E-01 -1.47E-01 4.18E-02

4.33E-02 -1.69E-02 2.55E-01

3.98E-02 4.03E-01 -3.67E-02

-3.49E-01 3.42E-02 -2.04E-03

7.42E-04 2.20E-02 2.42E-01

7.62E-02 3.92E-01 1.96E-02

-3.68E-01 7.24E-02 -1.85E-02

-1.29E-02 -8.66E-03 2.24E-01

-7.40E-02 4.09E-01 3.30E-02

-3.37E-01 -6.46E-02 4.56E-02

3.41E-02 -1.27E-02 2.34E-01

6.82E-02 4.14E-01 4.17E-02

-3.45E-01 5.83E-02 1.49E-02

1.32E-02 2.06E-02 2.26E-01

4.31E-02 4.19E-01 9.36E-03

-3.41E-01 3.61E-02 -4.55E-02

-3.10E-02 -1.97E-03 2.31E-01

-2.36E-02 4.26E-01 1.22E-02

-3.43E-01 -1.89E-02 -3.13E-03

-1.73E-03 -6.66E-03 2.30E-01





<nofill>
***************************************************************************
* drs L.J. van Ruijven                 Tel: 31 (0)20 566 5357               *
* Dept. of Functional Anatomy, ACTA    FAX: 31 (0)20 691 1856               *
* Meibergdreef 15                      email: L.J.vanRuijven at AMC.UvA.Nl   *
* 1105 AZ Amsterdam                                                       *
***************************************************************************





More information about the vtkusers mailing list