Commit Graph

734 Commits

Author SHA1 Message Date
Manish Mathai
eaabcb263b Merge topic 'enhance-glyphing-types'
814ec27f1 Add MapperGlyphScalar and MapperGlyphVector mappers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2747
2022-06-15 20:17:53 -04:00
Manish Mathai
814ec27f1e Add MapperGlyphScalar and MapperGlyphVector mappers
These mappers can be used to render cell sets as glyphs. The following
glyph types are available for scalar fields:
 - Cube
 - Sphere
 - Axes
 - Quads

For vector fields:
 - Arrows
2022-06-15 15:19:53 -07:00
Manish Mathai
09fc8155af Merge topic 'fix-mapper-quad'
27825778e Fix color rendering when using MapperQuad

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2729
2022-04-20 12:04:35 -04:00
Kenneth Moreland
1053b40bde Merge topic 'scoped-enum-rendering'
2fd8a9b9a Remove deprecated use of old unscoped enums in rendering
e051565d9 Use scoped enums in rendering classes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2736
2022-03-21 08:36:35 -04:00
Kenneth Moreland
2fd8a9b9aa Remove deprecated use of old unscoped enums in rendering 2022-03-17 15:28:11 -06:00
Kenneth Moreland
e051565d96 Use scoped enums in rendering classes
We should try to favor scoped enums over unscoped enums for their
enhanced type safety.
2022-03-17 15:28:11 -06:00
Kenneth Moreland
f8f41e0ef5 Update use of field association enumerations
The enumerations in `vtkm::cont::Field::Association` were renamed in the
previous commit. The old names still exist, but are deprecated. Change
the rest of the code to use the new names.
2022-03-17 11:02:37 -06:00
Manish Mathai
27825778e8 Fix color rendering when using MapperQuad
This fix lerps the scalar field values at points of ray intersection,
ensuring rendering of quads pick the correct lerped color instead of
using the same color for the entire quad.
2022-03-11 13:36:35 -08:00
Kenneth Moreland
0f96a6b0be Remove brigand.hpp
GCC 11 is having trouble compiling brigand.hpp at all, even before we
instantiate any templates. Since we no longer need it, let's get rid of
it. It was always placed in an internal namespace.
2022-03-08 07:25:08 -07:00
Vicente Adolfo Bolea Sanchez
3956115969 unittests: relaxed test thresholds for Ascent 2022-02-22 22:00:32 -05:00
Li-Ta Lo
f09032aaaf migrate geometry refinement filters 2022-02-11 20:52:43 -07:00
Li-Ta Lo
c161ea03ce migrate image processing filters 2022-02-07 10:03:08 -07:00
Manish Mathai
ae17410f2f Merge topic 'volume-renderer-oob-fix'
36822756b Fix out of bounds cell location searchs in VolumeRendererStructured

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2685
2022-01-26 14:13:28 -05:00
Manish Mathai
36822756b9 Fix out of bounds cell location searchs in VolumeRendererStructured
`RectilinearLocator::LocateCell` and `UniformLocator::LocateCell` assume
that the point in inside the bounds of the cell set, but may return a
cell location that does not exist, i.e., cell location that is outside
of the bounds of the cell set due to errors from floating point
operations.

This fix, given the assumption above, bounds the calculated cell
location to within the cellset by capping the indices to within the
limits.
2022-01-26 09:27:05 -08:00
Li-Ta Lo
63b9b12755 MapperWireframer.cxx really should include Algorithm.h 2022-01-13 11:14:48 -07:00
Li-Ta Lo
fa0905e3e5 migrate clean_grid and extract_entity filters 2022-01-13 11:14:48 -07:00
Kenneth Moreland
2a65e9bde9 Merge topic 'perlin-noise-test'
c92f9cf15 Add test for PerlinNoise source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2662
2022-01-10 08:49:27 -05:00
Kenneth Moreland
c92f9cf15e Add test for PerlinNoise source 2022-01-05 13:02:36 -07:00
Kenneth Moreland
4650a1da96 Deprecate old methods from DynamicCellSet
The `DynamicCellSet` (and the related `DynamicCellSetBase`) are
deprecated and replaced with `UnknownCellSet` (and `UncertainCellSet`).
Thus, `UnknownCellSet` has some methods inherited from `DynamicCellSet`
but replaced with other functionality. These methods are now marked as
deprecated and their use is removed.
2022-01-05 08:18:17 -07:00
Kenneth Moreland
0b84787f78 Deprecate DynamicCellSet and remove from code
The `DynamicCellSet` class is now marked as deprecated (as is the header
that contains it), and all non-deprecated code is moved to its
`UnknownCellSet` replacement.

