<!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: 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>
./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>
SERVER_MANAGER_XML extras_Server.xml<br>
)<br>
<br>
ADD_PARAVIEW_PLUGIN(ExtraGUIPlugin "1.0" <br>
GUI_RESOURCES extras.qrc )</i><br>
#############<br>
<br>
The file extras.qrc is this:<br>
<br>
############<br>
<RCC><br>
<qresource prefix="/ParaViewResources" ><br>
<file>extras.xml</file><br>
</qresource><br>
</RCC><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->SetName("Scalars");<br>
newNormals->SetName("Normals");<br>
newTensors->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%">
<ServerManagerConfiguration>
<ProxyGroup name="sources">
<SourceProxy name="Point Load" class="vtkPointLoad">
<DoubleVectorProperty
name="LoadValue"
command="SetLoadValue"
default_values="100"
number_of_elements="1">
</DoubleVectorProperty>
<IntVectorProperty
name="ComputeEffectiveStress"
command="SetComputeEffectiveStress"
number_of_elements="1"
default_values="1" >
<BooleanDomain name="bool"/>
</IntVectorProperty>
<IntVectorProperty
name="ModelBounds"
command="SetModelBounds"
number_of_elements="6"
default_values="-10 10 -10 10 -10 10" >
</IntVectorProperty>
<IntVectorProperty
name="SampleDimensions"
command="SetSampleDimensions"
number_of_elements="3"
default_values="6 6 6" >
</IntVectorProperty>
</SourceProxy>
</ProxyGroup>
<ProxyGroup name="filters">
<SourceProxy name="Tensor Glyph" class="vtkTensorGlyph">
<InputProperty
name="Input"
command="SetInputConnection">
<ProxyGroupDomain name="groups">
<Group name="sources"/>
<Group name="filters"/>
</ProxyGroupDomain>
<DataTypeDomain name="input_type">
<DataType value="vtkDataSet"/>
</DataTypeDomain>
<InputArrayDomain name="input_array1" attribute_type="point"
number_of_components="1" optional="1"/>
<InputArrayDomain name="input_array2" attribute_type="point"
number_of_components="9" optional="1"/>
<Documentation>
This property specifies the input to the filter.
</Documentation>
</InputProperty>
<StringVectorProperty
name="SelectInputScalars"
command="SetInputArrayToProcess"
number_of_elements="5"
element_types="0 0 0 0 2"
label="Scalars">
<ArrayListDomain name="array_list" attribute_type="Scalars"
input_domain_name="input_array1">
<RequiredProperties>
<Property name="Input" function="Input"/>
</RequiredProperties>
</ArrayListDomain>
<Documentation>
This property indicates the name of the scalar array
</Documentation>
</StringVectorProperty>
<StringVectorProperty
name="SelectInputTensors"
command="SetInputArrayToProcess"
number_of_elements="5"
element_types="0 0 0 0 2"
label="Tensors">
<ArrayListDomain name="array_list" attribute_type="Tensors"
input_domain_name="input_array2">
<RequiredProperties>
<Property name="Input" function="Input"/>
</RequiredProperties>
</ArrayListDomain>
<Documentation>
This property indicates the name of the tensor array
</Documentation>
</StringVectorProperty>
<InputProperty
name="Source"
command="SetSourceConnection"
label="Glyph Type">
<ProxyGroupDomain name="groups">
<Group name="sources"/>
<Group name="glyph_sources" />
</ProxyGroupDomain>
<DataTypeDomain name="input_type">
<DataType value="vtkPolyData"/>
</DataTypeDomain>
<ProxyListDomain name="proxy_list">
<Proxy group="sources" name="SphereSource" />
</ProxyListDomain>
<Documentation>
This property determines which type of glyph will be placed at the points in the input dataset.
</Documentation>
</InputProperty>
<IntVectorProperty
name="ColorGlyphs"
command="SetColorGlyphs"
number_of_elements="1"
default_values="1" >
<BooleanDomain name="bool"/>
</IntVectorProperty>
<IntVectorProperty
name="ColorMode"
command="SetColorMode"
number_of_elements="1"
default_values="1" >
<BooleanDomain name="bool"/>
</IntVectorProperty>
<IntVectorProperty
name="Symmetric"
command="SetSymmetric"
number_of_elements="1"
default_values="0" >
<BooleanDomain name="bool"/>
</IntVectorProperty>
<IntVectorProperty
name="Scaling"
command="SetScaling"
number_of_elements="1"
default_values="1" >
<BooleanDomain name="bool"/>
</IntVectorProperty>
<IntVectorProperty
name="ClampScaling"
command="SetClampScaling"
number_of_elements="1"
default_values="0" >
<BooleanDomain name="bool"/>
</IntVectorProperty>
<IntVectorProperty
name="ExtractEigenvalues"
command="SetExtractEigenvalues"
number_of_elements="1"
default_values="1" >
<BooleanDomain name="bool"/>
</IntVectorProperty>
<IntVectorProperty
name="ThreeGlyphs"
command="SetThreeGlyphs"
number_of_elements="1"
default_values="0" >
<BooleanDomain name="bool"/>
</IntVectorProperty>
<DoubleVectorProperty
name="ScaleFactor"
command="SetScaleFactor"
number_of_elements="1"
default_values="10">
</DoubleVectorProperty>
<DoubleVectorProperty
name="MaxScaleFactor"
command="SetMaxScaleFactor"
number_of_elements="1"
default_values="100">
</DoubleVectorProperty>
</SourceProxy>
</ProxyGroup>
</ServerManagerConfiguration>
</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%">
<ParaViewSources>
<Source name="Point Load" />
<Filter name="Tensor Glyph" />
</ParaViewSources>
</pre>
</div>
</body>
</html>