57 vtkInformation *vtkNotUsed(request),
58 vtkInformationVector **inputVector,
59 vtkInformationVector *outputVector)
61 vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
62 vtkInformation *outInfo = outputVector->GetInformationObject(0);
64 vtkPolyData *input = vtkPolyData::SafeDownCast(
65 inInfo->Get(vtkDataObject::DATA_OBJECT()));
66 vtkPolyData *output = vtkPolyData::SafeDownCast(
67 outInfo->Get(vtkDataObject::DATA_OBJECT()));
71 vtkErrorMacro(<<
"Centerlines not set");
79 vtkErrorMacro(<<
"CenterlineRadiusArrayName not set.");
85 if (!centerlineRadiusArray)
87 vtkErrorMacro(<<
"CenterlineRadiusArrayName with name specified does not exist.");
92 int numberOfInputPoints = input->GetNumberOfPoints();
94 output->DeepCopy(input);
96 vtkPointData* outputPointData = output->GetPointData();
97 vtkPointData* referencePointData = this->
Centerlines->GetPointData();
99 outputPointData->InterpolateAllocate(referencePointData,numberOfInputPoints);
110 for (
int i=0; i<numberOfInputPoints; i++)
112 input->GetPoint(i,point);
117 vtkCell* cell = this->
Centerlines->GetCell(cellId);
129 outputPointData->CopyData(referencePointData,cell->GetPointId(subId),i);
133 outputPointData->CopyData(referencePointData,cell->GetPointId(subId+1),i);