A GitLab update will be applied today, 9/24. The site may be slow between 12pm - 12:45pm Fri 9/24 EDT (UTC -400).

Commit e5dceb0a authored by Sankhesh Jhaveri's avatar Sankhesh Jhaveri 💬
Browse files

FIX: Initialized multiblockdataset in vtkExtractSelection.cxx

Added data structure to maintain shallow copies of input data as a map from (port index, connection index) to (input data port, shallow copy port).

Change-Id: I815b63fa2f50a4b412b2de14f25e3ad582eaeef4
parent ee901dee
......@@ -214,6 +214,7 @@ int vtkExtractSelection::RequestDataObject(
vtkMultiBlockDataSet* output = vtkMultiBlockDataSet::GetData(outInfo);
if (!output)
{
output = vtkMultiBlockDataSet::New();
outInfo->Set(vtkDataObject::DATA_OBJECT(), output);
output->Delete();
}
......
......@@ -169,15 +169,14 @@ vtkAlgorithmOutput* vtkDataRepresentation::GetInternalOutputPort(int port, int c
vtkAlgorithmOutput* input = this->GetInputConnection(port, conn);
if (this->Implementation->InputInternal.find(p) ==
this->Implementation->InputInternal.end() ||
this->Implementation->InputInternal[p].first != input ||
this->Implementation->InputInternal[p].second->GetMTime() < input->GetMTime())
this->Implementation->InputInternal[p].first != input)
{
this->Implementation->InputInternal[p].first = input;
vtkDataObject* input = this->GetInputDataObject(port, conn);
vtkDataObject* copy = input->NewInstance();
copy->ShallowCopy(input);
// copy->ShallowCopy(input);
vtkTrivialProducer* tp = vtkTrivialProducer::New();
tp->SetOutput(copy);
tp->SetOutput(input);
this->Implementation->InputInternal[p].second = tp;
tp->Delete();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment