vtk-m/tutorial/io.cxx

29 lines
946 B
C++
Raw Normal View History

//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//============================================================================
2022-01-05 20:30:40 +00:00
// Example 1: very simple VTK-m program.
// Read data set, write it out.
//
#include <vtkm/cont/Initialize.h>
#include <vtkm/io/VTKDataSetReader.h>
#include <vtkm/io/VTKDataSetWriter.h>
2022-01-05 20:30:40 +00:00
int main(int argc, char** argv)
{
vtkm::cont::Initialize(argc, argv);
2022-01-05 20:30:40 +00:00
const char* input = "data/kitchen.vtk";
vtkm::io::VTKDataSetReader reader(input);
vtkm::cont::DataSet ds = reader.ReadDataSet();
vtkm::io::VTKDataSetWriter writer("out_io.vtk");
writer.WriteDataSet(ds);
return 0;
}