<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body ocsi="0" fpstyle="1" bgcolor="#FFFFFF">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Burlen,<br>
<br>
Not really off target - it needed to be checked. And thanks for the heads-up on the hyperstreamline plugin - the FixVector routine is exactly it: they interpolate the field tensor, compute it's eigenvectors, and &quot;fix&quot; the stream propagation if the eigenvector's
 orientation is flipped.<br>
<br>
I've played with applying a tube filter to a streamline in a vector field - color from one eigenvalue and cross-section from the other two - to get a hyperstreamline, but a combination of the StreamTracer and HyperStreamline filters would be ideal: direct application
 to tensor fields and orientation correction as in HyperStreamline with seeding and streamlines from StreamTracer.<br>
<br>
With regard to your glyph orientation issue: Forgive me if you already know this, but if you look at
<a href="http://en.wikipedia.org/wiki/Determinant" target="_blank">http://en.wikipedia.org/wiki/Determinant</a> you will see that, geometrically, the determinant of a 2x2 matrix is just an oriented parallelogram. The determinant of a 3x3 matrix is equal to
 the volume of a parallelepiped. They don't say, but I believe the faces are the geometric equivalent of the minors of the 3x3, to which the interpretation of the 2x2 determinant applies. Again they don't mention, but volumes have orientations determined by
 the orientation of their faces ... so your negative determinants give an orientation reflected by the inward-pointing normals ... apparently reflected in the glyph construction ... eh?<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF816808"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Burlen Loring [bloring@lbl.gov]<br>
<b>Sent:</b> Saturday, August 24, 2013 7:58 PM<br>
<b>To:</b> pwhiteho<br>
<b>Cc:</b> Andy Bauer; paraview@paraview.org<br>
<b>Subject:</b> Re: [Paraview] Stream Tracer in eigenvector field<br>
</font><br>
</div>
<div></div>
<div>
<div class="moz-cite-prefix">Paul, <br>
<br>
Sorry to have given such an off target answer! Your idea about checking the dot product as you progress makes sense. That's how VTK's a hyper stream tracer handles the issue. I wonder if you can make use of it? Bringing VTK classes into PV isn't too hard but
 parallelizing them can be challenging.<br>
<br>
Burlen<br>
<br>
On 08/24/2013 12:27 PM, Burlen Loring wrote:<br>
</div>
<blockquote type="cite">
<div class="moz-cite-prefix">in the case of the glyphing algorithm it's the surface normals of the transformed glyph that have the relation to the sign determinant of the transform matrix. this transformation matrix is constructed from the eigenvectors directly.
 at any rate, good luck.<br>
<br>
On 08/23/2013 06:35 PM, pwhiteho wrote:<br>
</div>
<blockquote type="cite"><style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
--><!--
BODY {direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;}P {margin-top:0;margin-bottom:0;}BODY {scrollbar-base-color:undefined;scrollbar-highlight-color:undefined;scrollbar-darkshadow-color:undefined;scrollbar-track-color:undefined;scrollbar-arrow-color:undefined}BODY {scrollbar-base-color:undefined;scrollbar-highlight-color:undefined;scrollbar-darkshadow-color:undefined;scrollbar-track-color:undefined;scrollbar-arrow-color:undefined}BODY {scrollbar-base-color:undefined;scrollbar-highlight-color:undefined;scrollbar-darkshadow-color:undefined;scrollbar-track-color:undefined;scrollbar-arrow-color:undefined}BODY {scrollbar-base-color:undefined;scrollbar-highlight-color:undefined;scrollbar-darkshadow-color:undefined;scrollbar-track-color:undefined;scrollbar-arrow-color:undefined}BODY {scrollbar-base-color:undefined;scrollbar-highlight-color:undefined;scrollbar-darkshadow-color:undefined;scrollbar-track-color:undefined;scrollbar-arrow-color:undefined}BODY {scrollbar-base-color:undefined;scrollbar-highlight-color:undefined;scrollbar-darkshadow-color:undefined;scrollbar-track-color:undefined;scrollbar-arrow-color:undefined}BODY {scrollbar-base-color:undefined;scrollbar-highlight-color:undefined;scrollbar-darkshadow-color:undefined;scrollbar-track-color:undefined;scrollbar-arrow-color:undefined}BODY {scrollbar-base-color:undefined;scrollbar-highlight-color:undefined;scrollbar-darkshadow-color:undefined;scrollbar-track-color:undefined;scrollbar-arrow-color:undefined}--></style>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Burlen, you had me hoping, but alas ... there is no direct correlation between the determinant ( a.k.a. the 3rd tensor invariant ) and the orientation of the computed eigenvectors.
 You did get me thinking there may be other possibilities. I'm sure I can use the dot product in a marching cube scheme to enforce a consistent orientation progression and generate a &quot;vector&quot; field ParaView will handle well. It'll just have to be robust enough
 to handle a true change near some sharp topological feature.<br>
