[vtkusers] Vectors in XML-format VTK files

Deshpreet Singh Bedi dbedi at astro.cornell.edu
Thu Oct 30 15:45:08 EDT 2008


Hi,

The problem is (as stated in my previous email) that the format that I used
for vectors in even the legacy VTK file does not display what I want, so I
don't want to reverse engineer that.  So I need a proper format for
displaying vectors using legacy VTK files, so I can reverse engineer it.

Thanks,
Desh

On Thu, Oct 30, 2008 at 4:01 AM, Bryn Lloyd <blloyd at vision.ee.ethz.ch>wrote:

> Hi,
>
>
> I am not 100% sure, but think this is just a visualization trick done in
> PV.
>
> You should try the suggestion of Dominik and reverse engineer the XML
> format.
>
>
> If you still need to visualize the vectors at the cell centers do the
> following:
>
> In PV call Filters -> Cell Centers, and then display the glyphs.
>
>
>
> Bryn
>
>
>
>
>
>
>
>
>
>
>
> Deshpreet Singh Bedi wrote:
>
>> Hi,
>>
>> I have used legacy VTK file formats to view Vectors in other visualization
>> programs, such as VisIt.  The format I used was:
>>
>> CELL_DATA 1
>> VECTORS Spin double
>> -0.449584 0.00705966 0.0459143
>>
>> That should generate a vector at the center of the cell with vector
>> components vx, vy, vz given by the doubles above.  When I try to use the
>> same format in ParaView,  I run into a problem: instead of the desired
>> visualization, three vectors, each with the same direction and magnitude,
>> are shown.  I could not even get my vectors to be visualized correctly in
>> ParaView using the legacy format (even though it has worked in other
>> visualization programs), so I cannot yet use ParaView's in-built file-format
>> conversion functionality.  Any thoughts on what is going on?
>>
>> Thanks,
>> Desh
>>
>> On Wed, Oct 29, 2008 at 4:29 PM, Dominik Szczerba <dominik at itis.ethz.ch<mailto:
>> dominik at itis.ethz.ch>> wrote:
>>
>>    -----BEGIN PGP SIGNED MESSAGE-----
>>    Hash: SHA1
>>
>>    Do you generate the file yourself (without VTK)? If so, I would start
>>    with something simpler as a legacy file. Then load it into PV, save as
>>    XML, and reverse-engineer the resulting file.
>>
>>    Dominik
>>
>>
>>    Deshpreet Singh Bedi wrote:
>>     > Hi Dominik,
>>     >
>>     > Thanks for your reply.  One thing though -- what is the exact
>>    syntax for
>>     > including Vectors?  It is not precisely explained in the VTK File
>>     > Formats packet.  I want the Cell Data that I include to be
>>    visualized as
>>     > vectors originating from the center of my cells in ParaView.  How
>>    do I
>>     > specify that?
>>     >
>>     > Thanks,
>>     > Desh
>>     >
>>     > On Wed, Oct 29, 2008 at 3:52 PM, Dominik Szczerba
>>    <dominik at itis.ethz.ch <mailto:dominik at itis.ethz.ch>
>>     > <mailto:dominik at itis.ethz.ch <mailto:dominik at itis.ethz.ch>>> wrote:
>>     >
>>     > You can opt for immediate delivery and not a digest.
>>     >
>>     > If to use point or cell data is up to you and what you need.
>>     > Cell-centered scheme means you have data defined at cell center,
>>    in this
>>     > case the length of the array has to be that of the number of cells;
>>     > point-data means your data is defined at the points - in that
>>    case the
>>     > size of the array has to match the number of points.
>>     >
>>     > Dominik
>>     >
>>     > Deshpreet Singh Bedi wrote:
>>     >> Hi,
>>     >
>>     >> What is the best way to include vectors in XML-format VTK files?
>>     >  Should
>>     >> they be included as Cell Data or Point Data?  What is the
>>    difference,
>>     >> and what is the format for each?
>>     >
>>     >> Thanks,
>>     >
>>     >> Deshpreet Bedi
>>     >
>>     >> P.S. If possible, I would greatly appreciate it if a reply could be
>>     >> sent, in addition to the list-serve, directly to my email, as the
>>     > daily
>>     >> digest comes at far-too-widespread intervals.  Thank you.
>>     >
>>     >
>>     >
>>     >
>>
>>  ------------------------------------------------------------------------
>>     >
>>     >> _______________________________________________
>>     >> This is the private VTK discussion list.
>>     >> Please keep messages on-topic. Check the FAQ at:
>>     > http://www.vtk.org/Wiki/VTK_FAQ
>>     >> Follow this link to subscribe/unsubscribe:
>>     >> http://www.vtk.org/mailman/listinfo/vtkusers
>>     >
>>
>>    - --
>>    Dominik Szczerba, Ph.D.
>>    Computational Physics Group
>>    Foundation for Research on IT in Society
>>    http://www.itis.ethz.ch
>>    -----BEGIN PGP SIGNATURE-----
>>    Version: GnuPG v2.0.4-svn0 (GNU/Linux)
>>    Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
>>
>>    iD8DBQFJCMfE/EBMh9bUuzIRAsHPAJ0YtAdiSrdcgv3Qtt4mwBwt29M0SQCg2W9P
>>    6NtJlMz4Mk7QHTUmlJsSPX4=
>>    =dVmk
>>    -----END PGP SIGNATURE-----
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> This is the private VTK discussion list.
>> Please keep messages on-topic. Check the FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>
>
> --
> -------------------------------------------------
> Bryn Lloyd
> Computer Vision Laboratory
> ETH Zürich, Sternwartstrasse 7
> CH - 8092 Zürich, Switzerland
> Tel: +41 44 63 27690
> Fax: +41 44 63 21199
> -------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081030/ed35fe1c/attachment.htm>


More information about the vtkusers mailing list