Skip to content

Commit

Permalink
Merge pull request #363 from fran6co/vtk6-fixes
Browse files Browse the repository at this point in the history
[Rebase] Make fixes for VTK 6
  • Loading branch information
jspricke committed May 26, 2014
2 parents 512ff6e + 2c941a5 commit 6b53ae2
Show file tree
Hide file tree
Showing 64 changed files with 514 additions and 136 deletions.
2 changes: 1 addition & 1 deletion 2d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if(build)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include" ${VTK_INCLUDE_DIRECTORIES})
PCL_ADD_LIBRARY("${LIB_NAME}" "${SUBSYS_NAME}" ${srcs} ${incs} ${impl_incs})
link_directories(${VTK_LINK_DIRECTORIES})
target_link_libraries("${LIB_NAME}" ${VTK_IO_TARGET_LINK_LIBRARIES} pcl_io)
target_link_libraries("${LIB_NAME}" ${VTK_LIBRARIES} pcl_io)
PCL_MAKE_PKGCONFIG("${LIB_NAME}" "${SUBSYS_NAME}" "${SUBSYS_DESC}" "${SUBSYS_DEPS}" "" "" "" "")

#Install include files
Expand Down
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -352,12 +352,18 @@ option(WITH_VTK "Build VTK-Visualizations" TRUE)
if(WITH_VTK AND NOT ANDROID)
find_package(VTK)
if(VTK_FOUND)
message(STATUS "VTK_MAJOR_VERSION ${VTK_MAJOR_VERSION}")
if (PCL_SHARED_LIBS OR
(NOT (PCL_SHARED_LIBS) AND NOT (VTK_BUILD_SHARED_LIBS)))
set(VTK_FOUND TRUE)
find_package (QVTK)
message(STATUS "VTK found (include: ${VTK_INCLUDE_DIRS}, lib: ${VTK_LIBRARY_DIRS})")
link_directories(${VTK_LIBRARY_DIRS})
if (${VTK_MAJOR_VERSION} VERSION_LESS "6.0")
message(STATUS "VTK found (include: ${VTK_INCLUDE_DIRS}, lib: ${VTK_LIBRARY_DIRS})")
link_directories(${VTK_LIBRARY_DIRS})
else(${VTK_MAJOR_VERSION} VERSION_LESS "6.0")
include (${VTK_USE_FILE})
message(STATUS "VTK found (include: ${VTK_INCLUDE_DIRS}, lib: ${VTK_LIBRARIES}")
endif (${VTK_MAJOR_VERSION} VERSION_LESS "6.0")
set(HAVE_VTK ON)
else ()
set(VTK_FOUND OFF)
Expand Down
6 changes: 3 additions & 3 deletions PCLConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ macro(find_VTK)
if(NOT ANDROID)
find_package(VTK ${QUIET_})
if (VTK_FOUND)
set(VTK_LIBRARIES vtkCommon vtkRendering vtkHybrid vtkCharts)
set(VTK_LIBRARIES "@VTK_LIBRARIES@")
endif(VTK_FOUND)
endif()
endmacro(find_VTK)
Expand Down Expand Up @@ -465,9 +465,9 @@ macro(find_external_library _component _lib _is_optional)
if(${LIB}_LIBRARIES)
list(APPEND PCL_${COMPONENT}_LIBRARIES "${${LIB}_LIBRARIES}")
endif(${LIB}_LIBRARIES)
if(${LIB}_DEFINITIONS)
if(${LIB}_DEFINITIONS AND NOT ${LIB} STREQUAL "VTK")
list(APPEND PCL_${COMPONENT}_DEFINITIONS ${${LIB}_DEFINITIONS})
endif(${LIB}_DEFINITIONS)
endif(${LIB}_DEFINITIONS AND NOT ${LIB} STREQUAL "VTK")
else(${LIB}_FOUND)
if("${_is_optional}" STREQUAL "OPTIONAL")
add_definitions("-DDISABLE_${LIB}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ namespace pcl
filter_scale->Update ();

vtkSmartPointer<vtkPolyData> mapper = filter_scale->GetOutput ();
mapper->Update ();

//generate views
pcl::apps::RenderViewsTesselatedSphere render_views;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ namespace pcl
}

