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

Allow displaying LUT in PCLVisualizer when adding a vtkPolyData #1240

Closed
VictorLamoine opened this issue May 19, 2015 · 2 comments · Fixed by #1241
Closed

Allow displaying LUT in PCLVisualizer when adding a vtkPolyData #1240

VictorLamoine opened this issue May 19, 2015 · 2 comments · Fixed by #1241

Comments

@VictorLamoine
Copy link
Contributor

Colors are nice (#1143) but the LUT cannot be displayed, when U is pressed in the visualizer:

Warning: In /build/buildd/vtk-5.8.0/Rendering/vtkScalarBarActor.cxx, line 270
vtkScalarBarActor (0x840a9a0): Need a mapper to render a scalar bar

A problem arise if the user has multiple vtkPolyData in the viewer and the LUTs are not the same

  • Minimum/maximum scalar values are unlikely to be the same
  • The user might have chosen 2 different LUTs for the vtkPolyData

https://github.com/PointCloudLibrary/pcl/blob/master/visualization/src/interactor_style.cpp#L1057

@taketwo
Copy link
Member

taketwo commented May 19, 2015

Well, if there are two different LUTs, then it's not much we can do about it. But if there is only one (which I expect to be the case most often), then it would be nice to have a color bar for it.

@VictorLamoine
Copy link
Contributor Author

Ok, my problem is that there is not shape_actor_map_ (see https://github.com/PointCloudLibrary/pcl/blob/master/visualization/include/pcl/visualization/interactor_style.h#L261) in the interactor_style.h

I don't know how to search for existing shape actors in the renderer.

EDIT: Got it: PCLVisualizer initializes PCLVisualizerInteractorStyle->actors_ with cloud_actor_map (https://github.com/PointCloudLibrary/pcl/blob/master/visualization/src/pcl_visualizer.cpp#L167). The equivalent for shapes is missing

@VictorLamoine VictorLamoine changed the title Allow displaying LUT in PCLVisualizer when adding PolyDataMapper Allow displaying LUT in PCLVisualizer when adding a vtkPolyData May 26, 2015
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

Successfully merging a pull request may close this issue.

2 participants