2022-02-02 02:45:07 +00:00
|
|
|
//============================================================================
|
|
|
|
// 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>
|
2022-02-07 20:34:18 +00:00
|
|
|
#include <vtkm/io/VTKDataSetReader.h>
|
|
|
|
#include <vtkm/io/VTKDataSetWriter.h>
|
2022-01-05 20:30:40 +00:00
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
2022-10-12 00:23:44 +00:00
|
|
|
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;
|
|
|
|
}
|