1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

more refactoring

This commit is contained in:
Anatoly Baksheev
2014-01-07 22:59:40 +04:00
parent 4833976a0c
commit 38c9fa4a92
2 changed files with 2 additions and 43 deletions
+1 -17
View File
@@ -45,14 +45,6 @@
#include "precomp.hpp"
namespace cv
{
namespace viz
{
template<typename _Tp> Vec<_Tp, 3>* vtkpoints_data(vtkSmartPointer<vtkPoints>& points);
}
}
///////////////////////////////////////////////////////////////////////////////////////////////
/// line widget implementation
cv::viz::WLine::WLine(const Point3d &pt1, const Point3d &pt2, const Color &color)
@@ -350,7 +342,7 @@ cv::viz::WCoordinateSystem::WCoordinateSystem(double scale)
polydata->GetPointData()->SetScalars(colors);
vtkSmartPointer<vtkTubeFilter> tube_filter = vtkSmartPointer<vtkTubeFilter>::New();
VtkUtils::SetInputData(tube_filter, polydata);
tube_filter->SetInputConnection(polydata->GetProducerPort());
tube_filter->SetRadius(axes->GetScaleFactor() / 50.0);
tube_filter->SetNumberOfSides(6);
@@ -445,11 +437,7 @@ namespace cv { namespace viz { namespace
// Extract the edges so we have the grid
vtkSmartPointer<vtkExtractEdges> filter = vtkSmartPointer<vtkExtractEdges>::New();
#if VTK_MAJOR_VERSION <= 5
filter->SetInputConnection(grid->GetProducerPort());
#else
filter->SetInputData(grid);
#endif
filter->Update();
return filter->GetOutput();
}
@@ -461,11 +449,7 @@ cv::viz::WGrid::WGrid(const Vec2i &dimensions, const Vec2d &spacing, const Color
vtkSmartPointer<vtkPolyData> grid = GridUtils::createGrid(dimensions, spacing);
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
#if VTK_MAJOR_VERSION <= 5
mapper->SetInputConnection(grid->GetProducerPort());
#else
mapper->SetInputData(grid);
#endif
vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
actor->SetMapper(mapper);