Difference between revisions of "VTK/Examples/Cxx/PolyData/CleanPolyData"

From KitwarePublic
< VTK‎ | Examples‎ | Cxx
Jump to navigationJump to search
(Created page with '==CleanPolyData.cxx== <source lang="cpp"> #include <vtkSmartPointer.h> #include <vtkCubeSource.h> #include <vtkPolyData.h> #include <vtkCleanPolyData.h> int main(int, char *[]) …')
 
Line 41: Line 41:
  
 
</source>
 
</source>
 +
 +
[http://www.resumesplanet.com resume writing service]

Revision as of 10:46, 31 July 2010

CleanPolyData.cxx

#include <vtkSmartPointer.h>
#include <vtkCubeSource.h>
#include <vtkPolyData.h>
#include <vtkCleanPolyData.h>

int main(int, char *[])
{
  vtkSmartPointer<vtkCubeSource> cubeSource = 
    vtkSmartPointer<vtkCubeSource>::New();
  cubeSource->Update();
  
  std::cout << "Input cube has " << cubeSource->GetOutput()->GetNumberOfPoints() 
    << " vertices." << std::endl;
    
  vtkSmartPointer<vtkCleanPolyData> cleanPolyData = 
      vtkSmartPointer<vtkCleanPolyData>::New();
  cleanPolyData->SetInputConnection(cubeSource->GetOutputPort());
  cleanPolyData->Update();
  
  std::cout << "Cleaned cube has " << cleanPolyData->GetOutput()->GetNumberOfPoints() 
    << " vertices." << std::endl;
  
  return EXIT_SUCCESS;
}

CMakeLists.txt

cmake_minimum_required(VERSION 2.6)
PROJECT(CleanPolyData)

FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${VTK_USE_FILE})

ADD_EXECUTABLE(CleanPolyData CleanPolyData.cxx)
TARGET_LINK_LIBRARIES(CleanPolyData vtkHybrid)

resume writing service