[Paraview] Live Annotation
John Biddiscombe
biddisco at cscs.ch
Fri Apr 7 03:29:51 EDT 2006
> The data file contains the date/time of each time step. Currently, my
> reader just ignores it.
I have some data which also displays time as a string, if your reader
put the time values (as numbers) into the TimeStepValues array during
the UpdateInformation phase, then the Paraview Gui can convert timestep
T into numerical value "X", in a Qt GUI, I use this
std::string QDateTimeToString(const QDateTime &dt, bool pad=true)
{
std::string d1 = dt.date().toString(Qt::ISODate).toAscii().data();
std::string t1 = dt.time().toString(Qt::ISODate).toAscii().data();
if (pad) return std::string("'") + d1 + std::string(" ") + t1 +
std::string("' ");
else return d1 + std::string(" ") + t1;
}
where the numerical value X referred to above is the Qt::ISODate value
of the time/date I want to display.
if kwsys::SystemTools had a feature to convert a string to an ISO date
number and vice versa (similar to the Qt function I've used above), then
adding one flag to the XML timehelper, "TimeAsDateString" (or maybe
(TimeAsTimeString", "TimeAsDateTimeString" option), would make the job
of displaying the time value as date/time very easy to implement inside
paraview.
Just thinking out loud.
JB
More information about the ParaView
mailing list