[Paraview] Time Annotation of a single global number (or text)

David E DeMarle dave.demarle at kitware.com
Wed Jun 1 17:53:12 EDT 2011


Please keep the discussion on the list so that everyone can contribute to
and benefit from the answers.

I am not sure what you mean by create a container.

I do not think you can do what you want purely via using GUI (hopefully
someone out there will correct me) so unfortunately you will have to write
some code. The easiest way to do that is via the python programmable filter,
which lets you write code at run time and obviates the need for compilation.

The first example demonstrates how one might go about writing a "reader" to
get some arbitrary data (your text file with time in column 1 and the time
dependent Numeric Value in column two) into ParaView.

The second example demonstrates what a you have to do to make your reader
understand ParaView's concept of time. The reader has to announce what time
range it has data for and then must respond to any given time request that
the pipeline gives it. (http://www.vtk.org/Wiki/VTK/Time_Support).  In your
case the reader would produce the particular entry from column two whenevery
ParaView asks it for the corresponding time in column 1.

Unfortunately there is one more hurdle, which you pointed out and reminded
me of in you second email. That is, how do you get the value to show up on
the screen in text format?

ParaView's textual annotation support is weak in my opinion, and we plan to
improve upon that in future releases. Until them you have to three options:
1) use a plot filter to show the value in its own view window
2) have your reader produce a vtkPolyData with a single VTK_VOXEL cell at
some arbitrary location, then use selection to select the voxel. Then use
selection annotation in the selection inspector panel to show the value as
text
3) derive a new class from or modify the annotate time filter to show your
value of interest instead of the time on the screen

Of the three I think #2 is quickest but #3 is best, but both require even
more coding (3 involves C++ coding).

David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109


On Wed, Jun 1, 2011 at 3:06 PM, Andre Phillion <andre.phillion at ubc.ca>wrote:

>  Hi David,
>
> Thank you for these links. But, could you provide a little more
> information. I do not really understand the code in the links — especially
> the second link.
> I mean, I can input the labels, as a vtkTextSource, and can create a
> container that will hold each of the text values over the time series. But,
> how do I actually have these values displayed on to the screen?
> Cheers,
>
>
> André
> ---------------------------------------
> André Phillion, Ph.D, P. Eng
> Assistant Professor
>
> Okanagan School of Engineering
> University of British Columbia
>
> ------------------------------
> *From: *David E DeMarle <dave.demarle at kitware.com>
> *Date: *Wed, 1 Jun 2011 11:16:32 -0400
> *To: *Andre Phillion <andre.phillion at ubc.ca>
> *Cc: *<paraview at paraview.org>
> *Subject: *Re: [Paraview] Time Annotation of a single global number (or
> text)
>
>
> I would use a python programmable source to read the file and produce the
> appropriate value (s) when it is asked by the pipeline.
>
> See
>
> http://paraview.org/Wiki/Here_are_some_more_examples_of_simple_ParaView_3_python_filters.#CSV_Reader_.28Source.29
> and
>
> http://paraview.org/Wiki/Here_are_some_more_examples_of_simple_ParaView_3_python_filters.#Producing_Data_with_Timesteps_.28Source.29
> for ideas on how to get started.
>
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 28 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-371-3971 x109
>
>
> On Tue, May 31, 2011 at 6:41 PM, Andre Phillion <andre.phillion at ubc.ca>
> wrote:
>
> Hello,
>
> I am using paraview to examine models relating to the solidification of
> metallic alloys. I would like to add a time-dependent parameter similar to
> AnnotateTime Source that uses as input a text file with, in column 1 the
> time, and in column 2 the time-dependent Numeric Value.
>
> Does anyone have ideas as to how to do this?
> Thank you
> André
> ---------------------------------------
> André Phillion, Ph.D, P. Eng
> Assistant Professor
>
> Okanagan School of Engineering
> University of British Columbia
> http://web.ubc.ca/okanagan/engineering/faculty/aphillion.html
>
>
> _______________________________________________
> Powered by www.kitware.com <http://www.kitware.com>
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110601/73a83a1f/attachment-0001.htm>


More information about the ParaView mailing list