Commit Graph

16 Commits

Author SHA1 Message Date
Kenneth Moreland
c238cfea50 Improve deprecation support for moved or renamed headers
VTK-m has a deprecation method that supports API changes in minor
releases. When an API change is made, the old API is marked with the
VTKM_DEPRECATED macro. If code attempts to use the old API, it still
works, but the compiler issues a warning that the thing is deprecated
and where to find the new API.

We have recently run into an issue when the API changes have a header
file renamed or moved. We still keep the old header file with the old
API, so code including that file will still work. However, sometimes
code expected the contents of that header file without directly
including that header file. In these cases, the code could get an error
about missing classes.

As an example, consider the change from `DynamicCellSet` to
`UnknownCellSet`/`UncertainCellSet`. The deprecated `DynamicCellSet` is
still around. But there is a lot of code that did not directly include
DynamicCellSet.h. This header file was necessarily included by
DataSet.h. Now, when this code uses `vtkm::cont::DynamicCellSet`, you
get a confusing error that the class does not exist. Backward
compatibility broken.

In response to this, we should be more careful about where we put the
deprecated API. Instead of containing the deprecated API, moved headers
should be empty except for a warning and an inclusion of the new header
file. The deprecated API should be moved to the new header file. For
example, in the case of `DynamicCellSet`, the implementation for the
deprecated `DynamicCellSet` is moved to UnknownCellSet.h, which is
included by anything that was including DynamicCellSet.h before.
2022-02-16 07:08:05 -07:00
Li-Ta Lo
c161ea03ce migrate image processing filters 2022-02-07 10:03:08 -07:00
Ben Boeckel
aa6eb01dfe ComputeMoments: use FilterField instead of FilterCell 2020-08-31 16:51:12 -04:00
Kenneth Moreland
d3a6def082 Update filters that use FieldCell to use FieldFilter instead
We no longer need to use this deprecated name for a filter class.
2020-08-10 17:25:55 -06:00
Kenneth Moreland
f29a4712b0 Correct field types for ComputeMoments filter
This filter is designed to work on vectors of many sizes. It was written
when selecting field types was the responsibility of the policy. It is
now the responsibility of the filter to specify possible field types.

This change is required to compile the MomentInvariants module for VTK
without policies.
2020-05-18 18:39:22 -06:00
Robert Maynard
0fccc5f2c4 improve moments algorithm performance 2019-10-17 11:51:05 -04:00
Roxana Bujack
9c41daa2bd change input to spacing and radius to make it more intuitive 2019-09-12 14:17:20 -06:00
Roxana Bujack
b991d3c6ba merge style differences 2019-09-11 08:14:18 -06:00
Roxana Bujack
7d0ee16fd1 add the real double radius for scaling 2019-09-04 09:27:39 -06:00
Li-Ta Lo
2718cede97 Add ComputeMoments worklet and filter 2019-08-14 07:30:22 -04:00
Allison Vacanti
ac718e2b33 Remove traits class for ComputeMoments filter.
TypeListTagAll only defines vectors up to size 4, while the default
filter traits do not restrict input types at all.

Since the moments computation may use 6- or 9-tuple vecs, this
restriction is breaking those usecases.
2019-08-14 07:30:21 -04:00
Li-Ta Lo
162d369f5f restored capacity for 2D 2019-08-14 07:30:19 -04:00
Li-Ta Lo
9106a1b46c clarification from Roxana 2019-08-14 07:30:18 -04:00
Li-Ta Lo
f64721c2bc update copyright notice 2019-08-14 07:30:18 -04:00
Li-Ta Lo
675ffe110e parametritize pixel type, it works with 3-vectors 2019-08-14 07:30:17 -04:00
Li-Ta Lo
434f751de1 Add ComputeMoments worklet and filter 2019-08-14 07:30:13 -04:00