|
|
@ -77,7 +77,9 @@ cv::viz::WCloud::WCloud(cv::InputArray cloud, cv::InputArray colors, cv::InputAr |
|
|
|
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); |
|
|
|
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); |
|
|
|
VtkUtils::SetInputData(mapper, cloud_source->GetOutput()); |
|
|
|
VtkUtils::SetInputData(mapper, cloud_source->GetOutput()); |
|
|
|
mapper->SetScalarModeToUsePointData(); |
|
|
|
mapper->SetScalarModeToUsePointData(); |
|
|
|
|
|
|
|
#if VTK_MAJOR_VERSION < 8 |
|
|
|
mapper->ImmediateModeRenderingOff(); |
|
|
|
mapper->ImmediateModeRenderingOff(); |
|
|
|
|
|
|
|
#endif |
|
|
|
mapper->SetScalarRange(0, 255); |
|
|
|
mapper->SetScalarRange(0, 255); |
|
|
|
mapper->ScalarVisibilityOn(); |
|
|
|
mapper->ScalarVisibilityOn(); |
|
|
|
|
|
|
|
|
|
|
@ -117,7 +119,9 @@ cv::viz::WPaintedCloud::WPaintedCloud(InputArray cloud) |
|
|
|
|
|
|
|
|
|
|
|
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); |
|
|
|
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); |
|
|
|
VtkUtils::SetInputData(mapper, vtkPolyData::SafeDownCast(elevation->GetOutput())); |
|
|
|
VtkUtils::SetInputData(mapper, vtkPolyData::SafeDownCast(elevation->GetOutput())); |
|
|
|
|
|
|
|
#if VTK_MAJOR_VERSION < 8 |
|
|
|
mapper->ImmediateModeRenderingOff(); |
|
|
|
mapper->ImmediateModeRenderingOff(); |
|
|
|
|
|
|
|
#endif |
|
|
|
mapper->ScalarVisibilityOn(); |
|
|
|
mapper->ScalarVisibilityOn(); |
|
|
|
mapper->SetColorModeToMapScalars(); |
|
|
|
mapper->SetColorModeToMapScalars(); |
|
|
|
|
|
|
|
|
|
|
@ -143,7 +147,9 @@ cv::viz::WPaintedCloud::WPaintedCloud(InputArray cloud, const Point3d& p1, const |
|
|
|
|
|
|
|
|
|
|
|
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); |
|
|
|
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); |
|
|
|
VtkUtils::SetInputData(mapper, vtkPolyData::SafeDownCast(elevation->GetOutput())); |
|
|
|
VtkUtils::SetInputData(mapper, vtkPolyData::SafeDownCast(elevation->GetOutput())); |
|
|
|
|
|
|
|
#if VTK_MAJOR_VERSION < 8 |
|
|
|
mapper->ImmediateModeRenderingOff(); |
|
|
|
mapper->ImmediateModeRenderingOff(); |
|
|
|
|
|
|
|
#endif |
|
|
|
mapper->ScalarVisibilityOn(); |
|
|
|
mapper->ScalarVisibilityOn(); |
|
|
|
mapper->SetColorModeToMapScalars(); |
|
|
|
mapper->SetColorModeToMapScalars(); |
|
|
|
|
|
|
|
|
|
|
@ -182,7 +188,9 @@ cv::viz::WPaintedCloud::WPaintedCloud(InputArray cloud, const Point3d& p1, const |
|
|
|
|
|
|
|
|
|
|
|
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); |
|
|
|
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); |
|
|
|
VtkUtils::SetInputData(mapper, vtkPolyData::SafeDownCast(elevation->GetOutput())); |
|
|
|
VtkUtils::SetInputData(mapper, vtkPolyData::SafeDownCast(elevation->GetOutput())); |
|
|
|
|
|
|
|
#if VTK_MAJOR_VERSION < 8 |
|
|
|
mapper->ImmediateModeRenderingOff(); |
|
|
|
mapper->ImmediateModeRenderingOff(); |
|
|
|
|
|
|
|
#endif |
|
|
|
mapper->ScalarVisibilityOn(); |
|
|
|
mapper->ScalarVisibilityOn(); |
|
|
|
mapper->SetColorModeToMapScalars(); |
|
|
|
mapper->SetColorModeToMapScalars(); |
|
|
|
mapper->SetLookupTable(color_transfer); |
|
|
|
mapper->SetLookupTable(color_transfer); |
|
|
@ -211,7 +219,9 @@ cv::viz::WCloudCollection::WCloudCollection() |
|
|
|
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); |
|
|
|
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); |
|
|
|
mapper->SetInputConnection(append_filter->GetOutputPort()); |
|
|
|
mapper->SetInputConnection(append_filter->GetOutputPort()); |
|
|
|
mapper->SetScalarModeToUsePointData(); |
|
|
|
mapper->SetScalarModeToUsePointData(); |
|
|
|
|
|
|
|
#if VTK_MAJOR_VERSION < 8 |
|
|
|
mapper->ImmediateModeRenderingOff(); |
|
|
|
mapper->ImmediateModeRenderingOff(); |
|
|
|
|
|
|
|
#endif |
|
|
|
mapper->SetScalarRange(0, 255); |
|
|
|
mapper->SetScalarRange(0, 255); |
|
|
|
mapper->ScalarVisibilityOn(); |
|
|
|
mapper->ScalarVisibilityOn(); |
|
|
|
|
|
|
|
|
|
|
@ -416,7 +426,9 @@ cv::viz::WMesh::WMesh(const Mesh &mesh) |
|
|
|
|
|
|
|
|
|
|
|
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); |
|
|
|
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); |
|
|
|
mapper->SetScalarModeToUsePointData(); |
|
|
|
mapper->SetScalarModeToUsePointData(); |
|
|
|
|
|
|
|
#if VTK_MAJOR_VERSION < 8 |
|
|
|
mapper->ImmediateModeRenderingOff(); |
|
|
|
mapper->ImmediateModeRenderingOff(); |
|
|
|
|
|
|
|
#endif |
|
|
|
VtkUtils::SetInputData(mapper, polydata); |
|
|
|
VtkUtils::SetInputData(mapper, polydata); |
|
|
|
|
|
|
|
|
|
|
|
vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New(); |
|
|
|
vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New(); |
|
|
@ -468,7 +480,9 @@ cv::viz::WWidgetMerger::WWidgetMerger() |
|
|
|
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); |
|
|
|
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); |
|
|
|
mapper->SetInputConnection(append_filter->GetOutputPort()); |
|
|
|
mapper->SetInputConnection(append_filter->GetOutputPort()); |
|
|
|
mapper->SetScalarModeToUsePointData(); |
|
|
|
mapper->SetScalarModeToUsePointData(); |
|
|
|
|
|
|
|
#if VTK_MAJOR_VERSION < 8 |
|
|
|
mapper->ImmediateModeRenderingOff(); |
|
|
|
mapper->ImmediateModeRenderingOff(); |
|
|
|
|
|
|
|
#endif |
|
|
|
mapper->SetScalarRange(0, 255); |
|
|
|
mapper->SetScalarRange(0, 255); |
|
|
|
mapper->ScalarVisibilityOn(); |
|
|
|
mapper->ScalarVisibilityOn(); |
|
|
|
|
|
|
|
|
|
|
|