Also added a deprecation warning for the VariantArrayHandle.h header
file and deleted a couple inappropriate uses of it.
2022-01-04 15:38:18 -07:00
Kenneth Moreland
de14629c1f Merge topic 'render-test-improvements'
1981f9061 Add secondary image for MapperConnectivity test
d4d1ef955 Add secondary image for MapperQuad test
54c1a85d0 Reduce templating in RenderTest code
c0fbe5f30 Remove antiquated templated render test functions
0fe9300ee Expand test_equal_images
12e116417 Redefine RenderTest interface for library
afa8c9082 Add struct for passing options to render tests
9173d6bba Rename RegressionTests to RenderTests
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nickolas Davis <nadavi@sandia.gov>
Merge-request: !2657
2022-01-04 14:54:31 -05:00
Kenneth Moreland
0a89a5fff5 Store UnknownCellSet instead of DynamicCellSet in DataSet
`UnknownCellSet` is an updated replacement for `DynamicCellSet`. The
next step in the replacement is to change `DataSet` to use the new
class.

Also replaced `DynamicCellSet` with `UnknownCellSet` in a few
places where `DynamicCellSet.h` was not directly included (and
therefore now no longer included at all). This change would have
to be made at some point anyway.
2022-01-03 13:52:30 -07:00
Kenneth Moreland
a2ab460f5d Compile more sources without device compiler
We have been doing a better job at hiding device code (and moving code
into libraries). Smoke out source that no longer needs to be compiled by
device compilers.
2022-01-03 08:23:04 -07:00
Kenneth Moreland
54c1a85d05 Reduce templating in RenderTest code
The `Canvas`, `Mapper`, and `View` classes use virtual polymorphism
amongst each other, so might as well use it.
2021-12-30 10:53:30 -07:00
Kenneth Moreland
c0fbe5f30f Remove antiquated templated render test functions 2021-12-30 10:53:30 -07:00
Kenneth Moreland
0fe9300eed Expand test_equal_images
The `test_equal_images` function has been expanded to supply the
generated image in a `Canvas` or a `DataSet` in addition to a `View`.
Much of the templating code has been removed from `test_equal_images`
and most of the code has moved into the `vtkm_rendering_testing`
library.
2021-12-30 10:53:30 -07:00
Kenneth Moreland
12e1164179 Redefine RenderTest interface for library
The previous functions that enabled the render regression tests were
heavily templated, which required every test using rendering to
recompile the entire rendering system being used. Changed the interface
to not rely on templating so that the RenderTest method can be moved
into a library.

Also moved the options into a struct where they can be better managed.
The render testing functions tended to have lots of arguments that were
difficult to manage. Instead, created a single `struct` that holds all
the potential options. That way when someone specifies on option, it is
clear what option is being set.
2021-12-30 10:53:23 -07:00
Kenneth Moreland
afa8c9082e Add struct for passing options to render tests
This allows you to set the parameters of the `test_equal_image` without
having to call it directly.
2021-12-29 13:12:36 -07:00
Kenneth Moreland
c96f3b86a4 Merge topic 'post-test-images'
1dce468ff Post test render images to dashboard

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nickolas Davis <nadavi@sandia.gov>
Merge-request: !2652
2021-12-15 15:45:40 -05:00
Kenneth Moreland
1dce468ff7 Post test render images to dashboard
By adding some XML tags to the test output, you can push the images used
and generated for tests to the dashboard where they will appear
alongside the test output.

