[Paraview] Caching within a class, avoiding vtkGeometryFilter

Olesen, Mark Mark.Olesen at emcontechnologies.com
Fri Aug 1 09:34:59 EDT 2008


I've now had a bit of time to picking up on my old problem:
[http://www.paraview.org/pipermail/paraview/2008-May/007917.html]

Even after I have some caching within the reader (thus sparing most
I/O), I see that a large amount of time is actually being spent in
vtkGeometryFilter.

If we assume, for simplicity, that the geometry represented by the
reader is invariant over time but the field values can change, how can
this be coded to have the pipeline not update the geometry, but just
update the field values?  Since the geometry doesn't change, the speed
of examining such transient data should only be marginally slower than
changing between various fields at a single time step.

To make it a bit easier, I'm ignoring the field values and within the
RequestData() method I have something like this:


vtkMultiBlockDataSet* output = vtkMultiBlockDataSet::SafeDownCast
(
    outputVector
        ->GetInformationObject(0)
        ->Get(vtkMultiBlockDataSet::DATA_OBJECT())
);

... do something with UPDATE_TIME_STEPS() and set 
    bool needsUpdate = true/false;


// first time
if (!output0_)
{
    output0_ = vtkMultiBlockDataSet::New();
    needsUpdate = true;
}

if (needsUpdate)
{
    UpdateReaderGeometry(output);
    output0_->ShallowCopy(output);
    cout<< "full UPDATE ---------\n";
}
else
{
    output->ShallowCopy(output0_);
    cout<< "cached UPDATE ---------\n";
}

I actually don't know if this is a reasonable approach, but it doesn't
segfault and paraview still displays the geometry at each time step.
Nonetheless, the modification time of 'output' still causes the
GeometryFilter to execute and the field values are not yet copied.

Rebuilding the field values from scratch is fast enough that I may not
need to cache them, but how can I get the output not to re-trigger the
GeometryFilter?

Thanks,

/mark
This e-mail message and any attachments may contain 
legally privileged, confidential or proprietary Information, 
or information otherwise protected by law of EMCON 
Technologies, its affiliates, or third parties. This notice 
serves as marking of its "Confidential" status as defined 
in any confidentiality agreements concerning the sender 
and recipient. If you are not the intended recipient(s), 
or the employee or agent responsible for delivery of this 
message to the intended recipient(s), you are hereby 
notified that any dissemination, distribution or copying 
of this e-mail message is strictly prohibited. 
If you have received this message in error, please 
immediately notify the sender and delete this e-mail 
message from your computer.



More information about the ParaView mailing list