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.
|
|
|
|
//
|
2017-09-20 21:33:44 +00:00
|
|
|
// Copyright 2015 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
|
2016-01-20 22:40:54 +00:00
|
|
|
// Copyright 2015 UT-Battelle, LLC.
|
|
|
|
// Copyright 2015 Los Alamos National Security.
|
|
|
|
//
|
2017-09-20 21:33:44 +00:00
|
|
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
2016-01-20 22:40:54 +00:00
|
|
|
// 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>
|
2016-06-02 21:43:30 +00:00
|
|
|
#include <vtkm/rendering/Actor.h>
|
2016-06-02 22:02:17 +00:00
|
|
|
#include <vtkm/rendering/Canvas.h>
|
|
|
|
#include <vtkm/rendering/CanvasRayTracer.h>
|
2016-06-02 19:41:14 +00:00
|
|
|
#include <vtkm/rendering/MapperVolume.h>
|
2016-04-18 20:42:59 +00:00
|
|
|
#include <vtkm/rendering/Scene.h>
|
2016-09-01 18:33:28 +00:00
|
|
|
#include <vtkm/rendering/View3D.h>
|
2016-11-23 15:48:22 +00:00
|
|
|
#include <vtkm/rendering/testing/RenderTest.h>
|
2016-04-18 20:42:59 +00:00
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace
|
|
|
|
{
|
|
|
|
|
2016-05-18 17:25:05 +00:00
|
|
|
void RenderTests()
|
2016-04-18 20:42:59 +00:00
|
|
|
{
|
2018-05-25 21:18:41 +00:00
|
|
|
using M = vtkm::rendering::MapperVolume;
|
|
|
|
using C = vtkm::rendering::CanvasRayTracer;
|
|
|
|
using V3 = vtkm::rendering::View3D;
|
2016-11-23 15:48:22 +00:00
|
|
|
|
|
|
|
vtkm::cont::testing::MakeTestDataSet maker;
|
2018-01-18 18:55:15 +00:00
|
|
|
vtkm::cont::ColorTable colorTable("inferno");
|
|
|
|
colorTable.AddPointAlpha(0.0, .01f);
|
|
|
|
colorTable.AddPointAlpha(1.0, .01f);
|
2017-05-18 14:29:41 +00:00
|
|
|
|
2017-05-26 17:53:28 +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-04-18 20:42:59 +00:00
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|