Also made it more automatic to find alternate versions of test images.
2021-12-15 11:12:44 -07:00
Li-Ta Lo
942653bbe2 Extract implementation of MakeTestDataSet to .cxx 2021-12-13 19:11:40 -07:00
Kenneth Moreland
61de2faf7e Allow empty bounds in Camera::ResetToBounds
Although it is generally wrong to try to call `ResetToBounds` with a
`Bounds` object that does not have a valid range, there are cases where
the range might not be valid. (For example, if `ResetToBounds` was
called in a routine that is rendering an empty scene, it would be best
not to crash.)
2021-11-01 11:02:17 -06:00
Manish Mathai
c62998bd1b Batch line and text annotations for View1D 2021-10-19 14:12:18 -07:00
Manish Mathai
f7c43960e5 Update code to follow styling and worklet invoker guidelines 2021-10-19 10:47:56 -07:00
Manish Mathai
b7470b0afc Remove leftover debug statement 2021-10-03 02:13:59 -04:00
Manish Mathai
8f025a2c56 Batch text and line annotation rendering
This commit makes `LineRenderer` and `TextRenderer` to batch line and
text rendering. Batching them has shown a significant speedup,
especially when usin CUDA.
2021-10-02 14:13:14 -07:00
Kenneth Moreland
f883b5e036 Avoid divide by zero in rendering TriangleIntersections 2021-07-12 11:23:24 -06:00
Kenneth Moreland
ede7756929 Allow for empty Z bounds in ResetToBounds
If the camera is not a 3D camera, then it might be the case that the
calling code has not set the bounds in the Z direction. Allow this to
happen as long as you are not using a 3D camera.
2021-07-12 10:57:19 -06:00
Kenneth Moreland
4c1514bb3a Fix divide by zero in CanvasRayTracer
The divide by zero happened when mapping a surface to a depth buffer.
Some rays terminated at the origin, which is a singularity in the
project matrix.

This might be indicative of a larger problem. Rays really shouldn't
terminate before the near plane.
2021-07-12 10:29:46 -06:00
Kenneth Moreland
83369ed95a Remove unused fields from Ortho2DRayGen
There were apparently some fields copy/pasted from the 3D version were
not used in the 2D version (probably because they had no meaning). In
one case, one was erroneously normalized, and could cause a floating
point exception.
2021-07-12 10:29:46 -06:00
Ben Boeckel
4c7fe13a98 cmake: avoid adding testing directories if testing is disabled
Some testing directories have side effects such as installing headers or
compiling code that ultimately doesn't end up getting used.
2021-06-01 18:40:40 -04:00
Kenneth Moreland
cb3bb43ff9 Completely deprecate virtual methods
Deprecate `VirtualObjectHandle` and all other classes that are used to
implement objects with virtual methods in the execution environment.

Additionally, the code is updated so that if the
`VTKm_NO_DEPRECATED_VIRTUAL` flag is set none of the code is compiled at
all. This opens us up to opportunities that do not work with virtual
methods such as backends that do not support virtual methods and dynamic
libraries for CUDA.
2021-04-28 07:28:32 -06:00
Kenneth Moreland
6b144abe41 Remove virtual methods from MeshConnectivity in rendering
Virtual methods were used in the `MeshConnectivity` classes for the
internal ray casting system. However, using virtual methods in the
execution environment is being deprecated.

This change replaces the virtual object with an object containing a
`Variant`. The `Variant` holds one of the supported mesh connectivities
and selects the correct one at runtime rather than jumping into a
virtual method.
2021-04-12 15:53:36 -06:00
nadavi
a683a8802a add support for removing annotations and remove from regression tests 2021-03-31 17:08:46 +00:00
nadavi
268e882c97 raise allowed num of error pixels a bit 2021-03-24 22:57:32 +00:00
nadavi
78e3cbb501 Move regression test images into subdirs, implement io library support 2021-03-24 22:57:32 +00:00
nadavi
d254531657 Implement additional wireframer rendering regression tests 2021-03-18 16:26:07 +00:00
Matt Larsen
7869959841 extend the default clipping plane 2021-03-11 08:43:42 -08:00
Matt Larsen
ffdb33f727 follow coding conventions 2021-03-05 08:47:58 -08:00
Matt Larsen
a778af8bc9 make scalar normilization consistent across rendering 2021-03-05 08:32:10 -08:00