<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<div class="moz-text-html" lang="x-western"> Pawel Krupinski wrote:<br>
<blockquote cite="mid:24949.31430.qm@web32604.mail.mud.yahoo.com"
 type="cite">
  <div
 style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
  <div><strong style="cursor: pointer; font-weight: normal;"
 title="View all messages from this sender">So I was thinking:&nbsp; I need
to scale spheres anisotropically to get ellipsoids so I really need to
do it by scaling with vector components of the scales/axes_length
vector. <br>
  </strong></div>
  </div>
</blockquote>
<strong><b><br>
</b></strong>What you describe seems to be exactly what the
vtkTensorGlyph does. See details here
<a class="moz-txt-link-freetext"
 href="http://www.vtk.org/doc/nightly/html/classvtkTensorGlyph.html">http://www.vtk.org/doc/nightly/html/classvtkTensorGlyph.html</a><br>
<br>
Tensor Glyphing is not in ParaView yet. But a ctest exist (if Python is
enabled)<br>
<br>
&nbsp;./VTK/Graphics/Testing/Python/TenEllip.py <br>
<br>
You can add Tensor Glyph yourself with a pluggin. Here are the XML
necessary. The CMakelists.txt is this:<br>
############<br>
<i>cmake_minimum_required(VERSION 2.6)<br>
FIND_PACKAGE(ParaView REQUIRED)<br>
INCLUDE(${PARAVIEW_USE_FILE})<br>
<br>
ADD_PARAVIEW_PLUGIN(ExtraSMPlugin "1.0" <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SERVER_MANAGER_XML extras_Server.xml<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br>
<br>
ADD_PARAVIEW_PLUGIN(ExtraGUIPlugin "1.0" <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GUI_RESOURCES extras.qrc )</i><br>
#############<br>
<br>
The file extras.qrc is this:<br>
<br>
############<br>
&lt;RCC&gt;<br>
&nbsp; &lt;qresource prefix="/ParaViewResources" &gt;<br>
&nbsp;&nbsp;&nbsp; &lt;file&gt;extras.xml&lt;/file&gt;<br>
&nbsp; &lt;/qresource&gt;<br>
&lt;/RCC&gt;<br>
############<br>
<br>
There is a complication. The data fields created by vtkTensorGlyph (and
vtkPointLoad) are not named. ParaView will not color them. You need to
add two lines of code in vtkTensorGlyph.cxx and vtkPointLoad.cxx
immediately after the declaration of<br>
newNormals = vtkFloatArray::New();<br>
newScalars = vtkFloatArray::New();<br>
newTensors = vtkFloatArray::New();<br>
<br>
newScalars-&gt;SetName("Scalars");<br>
newNormals-&gt;SetName("Normals");<br>
newTensors-&gt;SetName("Tensors");<br>
<br>
hope it fits the bill. Caveat Emptor.<br>
<br>
Jean --<br>
Swiss National Supercomputing Center<br>
</div>
<div class="moz-text-plain" wrap="true" graphical-quote="true"
 style="font-family: -moz-fixed; font-size: 12px;" lang="x-western">
<pre wrap="">
<hr size="4" width="90%">
&lt;ServerManagerConfiguration&gt;
  &lt;ProxyGroup name="sources"&gt;
   &lt;SourceProxy name="Point Load" class="vtkPointLoad"&gt;
     &lt;DoubleVectorProperty
        name="LoadValue"
        command="SetLoadValue"
        default_values="100"
        number_of_elements="1"&gt;
     &lt;/DoubleVectorProperty&gt;
      &lt;IntVectorProperty
        name="ComputeEffectiveStress"
        command="SetComputeEffectiveStress"
        number_of_elements="1"
        default_values="1" &gt;
        &lt;BooleanDomain name="bool"/&gt;
      &lt;/IntVectorProperty&gt;
      &lt;IntVectorProperty
         name="ModelBounds"
         command="SetModelBounds"
         number_of_elements="6"
         default_values="-10 10 -10 10 -10 10" &gt;
      &lt;/IntVectorProperty&gt;
      &lt;IntVectorProperty
         name="SampleDimensions"
         command="SetSampleDimensions"
         number_of_elements="3"
         default_values="6 6 6" &gt;
      &lt;/IntVectorProperty&gt;
   &lt;/SourceProxy&gt;
&lt;/ProxyGroup&gt; 


&lt;ProxyGroup name="filters"&gt;
   &lt;SourceProxy name="Tensor Glyph" class="vtkTensorGlyph"&gt;
   &lt;InputProperty
        name="Input"
        command="SetInputConnection"&gt;
           &lt;ProxyGroupDomain name="groups"&gt;
             &lt;Group name="sources"/&gt;
             &lt;Group name="filters"/&gt;
           &lt;/ProxyGroupDomain&gt;
           &lt;DataTypeDomain name="input_type"&gt;
             &lt;DataType value="vtkDataSet"/&gt;
           &lt;/DataTypeDomain&gt;
           &lt;InputArrayDomain name="input_array1" attribute_type="point"
                             number_of_components="1" optional="1"/&gt;
           &lt;InputArrayDomain name="input_array2" attribute_type="point"
                             number_of_components="9" optional="1"/&gt;
           &lt;Documentation&gt;
             This property specifies the input to the filter.
           &lt;/Documentation&gt;
      &lt;/InputProperty&gt;

      &lt;StringVectorProperty 
          name="SelectInputScalars" 
          command="SetInputArrayToProcess"
          number_of_elements="5"
          element_types="0 0 0 0 2"
          label="Scalars"&gt;
        &lt;ArrayListDomain name="array_list" attribute_type="Scalars" 
                         input_domain_name="input_array1"&gt;
          &lt;RequiredProperties&gt;
            &lt;Property name="Input" function="Input"/&gt;
          &lt;/RequiredProperties&gt;
        &lt;/ArrayListDomain&gt;
        &lt;Documentation&gt;
          This property indicates the name of the scalar array
        &lt;/Documentation&gt;
      &lt;/StringVectorProperty&gt;
      &lt;StringVectorProperty 
          name="SelectInputTensors" 
          command="SetInputArrayToProcess"
          number_of_elements="5"
          element_types="0 0 0 0 2"
          label="Tensors"&gt;
        &lt;ArrayListDomain name="array_list" attribute_type="Tensors" 
                         input_domain_name="input_array2"&gt;
          &lt;RequiredProperties&gt;
            &lt;Property name="Input" function="Input"/&gt;
          &lt;/RequiredProperties&gt;
        &lt;/ArrayListDomain&gt;
        &lt;Documentation&gt;
          This property indicates the name of the tensor array
        &lt;/Documentation&gt;
      &lt;/StringVectorProperty&gt;

      &lt;InputProperty
        name="Source"
        command="SetSourceConnection"
        label="Glyph Type"&gt;
           &lt;ProxyGroupDomain name="groups"&gt;
             &lt;Group name="sources"/&gt;
             &lt;Group name="glyph_sources" /&gt;
           &lt;/ProxyGroupDomain&gt;
           &lt;DataTypeDomain name="input_type"&gt;
             &lt;DataType value="vtkPolyData"/&gt;
           &lt;/DataTypeDomain&gt;
           &lt;ProxyListDomain name="proxy_list"&gt;
              &lt;Proxy group="sources" name="SphereSource" /&gt;
           &lt;/ProxyListDomain&gt;
           &lt;Documentation&gt;
             This property determines which type of glyph will be placed at the points in the input dataset.
           &lt;/Documentation&gt;
      &lt;/InputProperty&gt;
      &lt;IntVectorProperty
        name="ColorGlyphs"
        command="SetColorGlyphs"
        number_of_elements="1"
        default_values="1" &gt;
        &lt;BooleanDomain name="bool"/&gt;
      &lt;/IntVectorProperty&gt;
      &lt;IntVectorProperty
        name="ColorMode"
        command="SetColorMode"
        number_of_elements="1"
        default_values="1" &gt;
        &lt;BooleanDomain name="bool"/&gt;
      &lt;/IntVectorProperty&gt;
      &lt;IntVectorProperty
        name="Symmetric"
        command="SetSymmetric"
        number_of_elements="1"
        default_values="0" &gt;
        &lt;BooleanDomain name="bool"/&gt;
      &lt;/IntVectorProperty&gt;
      &lt;IntVectorProperty
        name="Scaling"
        command="SetScaling"
        number_of_elements="1"
        default_values="1" &gt;
        &lt;BooleanDomain name="bool"/&gt;
      &lt;/IntVectorProperty&gt;
      &lt;IntVectorProperty
        name="ClampScaling"
        command="SetClampScaling"
        number_of_elements="1"
        default_values="0" &gt;
        &lt;BooleanDomain name="bool"/&gt;
      &lt;/IntVectorProperty&gt;
      &lt;IntVectorProperty
        name="ExtractEigenvalues"
        command="SetExtractEigenvalues"
        number_of_elements="1"
        default_values="1" &gt;
        &lt;BooleanDomain name="bool"/&gt;
      &lt;/IntVectorProperty&gt;
      &lt;IntVectorProperty
        name="ThreeGlyphs"
        command="SetThreeGlyphs"
        number_of_elements="1"
        default_values="0" &gt;
        &lt;BooleanDomain name="bool"/&gt;
      &lt;/IntVectorProperty&gt;
      &lt;DoubleVectorProperty
        name="ScaleFactor"
        command="SetScaleFactor"
        number_of_elements="1"
        default_values="10"&gt;
      &lt;/DoubleVectorProperty&gt;
      &lt;DoubleVectorProperty
        name="MaxScaleFactor"
        command="SetMaxScaleFactor"
        number_of_elements="1"
        default_values="100"&gt;
      &lt;/DoubleVectorProperty&gt;
   &lt;/SourceProxy&gt;
  &lt;/ProxyGroup&gt;
  
&lt;/ServerManagerConfiguration&gt;
</pre>
</div>
<div class="moz-text-plain" wrap="true" graphical-quote="true"
 style="font-family: -moz-fixed; font-size: 12px;" lang="x-western">
<pre wrap="">
<hr size="4" width="90%">
&lt;ParaViewSources&gt;
  &lt;Source name="Point Load" /&gt;
  &lt;Filter name="Tensor Glyph" /&gt;
&lt;/ParaViewSources&gt;
</pre>
</div>
</body>
</html>