vtk-m/vtkm/rendering/testing/UnitTestMapperVolume.cxx

56 lines
1.9 KiB
C++
Raw Normal View History

2016-01-20 22:40:54 +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.
//
// Copyright 2015 Sandia Corporation.
// Copyright 2015 UT-Battelle, LLC.
// Copyright 2015 Los Alamos National Security.
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
// Laboratory (LANL), the U.S. Government retains certain rights in
// this software.
//============================================================================
2016-11-23 15:48:22 +00:00
2017-05-18 14:51:24 +00:00
#include <vtkm/cont/DeviceAdapter.h>
2016-01-20 22:40:54 +00:00
#include <vtkm/cont/testing/MakeTestDataSet.h>
2017-05-18 14:51:24 +00:00
#include <vtkm/cont/testing/Testing.h>
#include <vtkm/rendering/Actor.h>
#include <vtkm/rendering/Canvas.h>
#include <vtkm/rendering/CanvasRayTracer.h>
#include <vtkm/rendering/MapperVolume.h>
#include <vtkm/rendering/Scene.h>
#include <vtkm/rendering/View3D.h>
2016-11-23 15:48:22 +00:00
#include <vtkm/rendering/testing/RenderTest.h>
2017-05-18 14:29:41 +00:00
namespace
{
2016-05-18 17:25:05 +00:00
void RenderTests()
{
2016-11-23 15:48:22 +00:00
typedef vtkm::rendering::MapperVolume M;
typedef vtkm::rendering::CanvasRayTracer C;
typedef vtkm::rendering::View3D V3;
vtkm::cont::testing::MakeTestDataSet maker;
vtkm::rendering::ColorTable colorTable("thermal");
2017-05-18 14:29:41 +00:00
vtkm::rendering::testing::Render<M, C, V3>(maker.Make3DRegularDataSet0(), "pointvar", colorTable,
"reg3D.pnm");
vtkm::rendering::testing::Render<M, C, V3>(maker.Make3DRectilinearDataSet0(), "pointvar",
colorTable, "rect3D.pnm");
}
2016-01-20 22:40:54 +00:00
} //namespace
2016-11-23 15:48:22 +00:00
2017-05-18 14:29:41 +00:00
int UnitTestMapperVolume(int, char* [])
2016-01-20 22:40:54 +00:00
{
2016-11-23 15:48:22 +00:00
return vtkm::cont::testing::Testing::Run(RenderTests);
2016-01-20 22:40:54 +00:00
}