MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / getColorScalarsFromField

Method getColorScalarsFromField

apps/modeler/src/cloud_mesh.cpp:130–149  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

128
129//////////////////////////////////////////////////////////////////////////////////////////////
130void
131pcl::modeler::CloudMesh::getColorScalarsFromField(
132 vtkSmartPointer<vtkDataArray>& scalars, const std::string& field) const
133{
134 if (field == "rgb" || field == "rgba") {
135 pcl::visualization::PointCloudColorHandlerRGBField<PointT> color_handler(cloud_);
136 scalars = color_handler.getColor();
137 return;
138 }
139
140 if (field == "random") {
141 pcl::visualization::PointCloudColorHandlerRandom<PointT> color_handler(cloud_);
142 scalars = color_handler.getColor();
143 return;
144 }
145
146 pcl::visualization::PointCloudColorHandlerGenericField<PointT> color_handler(cloud_,
147 field);
148 scalars = color_handler.getColor();
149}
150
151//////////////////////////////////////////////////////////////////////////////////////////////
152void

Callers 6

initImplMethod · 0.80
updateImplMethod · 0.80
initImplMethod · 0.80
updateImplMethod · 0.80
initImplMethod · 0.80
updateImplMethod · 0.80

Calls 1

getColorMethod · 0.45

Tested by

no test coverage detected