vtkSmartPointer<vtkPolyData> poly = mapper->GetInput ();
poly->Update ();

uniform_sampling (poly, n_samples, cloud_out);

Expand Down
16 changes: 8 additions & 8 deletions apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ if(build)
target_link_libraries(pcl_pcd_organized_edge_detection pcl_common pcl_io pcl_features pcl_visualization)

PCL_ADD_EXECUTABLE(pcl_face_trainer "${SUBSYS_NAME}" src/face_detection/face_trainer.cpp)
target_link_libraries(pcl_face_trainer pcl_features pcl_recognition pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_sample_consensus pcl_surface pcl_keypoints pcl_ml pcl_search pcl_kdtree vtkRendering vtkIO)
target_link_libraries(pcl_face_trainer pcl_features pcl_recognition pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_sample_consensus pcl_surface pcl_keypoints pcl_ml pcl_search pcl_kdtree ${VTK_LIBRARIES})

PCL_ADD_EXECUTABLE_OPT_BUNDLE(pcl_fs_face_detector "${SUBSYS_NAME}" src/face_detection//filesystem_face_detection.cpp)
target_link_libraries(pcl_fs_face_detector pcl_features pcl_recognition pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_sample_consensus pcl_surface pcl_keypoints pcl_ml pcl_search pcl_kdtree vtkRendering vtkIO)
target_link_libraries(pcl_fs_face_detector pcl_features pcl_recognition pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_sample_consensus pcl_surface pcl_keypoints pcl_ml pcl_search pcl_kdtree ${VTK_LIBRARIES})

PCL_ADD_EXECUTABLE(pcl_stereo_ground_segmentation "${SUBSYS_NAME}" src/stereo_ground_segmentation.cpp)
target_link_libraries(pcl_stereo_ground_segmentation pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_features pcl_stereo)
Expand Down Expand Up @@ -142,37 +142,37 @@ if(build)
target_link_libraries(pcl_openni_organized_edge_detection pcl_common pcl_io pcl_features pcl_visualization)

PCL_ADD_EXECUTABLE_OPT_BUNDLE(pcl_openni_face_detector "${SUBSYS_NAME}" src/face_detection//openni_face_detection.cpp src/face_detection//openni_frame_source.cpp)
target_link_libraries(pcl_openni_face_detector pcl_features pcl_recognition pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_sample_consensus pcl_surface pcl_keypoints pcl_ml pcl_search pcl_kdtree vtkRendering vtkIO)
target_link_libraries(pcl_openni_face_detector pcl_features pcl_recognition pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_sample_consensus pcl_surface pcl_keypoints pcl_ml pcl_search pcl_kdtree ${VTK_LIBRARIES})

if (QT4_FOUND AND VTK_USE_QVTK)
# OpenNI Passthrough application demo
QT4_WRAP_UI(openni_passthrough_ui src/openni_passthrough.ui)
QT4_WRAP_CPP(openni_passthrough_moc include/pcl/apps/openni_passthrough.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
PCL_ADD_EXECUTABLE(pcl_openni_passthrough "${SUBSYS_NAME}" ${openni_passthrough_ui} ${openni_passthrough_moc} src/openni_passthrough.cpp)
target_link_libraries(pcl_openni_passthrough pcl_common pcl_io pcl_filters pcl_visualization QVTK ${QT_LIBRARIES})
target_link_libraries(pcl_openni_passthrough pcl_common pcl_io pcl_filters pcl_visualization ${QVTK_LIBRARY} ${QT_LIBRARIES})

# OpenNI Organized Connected Component application demo
QT4_WRAP_UI(organized_segmentation_demo_ui src/organized_segmentation_demo.ui)
QT4_WRAP_CPP(organized_segmentation_demo_moc include/pcl/apps/organized_segmentation_demo.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
PCL_ADD_EXECUTABLE_OPT_BUNDLE(pcl_organized_segmentation_demo "${SUBSYS_NAME}" ${organized_segmentation_demo_ui} ${organized_segmentation_demo_moc} src/organized_segmentation_demo.cpp)
target_link_libraries(pcl_organized_segmentation_demo pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface QVTK ${QT_LIBRARIES})
target_link_libraries(pcl_organized_segmentation_demo pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface ${QVTK_LIBRARY} ${QT_LIBRARIES})

# Manual registration demo
QT4_WRAP_UI(manual_registration_ui src/manual_registration/manual_registration.ui)
QT4_WRAP_CPP(manual_registration_moc include/pcl/apps/manual_registration.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
PCL_ADD_EXECUTABLE_OPT_BUNDLE(pcl_manual_registration "${SUBSYS_NAME}" ${manual_registration_ui} ${manual_registration_moc} src/manual_registration/manual_registration.cpp)
target_link_libraries(pcl_manual_registration pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface QVTK ${QT_LIBRARIES})
target_link_libraries(pcl_manual_registration pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface ${QVTK_LIBRARY} ${QT_LIBRARIES})

QT4_WRAP_UI(pcd_video_player_ui src/pcd_video_player/pcd_video_player.ui)
QT4_WRAP_CPP(pcd_video_player_moc include/pcl/apps/pcd_video_player.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
PCL_ADD_EXECUTABLE_OPT_BUNDLE(pcl_pcd_video_player "${SUBSYS_NAME}" ${pcd_video_player_ui} ${pcd_video_player_moc} src/pcd_video_player/pcd_video_player.cpp)
target_link_libraries(pcl_pcd_video_player pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface QVTK ${QT_LIBRARIES})
target_link_libraries(pcl_pcd_video_player pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface ${QVTK_LIBRARY} ${QT_LIBRARIES})

# Database processing (integration) demo
# QT4_WRAP_UI(db_proc_ui src/db_proc/db_proc.ui)
# QT4_WRAP_CPP(db_proc_moc include/pcl/apps/db_proc.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
# PCL_ADD_EXECUTABLE_OPT_BUNDLE(pcl_db_proc "${SUBSYS_NAME}" ${db_proc_ui} ${db_proc_moc} src/db_proc/db_proc.cpp)
# target_link_libraries(pcl_db_proc pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface QVTK ${QT_LIBRARIES})
# target_link_libraries(pcl_db_proc pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface ${QVTK_LIBRARY} ${QT_LIBRARIES})

endif ()

Expand Down
2 changes: 1 addition & 1 deletion apps/cloud_composer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ if(build)

set(EXE_NAME "pcl_${SUBSUBSYS_NAME}")
PCL_ADD_EXECUTABLE("${EXE_NAME}" "${SUBSUBSYS_NAME}" ${cloud_composer_ui} ${cloud_composer_moc} ${srcs} ${resource_srcs} ${item_srcs} ${selector_srcs} ${impl_incs})
target_link_libraries("${EXE_NAME}" pcl_common pcl_io pcl_visualization pcl_filters QVTK ${QT_LIBRARIES})
target_link_libraries("${EXE_NAME}" pcl_common pcl_io pcl_visualization pcl_filters ${QVTK_LIBRARY} ${QT_LIBRARIES})

# Install include files
PCL_ADD_INCLUDES("${SUBSUBSYS_NAME}" "${SUBSUBSYS_NAME}" ${incs} ${item_incs} ${selector_incs})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,24 @@ pcl::cloud_composer::RectangularFrustumSelector::OnLeftButtonUp ()
vtkMapper* mapper = act->actor->GetMapper ();
vtkDataSet* data = mapper->GetInput ();
vtkPolyData* poly_data = vtkPolyData::SafeDownCast (data);
#if VTK_MAJOR_VERSION > 5
id_filter->SetInputData (poly_data);
#else
id_filter->SetInput (poly_data);
#endif
//extract_geometry->SetInput (poly_data);

vtkSmartPointer<vtkPolyData> selected = vtkSmartPointer<vtkPolyData>::New ();
glyph_filter->SetOutput (selected);
glyph_filter->Update ();
#if VTK_MAJOR_VERSION < 6
selected->SetSource (0);
#endif
if (selected->GetNumberOfPoints() > 0)
{
qDebug () << "Selected " << selected->GetNumberOfPoints () << " points.";
id_selected_data_map.insert ( QString::fromStdString ((*it).first), selected);
#if VTK_MAJOR_VERSION <= 5
#if VTK_MAJOR_VERSION < 6
append->AddInput (selected);
#else // VTK 6
append->AddInputData (selected);
Expand All @@ -77,9 +83,12 @@ pcl::cloud_composer::RectangularFrustumSelector::OnLeftButtonUp ()
append->Update ();
vtkSmartPointer<vtkPolyData> all_points = append->GetOutput ();
qDebug () << "Allpoints = " <<all_points->GetNumberOfPoints ();

selected_mapper->SetInput (all_points);

#if VTK_MAJOR_VERSION < 6
selected_mapper->SetInput (all_points);
#else
selected_mapper->SetInputData (all_points);
#endif
selected_mapper->ScalarVisibilityOff ();

vtkIdTypeArray* ids = vtkIdTypeArray::SafeDownCast (all_points->GetPointData ()->GetArray ("OriginalIds"));
Expand Down
2 changes: 1 addition & 1 deletion apps/modeler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ if(build)
# Generate executable
set(EXE_NAME "pcl_${SUBSUBSYS_NAME}")
PCL_ADD_EXECUTABLE("${EXE_NAME}" "${SUBSUBSYS_NAME}" ${ui_srcs} ${moc_srcs} ${resource_srcs} ${srcs} ${incs} ${impl_incs})
target_link_libraries("${EXE_NAME}" pcl_common pcl_io pcl_kdtree pcl_filters pcl_visualization pcl_segmentation pcl_surface pcl_features pcl_sample_consensus pcl_search QVTK ${QT_LIBRARIES})
target_link_libraries("${EXE_NAME}" pcl_common pcl_io pcl_kdtree pcl_filters pcl_visualization pcl_segmentation pcl_surface pcl_features pcl_sample_consensus pcl_search ${QVTK_LIBRARY} ${QT_LIBRARIES})

# Put the ui in the windows project file
IF("${CMAKE_BUILD_TOOL}" MATCHES "msdev")
Expand Down
6 changes: 4 additions & 2 deletions apps/modeler/src/normals_actor_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ pcl::modeler::NormalsActorItem::initImpl()
createNormalLines();

vtkSmartPointer<vtkDataSetMapper> mapper = vtkSmartPointer<vtkDataSetMapper>::New();
#if VTK_MAJOR_VERSION < 6
mapper->SetInput(poly_data_);
#else
mapper->SetInputData (poly_data_);
#endif

vtkSmartPointer<vtkDataArray> scalars;
cloud_mesh_->getColorScalarsFromField(scalars, color_scheme_);
Expand Down Expand Up @@ -166,8 +170,6 @@ pcl::modeler::NormalsActorItem::updateImpl()
scalars->GetRange(minmax);
actor_->GetMapper()->SetScalarRange(minmax);

poly_data_->Update();

return;
}

Expand Down
7 changes: 2 additions & 5 deletions apps/modeler/src/points_actor_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,12 @@ void
pcl::modeler::PointsActorItem::initImpl()
{
poly_data_->SetPoints(cloud_mesh_->getVtkPoints());
poly_data_->Update();

vtkSmartPointer<vtkVertexGlyphFilter> vertex_glyph_filter = vtkSmartPointer<vtkVertexGlyphFilter>::New();
#if VTK_MAJOR_VERSION <= 5
#if VTK_MAJOR_VERSION < 6
vertex_glyph_filter->AddInput(poly_data_);
#else
vertex_glyph_filter->AddInputData(polydata);
vertex_glyph_filter->AddInputData (poly_data_);
#endif
vertex_glyph_filter->Update();

Expand Down Expand Up @@ -109,8 +108,6 @@ pcl::modeler::PointsActorItem::updateImpl()
scalars->GetRange(minmax);
actor_->GetMapper()->SetScalarRange(minmax);

poly_data_->Update();

return;
}

Expand Down
7 changes: 4 additions & 3 deletions apps/modeler/src/surface_actor_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ pcl::modeler::SurfaceActorItem::initImpl()
vtkSmartPointer<vtkDataArray> scalars;
cloud_mesh_->getColorScalarsFromField(scalars, color_scheme_);
poly_data_->GetPointData ()->SetScalars (scalars);
poly_data_->Update();

vtkSmartPointer<vtkDataSetMapper> mapper = vtkSmartPointer<vtkDataSetMapper>::New();
#if VTK_MAJOR_VERSION < 6
mapper->SetInput(poly_data_);
#else
mapper->SetInputData (poly_data_);
#endif

double minmax[2];
scalars->GetRange(minmax);
Expand Down Expand Up @@ -108,8 +111,6 @@ pcl::modeler::SurfaceActorItem::updateImpl()
scalars->GetRange(minmax);
actor_->GetMapper()->SetScalarRange(minmax);

poly_data_->Update();

return;
}

Expand Down
5 changes: 4 additions & 1 deletion apps/src/render_views_tesselated_sphere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ pcl::apps::RenderViewsTesselatedSphere::generateViews() {

vtkSmartPointer<vtkTransformFilter> trans_filter_center = vtkSmartPointer<vtkTransformFilter>::New ();
trans_filter_center->SetTransform (trans_center);
#if VTK_MAJOR_VERSION < 6
trans_filter_center->SetInput (polydata_);
#else
trans_filter_center->SetInputData (polydata_);
#endif
trans_filter_center->Update ();

vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New ();
Expand Down Expand Up @@ -116,7 +120,6 @@ pcl::apps::RenderViewsTesselatedSphere::generateViews() {

// Get camera positions
vtkPolyData *sphere = subdivide->GetOutput ();
sphere->Update ();

std::vector<Eigen::Vector3f> cam_positions;
if (!use_vertices_)
Expand Down
37 changes: 23 additions & 14 deletions cmake/Modules/FindQVTK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,26 @@
# QVTK_LIBRARY - QVTK library.
# if QVTK_FOUND then QVTK_INCLUDE_DIR is appended to VTK_INCLUDE_DIRS and
# QVTK_LIBRARY is appended to QVTK_LIBRARY_DIR

find_library (QVTK_LIBRARY QVTK HINTS ${VTK_DIR} ${VTK_DIR}/bin)
find_path (QVTK_INCLUDE_DIR QVTKWidget.h HINT ${VTK_INCLUDE_DIRS})
find_package_handle_standard_args(QVTK DEFAULT_MSG
QVTK_LIBRARY QVTK_INCLUDE_DIR)

if(NOT QVTK_FOUND)
set (VTK_USE_QVTK OFF)
else(NOT QVTK_FOUND)
get_filename_component (QVTK_LIBRARY_DIR ${QVTK_LIBRARY} PATH)
set (VTK_LIBRARY_DIRS ${VTK_LIBRARY_DIRS} ${QVTK_LIBRARY_DIR})
set (VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${QVTK_INCLUDE_DIR})
set (VTK_USE_QVTK ON)
endif(NOT QVTK_FOUND)
if (${VTK_MAJOR_VERSION} VERSION_LESS "6.0")
find_library (QVTK_LIBRARY QVTK HINTS ${VTK_DIR} ${VTK_DIR}/bin)
find_path (QVTK_INCLUDE_DIR QVTKWidget.h HINT ${VTK_INCLUDE_DIRS})
find_package_handle_standard_args(QVTK DEFAULT_MSG
QVTK_LIBRARY QVTK_INCLUDE_DIR)
if(NOT QVTK_FOUND)
set (VTK_USE_QVTK OFF)
else(NOT QVTK_FOUND)
get_filename_component (QVTK_LIBRARY_DIR ${QVTK_LIBRARY} PATH)
set (VTK_LIBRARY_DIRS ${VTK_LIBRARY_DIRS} ${QVTK_LIBRARY_DIR})
set (VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${QVTK_INCLUDE_DIR})
set (VTK_USE_QVTK ON)
endif(NOT QVTK_FOUND)
else (${VTK_MAJOR_VERSION} VERSION_LESS "6.0")
list (FIND VTK_MODULES_ENABLED vtkGUISupportQt GUI_SUUPORT_QT_FOUND)
list (FIND VTK_MODULES_ENABLED vtkRenderingQt RENDERING_QT_FOUND)
if (GUI_SUUPORT_QT_FOUND AND RENDERING_QT_FOUND)
set (VTK_USE_QVTK ON)
set (QVTK_LIBRARY vtkRenderingQt vtkGUISupportQt)
else (GUI_SUUPORT_QT_FOUND AND RENDERING_QT_FOUND)
unset(QVTK_FOUND)
endif (GUI_SUUPORT_QT_FOUND AND RENDERING_QT_FOUND)
endif (${VTK_MAJOR_VERSION} VERSION_LESS "6.0")
2 changes: 1 addition & 1 deletion io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ if(build)
add_definitions(${VTK_DEFINES})
PCL_ADD_LIBRARY("${LIB_NAME}" "${SUBSYS_NAME}" ${srcs} ${incs} ${compression_incs} ${impl_incs} ${OPENNI_INCLUDES} ${OPENNI2_INCLUDES})
link_directories(${VTK_LINK_DIRECTORIES})
target_link_libraries("${LIB_NAME}" pcl_common pcl_io_ply ${VTK_IO_TARGET_LINK_LIBRARIES} ${VTK_COMMON_TARGET_LINK_LIBRARIES})
target_link_libraries("${LIB_NAME}" pcl_common pcl_io_ply ${VTK_LIBRARIES} )
if(PNG_FOUND)
target_link_libraries("${LIB_NAME}" "${PNG_LIBRARY}")
endif(PNG_FOUND)
Expand Down
3 changes: 2 additions & 1 deletion io/include/pcl/io/impl/vtk_lib_io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#ifdef __GNUC__
#pragma GCC system_header
#endif
#include <vtkVersion.h>
#include <vtkFloatArray.h>
#include <vtkPointData.h>
#include <vtkPoints.h>
Expand Down Expand Up @@ -377,7 +378,7 @@ pcl::io::pointCloudTovtkPolyData (const pcl::PointCloud<PointT>& cloud, vtkPolyD

// Add 0D topology to every point
vtkSmartPointer<vtkVertexGlyphFilter> vertex_glyph_filter = vtkSmartPointer<vtkVertexGlyphFilter>::New ();
#if VTK_MAJOR_VERSION <= 5
#if VTK_MAJOR_VERSION < 6
vertex_glyph_filter->AddInputConnection (temp_polydata->GetProducerPort ());
#else
vertex_glyph_filter->SetInputData (temp_polydata);
Expand Down
1 change: 1 addition & 0 deletions io/include/pcl/io/vtk_lib_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#ifdef __GNUC__
#pragma GCC system_header
#endif
#include <vtkVersion.h>
#include <vtkSmartPointer.h>
#include <vtkStructuredGrid.h>
#include <vtkPoints.h>
Expand Down
Loading

0 comments on commit 6b53ae2

Please sign in to comment.