<html><body style="font-family: Helvetica,Arial,sans-serif; font-size: 12px;">Hi!<div><br></div><div>Take a look at the following code, why is the lookup table resulting from a merge not copied? Number of inputs added doesn't seem to matter. </div><div>Is that intentional or is it an oversight?</div><div><br></div><div>Thanks!</div><div><br></div><div><span> </span>vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();</div><div><div><span> </span>points->SetNumberOfPoints(3);</div><div><span> </span>points->SetPoint(0, 0.0, 0.0, 0.0);</div><div><span> </span>points->SetPoint(1, 1.0, 0.0, 0.0);</div><div><span> </span>points->SetPoint(2, 0.5, 1, 0.0);</div><div><br></div><div><span> </span>vtkIdType cellIds[3] = { 0, 1, 2 };</div><div><span> </span>vtkSmartPointer<vtkCellArray> cells = vtkSmartPointer<vtkCellArray>::New();</div><div><span> </span>cells->InsertNextCell(3, cellIds);</div><div><br></div><div><span> </span>vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();</div><div><span> </span>lut->SetRange(0, 1);</div><div><br></div><div><span> </span>vtkSmartPointer<vtkIntArray> testPointData = vtkSmartPointer<vtkIntArray>::New();</div><div><span> </span>testPointData->SetName("TestPointData");</div><div><span> </span>testPointData->SetLookupTable(lut);</div><div><span> </span>testPointData->InsertNextValue(0);</div><div><span> </span>testPointData->InsertNextValue(1);</div><div><span> </span>testPointData->InsertNextValue(2);</div><div> </div><div><span> </span>assert(ugrid->GetCellData()->GetArray("TestCellData") != nullptr);</div><div><span> </span>assert(ugrid->GetCellData()->GetArray("TestCellData")->GetLookupTable() != nullptr);</div><div><br></div><div><span> </span>vtkSmartPointer<vtkUnstructuredGrid> ugrid = vtkSmartPointer<vtkUnstructuredGrid>::New();</div><div><span> </span>ugrid->SetPoints(points);</div><div><span> </span>ugrid->SetCells(VTK_TRIANGLE, cells);</div><div><span> </span>ugrid->GetPointData()->AddArray(testPointData);</div><div><br></div><div><span> </span>vtkSmartPointer<vtkAppendFilter> append = vtkSmartPointer<vtkAppendFilter>::New();</div><div><span> </span>append->AddInputData(ugrid);</div><div><span> </span>append->Update();</div><div><br></div><div><span> </span>vtkUnstructuredGrid* outgrid = append->GetOutput();</div><div><br></div><div><div><span> </span>assert(outgrid->GetNumberOfCells() == 1);</div><div><span> </span>assert(outgrid->GetNumberOfPoints() == 3);</div><div><span> </span>assert(outgrid->GetPointData()->GetNumberOfArrays() == 1);</div><div><span> </span>assert(outgrid->GetPointData()->GetArray("TestPointData") != nullptr);</div></div><div><br></div><div><span> </span>vtkLookupTable* outLut = outgrid->GetLookupTable();</div><div> </div></div></body></html>