<br>
Thanks,<br>
Paul<br>
<br>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF964985" style="direction:ltr"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Burlen Loring [<a class="moz-txt-link-abbreviated" href="mailto:bloring@lbl.gov" target="_blank">bloring@lbl.gov</a>]<br>
<b>Sent:</b> Friday, August 23, 2013 4:31 PM<br>
<b>To:</b> Andy Bauer; pwhiteho<br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:paraview@paraview.org" target="_blank">
paraview@paraview.org</a><br>
<b>Subject:</b> Re: [Paraview] Stream Tracer in eigenvector field<br>
</font><br>
</div>
<div>
<div class="moz-cite-prefix">Eigenvectors are unique up to a constant<span style="color:rgb(0,0,0); font-family:Verdana,Geneva,Helvetica,Arial,sans-serif; font-size:13px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px; background-color:rgb(255,255,255); display:inline!important; float:none"></span>
 so if you took any eigenvector and multiplied it by -1 it's still an eigenvector. You could see it in the definition,<br>
<br>
M x=\lambda x<br>
<br>
eigenvector x appears in both sides of the eqn.<br>
<br>
I had a similar problem with tensor glyphs in ParaView. In that case I was able to solve by looking at the sign of the determinant of the transformation matrix (see bug report, patch and mail list posts below). I wonder if you could adapt/build on this solution
 there to solve your issue here?<br>
<br>
<a href="http://vtk.org/Bug/view.php?id=12179" target="_blank">http://vtk.org/Bug/view.php?id=12179</a><br>
<a href="http://vtk.1045678.n5.nabble.com/tensor-glyph-inward-pointing-surface-normals-td4388361.html" target="_blank">http://vtk.1045678.n5.nabble.com/tensor-glyph-inward-pointing-surface-normals-td4388361.html</a><br>
<br>
Burlen<br>
<br>
<br>
On 08/23/2013 01:10 PM, Andy Bauer wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>Hi Paul,<br>
<br>
</div>
Apologies as my math is a bit rusty but isn't the sign of the eigenvector related to the sign of its corresponding eigenvalue? In that case if you make sure that all of the eigenvalues are positive then all of their corresponding eigenvectors should be aligned
 properly. If that's the case and you have access to the eigenvalues of the eigenvectors you could use the calculator or python calculator to properly orient the eigenvectors.<br>
<br>
</div>
In any case, if you can come up with an algorithm that properly orients the eigenvectors you should be able to do that in the python calculator or calculator filters. If not, then things could get a bit hairy as far as computationally figuring out which is
 the &quot;proper&quot; direction your eigenvalues should have.<br>
<br>
</div>
Regards,<br>
Andy<br>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Fri, Aug 23, 2013 at 3:38 PM, pwhiteho <span dir="ltr">
&lt;<a href="mailto:pwhiteho@masonlive.gmu.edu" target="_blank">pwhiteho@masonlive.gmu.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-size:10pt; font-family:Tahoma">The term &quot;eigenvector&quot;, used to describe the principal directions of a tensor, is a bit of a misnomer since it's not a &quot;vector&quot; as interpreted by the Stream Tracer filter - it's more accurately
 bi-directional like tension/compression and could be termed &quot;eigenaxis/eigenaxes&quot;. When interpreted as a vector, there is an inherent sign ambiguity in each eigenvector - the sign is indeterminate and one is free to choose &#43; or -, and that is exactly what
 Mathematica does ( likely true for other routines also ).<br>
<br>
I've been using Mathematica to prototype computations for the investigation of tensor topology which I then visualize in ParaView. Eigen-decomposition of a tensor field at each grid point returns an orthonormal set of eigenvectors, uncorrelated with any neighbors.
 Taken separately, each eigenvector field exhibits large regions of smoothly varying orientation, but there are systematic and random reversals of orientation that confound the Stream Tracer filter, sending streamlines wandering around the field. What is needed
 is a true tangent curve ( tensor line ) integrator that would avoid &quot;doubling back&quot; as the &quot;streamline&quot; propagates, similar to the scheme of Weinstein, et. al., ( IEEE VIS'99 ) which computes the dot product of the incoming propagation vector with the eigenvector;
 and if near -1, negate the outgoing propagation vector. This can also be fancied-up to accommodate noisy initial tensor data as in Weinstein.<br>
<br>
I think I would be taking on too much at this point in learning to write my own filter so have been exploring ways to pre-process the eigenvector fields before visualizing in Paraview, but I ask:<br>
1. Have I missed something in existing filters that would handle this?<br>
2. Can the existing Stream Tracer be modified?<br>
3. Does the eigenvector routine in ParaView yield the same sign ambiguity among uncorrelated computations?<br>
<br>
Thanks,<br>
Paul W<br>
<br>
</div>
</div>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader" target="_blank"></fieldset> <br>
<pre>_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com" target="_blank">www.kitware.com</a>

Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the ParaView Wiki at: <a class="moz-txt-link-freetext" href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
<br>
</blockquote>
<br>
</div>
</div>
</div>
</body>
</html>