Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vtkMergeDataObjectFilter does not propagate time. #27

Open
rchristie opened this issue Jan 30, 2013 · 0 comments
Open

vtkMergeDataObjectFilter does not propagate time. #27

rchristie opened this issue Jan 30, 2013 · 0 comments

Comments

@rchristie
Copy link
Contributor

I've been using the time series reader with vtkDataObject to read pure time-varying field data to merge into a non time-varying dataset with vtkMergeDataObjectFilter. I've found it doesn't report the time steps and time range from the data object.

This can be solved by adding a RequestInformation() method that propagates time; this largely copied from vtkProbeFilter:

int vtkMergeDataObjectFilter::RequestInformation(
vtkInformation _vtkNotUsed(request),
vtkInformationVector *_inputVector,
vtkInformationVector *outputVector)
{
if (this->GetNumberOfInputConnections(1) > 0)
{
// get the info objects
vtkInformation *outInfo = outputVector->GetInformationObject(0);
vtkInformation *dataObjectInfo = inputVector[1]->GetInformationObject(0);
outInfo->CopyEntry(dataObjectInfo,
vtkStreamingDemandDrivenPipeline::TIME_STEPS());
outInfo->CopyEntry(dataObjectInfo,
vtkStreamingDemandDrivenPipeline::TIME_RANGE());
}
return 1;
}

Even though this works for my data, I'm unsatisfied by this code and have some questions:
What happens if the input is time-varying but the data object is not?
What happens if both are time-varying but with different time steps and range?
Are there standard methods for merging time information from two sources?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant