Page MenuHomePhabricator

CellData Lookup table is not applied for surface meshes
Closed, ResolvedPublic

Assigned To
Authored By
Feb 17 2010, 3:12 PM
Referenced Files
Apr 1 2010, 11:35 AM
F469: patch-3358.diff
Mar 31 2010, 3:51 PM
F468: bug3358.diff
Feb 17 2010, 3:13 PM


When rendering a mitk::Surface with a CellData array and Lookup table, the Lookup table is not used.

When looking at the code, a new vtkStripper filter has been added after the vtkCutter. The vtkStripper doesn't pass the CellData to the output data. When PaintCells() is called, cell data is empty.

We fixed this removing the vtkStripper filter. However, we think you should take a look.

Event Timeline

xplanes added a subscriber: xplanes.

Unified patch

@Daniel: you added the vtkStripper, can you remember / have a look?

I don't remember, but I'll have a look

Dear xplanes,

unfortunately your "fix" was removing funcuntionality. I tried to fix the missing cell data by setting the PassCellDataAsFieldData flag for the vtkStripper filter (see new patch). Unfortunately I do not have a test case ready. Could you please try to reproduce your initial bug and verify that the patch fixes your problem?


Dear Daniel,

I've tested your patch and it doesn't work.

I think the problem is that using the flag PassCellDataAsFieldData, the CellData is passed to FieldData. Then PaintCells checks for CellData and its empty.


I attach you a snapshot and a sample data

Thanks for the test data. This will be useful to create a test case!

Dear xplanes,

I had a look at it and can't reproduce the error with your sample data. It does not seem to contain valid cell data.

In line 344 of SurfaceMapper2D:
vtkDataArray* vcellscalars = contour->GetCellData()->GetScalars();

NULL is returned and therefore no color is drawn.

Can you tell me how you made the image with this sample data?


P.S. Cell data is neither drawn in 2D or in 3D.

Requesting core mod.

RFD: Include surfaces with point and cell data to test data?

[SVN revision 22938]
FIX (#3358): Only use vtkStripper when normals shall be drawn.

Note: When not displayed automatically, set "scalar mode" property to "CellData"