Go to the documentation of this file.
11 #ifndef vtk_m_worklet_Wavelets_h
12 #define vtk_m_worklet_Wavelets_h
52 using InputDomain = _1;
113 template <
typename PortalOutType,
typename PortalInType>
115 const PortalInType& portalIn,
119 vtkm::Id sigPretendX, sigPretendY, sigPretendZ;
121 typename PortalOutType::ValueType sym = 1.0;
132 sigPretendX =
extDimX - extX - 1;
162 sigPretendY =
extDimY - extY - 1;
192 sigPretendZ =
extDimZ - extZ - 1;
218 sigPretendX = sigPretendY = sigPretendZ = 0;
224 portalOut.Set(workIndex, 0.0);
228 portalOut.Set(workIndex,
229 sym * portalIn.Get(
SigPretend3Dto1D(sigPretendX, sigPretendY, sigPretendZ)));
309 else if (0 <= inX && inX <
dimX1)
383 else if (0 <= inY && inY <
dimY1)
455 else if (0 <= inZ && inZ <
dimZ1)
569 else if (0 <= inX && inX <
dimX1)
685 else if (0 <= inY && inY <
dimY1)
798 else if (0 <= inZ && inZ <
dimZ1)
844 using InputDomain = _6;
885 this->
lstart = odd_low ? 1 : 0;
903 #define VAL vtkm::Float64
904 #define MAKEVAL(a) (static_cast<VAL>(a))
905 template <
typename InPortalType1,
typename InPortalType2,
typename InPortalType3>
907 const InPortalType2& portal2,
908 const InPortalType3& portal3,
914 return MAKEVAL(portal2.Get(inIdx));
916 else if (inCube == 1)
918 return MAKEVAL(portal1.Get(inIdx));
920 else if (inCube == 3)
922 return MAKEVAL(portal3.Get(inIdx));
930 template <
typename InPortalType1,
931 typename InPortalType2,
932 typename InPortalType3,
933 typename FilterPortalType,
934 typename OutputPortalType>
936 const InPortalType2& inPortal2,
937 const InPortalType3& inPortal3,
938 const FilterPortalType& lowFilter,
939 const FilterPortalType& highFilter,
940 OutputPortalType& coeffOut,
943 vtkm::Id workX, workY, workZ, output1D;
945 vtkm::Id inputCube = 0, inputIdx = 0;
946 using OutputValueType =
typename OutputPortalType::ValueType;
955 sum += lowFilter.Get(k) *
GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx);
959 coeffOut.Set(output1D,
static_cast<OutputValueType
>(sum));
968 sum += highFilter.Get(k) *
GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx);
972 coeffOut.Set(output1D,
static_cast<OutputValueType
>(sum));
997 using InputDomain = _6;
1038 this->
lstart = odd_low ? 1 : 0;
1056 #define VAL vtkm::Float64
1057 #define MAKEVAL(a) (static_cast<VAL>(a))
1058 template <
typename InPortalType1,
typename InPortalType2,
typename InPortalType3>
1060 const InPortalType2& portal2,
1061 const InPortalType3& portal3,
1067 return MAKEVAL(portal2.Get(inIdx));
1069 else if (inCube == 1)
1071 return MAKEVAL(portal1.Get(inIdx));
1073 else if (inCube == 3)
1075 return MAKEVAL(portal3.Get(inIdx));
1083 template <
typename InPortalType1,
1084 typename InPortalType2,
1085 typename InPortalType3,
1086 typename FilterPortalType,
1087 typename OutputPortalType>
1089 const InPortalType2& inPortal2,
1090 const InPortalType3& inPortal3,
1091 const FilterPortalType& lowFilter,
1092 const FilterPortalType& highFilter,
1093 OutputPortalType& coeffOut,
1096 vtkm::Id workX, workY, workZ, output1D;
1098 vtkm::Id inputCube = 0, inputIdx = 0;
1099 using OutputValueType =
typename OutputPortalType::ValueType;
1108 sum += lowFilter.Get(k) *
GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx);
1112 coeffOut.Set(output1D,
static_cast<OutputValueType
>(sum));
1121 sum += highFilter.Get(k) *
GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx);
1125 coeffOut.Set(output1D,
static_cast<OutputValueType
>(sum));
1150 using InputDomain = _6;
1191 this->
lstart = odd_low ? 1 : 0;
1209 #define VAL vtkm::Float64
1210 #define MAKEVAL(a) (static_cast<VAL>(a))
1211 template <
typename InPortalType1,
typename InPortalType2,
typename InPortalType3>
1213 const InPortalType2& portal2,
1214 const InPortalType3& portal3,
1220 return MAKEVAL(portal2.Get(inIdx));
1222 else if (inCube == 1)
1224 return MAKEVAL(portal1.Get(inIdx));
1226 else if (inCube == 3)
1228 return MAKEVAL(portal3.Get(inIdx));
1236 template <
typename InPortalType1,
1237 typename InPortalType2,
1238 typename InPortalType3,
1239 typename FilterPortalType,
1240 typename OutputPortalType>
1242 const InPortalType2& inPortal2,
1243 const InPortalType3& inPortal3,
1244 const FilterPortalType& lowFilter,
1245 const FilterPortalType& highFilter,
1246 OutputPortalType& coeffOut,
1249 vtkm::Id workX, workY, workZ, output1D;
1251 vtkm::Id inputCube = 0, inputIdx = 0;
1252 using OutputValueType =
typename OutputPortalType::ValueType;
1261 sum += lowFilter.Get(k) *
GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx);
1265 coeffOut.Set(output1D,
static_cast<OutputValueType
>(sum));
1274 sum += highFilter.Get(k) *
GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx);
1278 coeffOut.Set(output1D,
static_cast<OutputValueType
>(sum));
1318 using InputDomain = _8;
1387 #define VAL vtkm::Float64
1388 #define MAKEVAL(a) (static_cast<VAL>(a))
1389 template <
typename InPortalType1,
1390 typename InPortalType2,
1391 typename InPortalType3,
1392 typename InPortalType4,
1393 typename InPortalType5>
1395 const InPortalType2& ext2,
1396 const InPortalType3& ext3,
1397 const InPortalType4& ext4,
1398 const InPortalType5& sig5,
1404 return MAKEVAL(ext2.Get(inIdx));
1406 else if (inCube == 4)
1408 return MAKEVAL(ext4.Get(inIdx));
1410 else if (inCube == 1)
1412 return MAKEVAL(ext1.Get(inIdx));
1414 else if (inCube == 3)
1416 return MAKEVAL(ext3.Get(inIdx));
1418 else if (inCube == 5)
1420 return MAKEVAL(sig5.Get(inIdx));
1428 template <
typename InPortalType1,
1429 typename InPortalType2,
1430 typename InPortalType3,
1431 typename InPortalType4,
1432 typename InPortalType5,
1433 typename FilterPortalType,
1434 typename OutputValueType>
1436 const InPortalType2& portal2,
1437 const InPortalType3& portal3,
1438 const InPortalType4& portal4,
1439 const InPortalType5& portal5,
1440 const FilterPortalType& lowFilter,
1441 const FilterPortalType& highFilter,
1442 OutputValueType& coeffOut,
1447 vtkm::Id inputCube = 0, inputIdx = 0;
1464 xi = (workX + 1) / 2;
1468 sum += lowFilter.Get(k1) *
1469 GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1477 sum += highFilter.Get(k2) *
1478 GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1482 coeffOut =
static_cast<OutputValueType
>(sum);
1500 xi = (workX + 1) / 2;
1515 cA =
GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1517 cD =
GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1518 sum += lowFilter.Get(k1) * cA + highFilter.Get(k1) * cD;
1522 coeffOut =
static_cast<OutputValueType
>(sum);
1549 using InputDomain = _8;
1618 #define VAL vtkm::Float64
1619 #define MAKEVAL(a) (static_cast<VAL>(a))
1620 template <
typename InPortalType1,
1621 typename InPortalType2,
1622 typename InPortalType3,
1623 typename InPortalType4,
1624 typename InPortalType5>
1626 const InPortalType2& ext2,
1627 const InPortalType3& ext3,
1628 const InPortalType4& ext4,
1629 const InPortalType5& sig5,
1635 return MAKEVAL(ext2.Get(inIdx));
1637 else if (inCube == 4)
1639 return MAKEVAL(ext4.Get(inIdx));
1641 else if (inCube == 1)
1643 return MAKEVAL(ext1.Get(inIdx));
1645 else if (inCube == 3)
1647 return MAKEVAL(ext3.Get(inIdx));
1649 else if (inCube == 5)
1651 return MAKEVAL(sig5.Get(inIdx));
1659 template <
typename InPortalType1,
1660 typename InPortalType2,
1661 typename InPortalType3,
1662 typename InPortalType4,
1663 typename InPortalType5,
1664 typename FilterPortalType,
1665 typename OutputValueType>
1667 const InPortalType2& portal2,
1668 const InPortalType3& portal3,
1669 const InPortalType4& portal4,
1670 const InPortalType5& portal5,
1671 const FilterPortalType& lowFilter,
1672 const FilterPortalType& highFilter,
1673 OutputValueType& coeffOut,
1678 vtkm::Id inputCube = 0, inputIdx = 0;
1695 yi = (workY + 1) / 2;
1699 sum += lowFilter.Get(k1) *
1700 GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1708 sum += highFilter.Get(k2) *
1709 GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1713 coeffOut =
static_cast<OutputValueType
>(sum);
1731 yi = (workY + 1) / 2;
1746 cA =
GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1748 cD =
GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1749 sum += lowFilter.Get(k1) * cA + highFilter.Get(k1) * cD;
1753 coeffOut =
static_cast<OutputValueType
>(sum);
1780 using InputDomain = _8;
1851 #define VAL vtkm::Float64
1852 #define MAKEVAL(a) (static_cast<VAL>(a))
1853 template <
typename InPortalType1,
1854 typename InPortalType2,
1855 typename InPortalType3,
1856 typename InPortalType4,
1857 typename InPortalType5>
1859 const InPortalType2& ext2,
1860 const InPortalType3& ext3,
1861 const InPortalType4& ext4,
1862 const InPortalType5& sig5,
1868 return MAKEVAL(ext2.Get(inIdx));
1870 else if (inCube == 4)
1872 return MAKEVAL(ext4.Get(inIdx));
1874 else if (inCube == 1)
1876 return MAKEVAL(ext1.Get(inIdx));
1878 else if (inCube == 3)
1880 return MAKEVAL(ext3.Get(inIdx));
1882 else if (inCube == 5)
1884 return MAKEVAL(sig5.Get(inIdx));
1892 template <
typename InPortalType1,
1893 typename InPortalType2,
1894 typename InPortalType3,
1895 typename InPortalType4,
1896 typename InPortalType5,
1897 typename FilterPortalType,
1898 typename OutputValueType>
1900 const InPortalType2& portal2,
1901 const InPortalType3& portal3,
1902 const InPortalType4& portal4,
1903 const InPortalType5& portal5,
1904 const FilterPortalType& lowFilter,
1905 const FilterPortalType& highFilter,
1906 OutputValueType& coeffOut,
1911 vtkm::Id inputCube = 0, inputIdx = 0;
1928 zi = (workZ + 1) / 2;
1932 sum += lowFilter.Get(k1) *
1933 GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1941 sum += highFilter.Get(k2) *
1942 GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1946 coeffOut =
static_cast<OutputValueType
>(sum);
1964 zi = (workZ + 1) / 2;
1979 cA =
GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1981 cD =
GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1982 sum += lowFilter.Get(k1) * cA + highFilter.Get(k1) * cD;
1986 coeffOut =
static_cast<OutputValueType
>(sum);
2075 if (0 <= inX && inX <
x1)
2078 idx = inY *
x1 + inX;
2080 else if (
x1 <= inX && inX < (
x1 +
xa))
2085 else if ((
x1 +
xa) <= inX && inX < (
x1 +
xa +
x2))
2088 idx = inY *
x2 + (inX -
x1 -
xa);
2093 idx = inY *
x3 + (inX -
x1 -
xa -
x2);
2108 if (0 <= inY && inY <
y1)
2111 idx = inY *
x1 + inX;
2113 else if (
y1 <= inY && inY < (
y1 +
ya))
2118 else if ((
y1 +
ya) <= inY && inY < (
y1 +
ya +
y2))
2121 idx = (inY -
y1 -
ya) *
x2 + inX;
2126 idx = (inY -
y1 -
ya -
y2) *
x3 + inX;
2142 const vtkm::Id x1,
y1,
xa,
ya,
x2,
y2,
x3,
y3,
xd,
yd,
x4,
y4;
2194 if (0 <= inX && inX <
dimX1)
2197 idx = inY *
dimX1 + inX;
2212 if (0 <= inY && inY <
dimY1)
2215 idx = inY *
dimX1 + inX;
2245 using InputDomain = _1;
2294 template <
typename PortalOutType,
typename PortalInType>
2296 const PortalInType& portalIn,
2299 vtkm::Id extX, extY, sigPretendX, sigPretendY;
2300 sigPretendX = sigPretendY = 0;
2302 typename PortalOutType::ValueType sym = 1.0;
2312 sigPretendX =
extDimX - extX - 1;
2324 sigPretendY =
extDimY - extY - 1;
2366 portalOut.Set(workIndex, 0.0);
2370 portalOut.Set(workIndex, sym * portalIn.Get(
SigPretend2Dto1D(sigPretendX, sigPretendY)));
2393 using InputDomain = _6;
2417 ,
translator(x1, y1, x2, y2, startx2, starty2, pretendx2, pretendy2, x3, y3, mode_lr)
2432 #define VAL vtkm::Float64
2433 #define MAKEVAL(a) (static_cast<VAL>(a))
2434 template <
typename InPortalType1,
typename InPortalType2,
typename InPortalType3>
2436 const InPortalType2& portal2,
2437 const InPortalType3& portal3,
2443 return MAKEVAL(portal1.Get(inIdx));
2445 else if (inMatrix == 2)
2447 return MAKEVAL(portal2.Get(inIdx));
2449 else if (inMatrix == 3)
2451 return MAKEVAL(portal3.Get(inIdx));
2459 template <
typename InPortalType1,
2460 typename InPortalType2,
2461 typename InPortalType3,
2462 typename FilterPortalType,
2463 typename OutputPortalType>
2465 const InPortalType2& inPortal2,
2466 const InPortalType3& inPortal3,
2467 const FilterPortalType& lowFilter,
2468 const FilterPortalType& highFilter,
2469 OutputPortalType& coeffOut,
2474 vtkm::Id inputMatrix = 0, inputIdx = 0;
2475 using OutputValueType =
typename OutputPortalType::ValueType;
2486 sum += lowFilter.Get(k) *
GetVal(inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx);
2490 coeffOut.Set(output1D,
static_cast<OutputValueType
>(sum));
2499 sum += highFilter.Get(k) *
GetVal(inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx);
2503 coeffOut.Set(output1D,
static_cast<OutputValueType
>(sum));
2515 sum += lowFilter.Get(k) *
GetVal(inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx);
2519 coeffOut.Set(output1D,
static_cast<OutputValueType
>(sum));
2528 sum += highFilter.Get(k) *
GetVal(inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx);
2532 coeffOut.Set(output1D,
static_cast<OutputValueType
>(sum));
2581 using InputDomain = _8;
2644 #define VAL vtkm::Float64
2645 #define MAKEVAL(a) (static_cast<VAL>(a))
2646 template <
typename InPortalType1,
2647 typename InPortalType2,
2648 typename InPortalType3,
2649 typename InPortalType4,
2650 typename InPortalTypecAcD>
2652 const InPortalType2& ext2,
2653 const InPortalType3& ext3,
2654 const InPortalType4& ext4,
2655 const InPortalTypecAcD& cAcD,
2661 return MAKEVAL(ext1.Get(inIdx));
2663 else if (inMatrix == 2)
2665 return MAKEVAL(ext2.Get(inIdx));
2667 else if (inMatrix == 3)
2669 return MAKEVAL(ext3.Get(inIdx));
2671 else if (inMatrix == 4)
2673 return MAKEVAL(ext4.Get(inIdx));
2675 else if (inMatrix == 5)
2677 return MAKEVAL(cAcD.Get(inIdx));
2685 template <
typename InPortalType1,
2686 typename InPortalType2,
2687 typename InPortalType3,
2688 typename InPortalType4,
2689 typename InPortalTypecAcD,
2690 typename FilterPortalType,
2691 typename OutputValueType>
2693 const InPortalType2& portal2,
2694 const InPortalType3& portal3,
2695 const InPortalType4& portal4,
2696 const InPortalTypecAcD& portalcAcD,
2697 const FilterPortalType& lowFilter,
2698 const FilterPortalType& highFilter,
2699 OutputValueType& coeffOut,
2703 vtkm::Id k1 = 0, k2 = 0, xi = 0, yi = 0, inputMatrix = 0, inputIdx = 0;
2721 xi = (workX + 1) / 2;
2725 sum += lowFilter.Get(k1) *
2726 GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2734 sum += highFilter.Get(k2) *
2735 GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2739 coeffOut =
static_cast<OutputValueType
>(sum);
2757 yi = (workY + 1) / 2;
2761 VAL cA =
GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2762 sum += lowFilter.Get(k1) * cA;
2770 VAL cD =
GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2771 sum += highFilter.Get(k2) * cD;
2775 coeffOut =
static_cast<OutputValueType
>(sum);
2795 xi = (workX + 1) / 2;
2810 cA =
GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2812 cD =
GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2813 sum += lowFilter.Get(k1) * cA + highFilter.Get(k1) * cD;
2817 coeffOut =
static_cast<OutputValueType
>(sum);
2837 yi = (workY + 1) / 2;
2852 cA =
GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2854 cD =
GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2855 sum += lowFilter.Get(k1) * cA + highFilter.Get(k1) * cD;
2859 coeffOut =
static_cast<OutputValueType
>(sum);
2882 using InputDomain = _1;
2900 #define VAL vtkm::Float64
2901 #define MAKEVAL(a) (static_cast<VAL>(a))
2902 template <
typename InputPortalType,
typename FilterPortalType,
typename OutputPortalType>
2904 const FilterPortalType lowFilter,
2905 const FilterPortalType highFilter,
2906 OutputPortalType& coeffOut,
2909 using OutputValueType =
typename OutputPortalType::ValueType;
2912 if (workIndex % 2 == 0)
2918 sum += lowFilter.Get(k) *
MAKEVAL(signalIn.Get(xl++));
2920 vtkm::Id outputIdx = workIndex / 2;
2921 coeffOut.Set(outputIdx,
static_cast<OutputValueType
>(sum));
2929 sum += highFilter.Get(k) *
MAKEVAL(signalIn.Get(xh++));
2932 coeffOut.Set(outputIdx,
static_cast<OutputValueType
>(sum));
2961 using InputDomain = _1;
2974 #define VAL vtkm::Float64
2975 #define MAKEVAL(a) (static_cast<VAL>(a))
2976 template <
typename InputPortalType,
typename FilterPortalType,
typename OutputPortalType>
2978 const FilterPortalType& lowFilter,
2979 const FilterPortalType& highFilter,
2980 OutputPortalType& sigOut,
2987 vtkm::Id xi1 = (workIndex + 1) / 2;
2991 const bool odd = workIndex % 2 != 0;
2996 for (; k1 >= 0; k1 -= 2, k2 -= 2)
2998 sum += lowFilter.Get(k1) *
MAKEVAL(coeffs.Get(xi1++));
2999 sum += highFilter.Get(k2) *
MAKEVAL(coeffs.Get(xi2++));
3003 sum += highFilter.Get(k2) *
MAKEVAL(coeffs.Get(xi2++));
3010 for (; k2 >= 0; k1 -= 2, k2 -= 2)
3012 sum += lowFilter.Get(k1) *
MAKEVAL(coeffs.Get(xi1++));
3013 sum += highFilter.Get(k2) *
MAKEVAL(coeffs.Get(xi2++));
3017 sum += lowFilter.Get(k1) *
MAKEVAL(coeffs.Get(xi1++));
3021 sigOut.Set(workIndex,
static_cast<typename OutputPortalType::ValueType
>(sum));
3043 using InputDomain = _1;
3056 #define VAL vtkm::Float64
3057 #define MAKEVAL(a) (static_cast<VAL>(a))
3058 template <
typename InputPortalType,
typename FilterPortalType,
typename OutputPortalType>
3060 const FilterPortalType& lowFilter,
3061 const FilterPortalType& highFilter,
3062 OutputPortalType& sigOut,
3074 if (workIndex % 2 != 0)
3085 xi = (workIndex + 1) / 2;
3086 if (workIndex % 2 != 0)
3098 sum += lowFilter.Get(k) *
MAKEVAL(coeffs.Get(xi)) +
3104 sigOut.Set(workIndex,
static_cast<typename OutputPortalType::ValueType
>(sum));
3124 using InputDomain = _1;
3134 template <
typename ValueType>
3153 using InputDomain = _1;
3156 template <
typename ValueType>
3162 template <
typename ValueType>
3167 return static_cast<ValueType
>(diff * diff);
3179 using InputDomain = _1;
3181 template <
typename ValueType1,
typename ValueType2>
3184 return v1 -
static_cast<ValueType1
>(v2);
3193 using InputDomain = _1;
3195 template <
typename ValueType>
3207 using InputDomain = _1;
3213 template <
typename PortalInType,
typename PortalOutType>
3215 PortalOutType& portalOut,
3218 portalOut.Set((
startIdx + workIndex), portalIn.Get(workIndex));
3232 using InputDomain = _1;
3241 template <
typename PortalOutType,
typename PortalInType>
3243 const PortalInType& portalIn,
3246 portalOut.Set(workIndex, portalIn.Get(this->addLen - workIndex - 1));
3260 using InputDomain = _1;
3269 template <
typename PortalOutType,
typename PortalInType>
3271 const PortalInType& portalIn,
3274 portalOut.Set(workIndex, portalIn.Get(this->addLen - workIndex));
3288 using InputDomain = _1;
3297 template <
typename PortalOutType,
typename PortalInType>
3299 const PortalInType& portalIn,
3302 portalOut.Set(workIndex, portalIn.Get(
addLen - workIndex - 1) * (-1.0));
3316 using InputDomain = _1;
3325 template <
typename PortalOutType,
typename PortalInType>
3327 const PortalInType& portalIn,
3330 portalOut.Set(workIndex, portalIn.Get(
addLen - workIndex) * (-1.0));
3344 using InputDomain = _1;
3353 template <
typename PortalOutType,
typename PortalInType>
3355 const PortalInType& portalIn,
3358 portalOut.Set(workIndex, portalIn.Get(this->sigInLen - workIndex - 1));
3372 using InputDomain = _1;
3381 template <
typename PortalOutType,
typename PortalInType>
3383 const PortalInType& portalIn,
3386 portalOut.Set(workIndex, portalIn.Get(this->sigInLen - workIndex - 2));
3400 using InputDomain = _1;
3409 template <
typename PortalOutType,
typename PortalInType>
3411 const PortalInType& portalIn,
3414 portalOut.Set(workIndex, portalIn.Get(
sigInLen - workIndex - 1) * (-1.0));
3428 using InputDomain = _1;
3437 template <
typename PortalOutType,
typename PortalInType>
3439 const PortalInType& portalIn,
3442 portalOut.Set(workIndex, portalIn.Get(
sigInLen - workIndex - 2) * (-1.0));
3463 template <
typename PortalType>
3468 array.Set(workIdx,
static_cast<typename PortalType::ValueType
>(0.0));
3503 template <
typename PortalType>
3510 array.Set(workIdx,
static_cast<typename PortalType::ValueType
>(0.0));
3514 array.Set(workIdx,
static_cast<typename PortalType::ValueType
>(0.0));
3559 template <
typename PortalType>
3566 array.Set(workIdx,
static_cast<typename PortalType::ValueType
>(0.0));
3570 array.Set(workIdx,
static_cast<typename PortalType::ValueType
>(0.0));
3574 array.Set(workIdx,
static_cast<typename PortalType::ValueType
>(0.0));
3621 template <
typename ValueInType,
typename PortalOutType>
3623 PortalOutType& arrayOut,
3629 arrayOut.Set(outputIdx, valueIn);
3685 template <
typename ValueInType,
typename PortalOutType>
3687 PortalOutType& arrayOut,
3693 arrayOut.Set(outputIdx, valueIn);
3706 #endif // vtk_m_worklet_Wavelets_h
void(FieldIn, FieldOut) ControlSignature
Definition: WaveletTransforms.h:3151
Definition: WaveletTransforms.h:3366
void(WholeArrayInOut) ControlSignature
Definition: WaveletTransforms.h:3481
const vtkm::Id inDimZ
Definition: WaveletTransforms.h:3697
VTKM_EXEC void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3242
VTKM_EXEC_CONT AssignZero3DWorklet(vtkm::Id x, vtkm::Id y, vtkm::Id z, vtkm::Id zero_x, vtkm::Id zero_y, vtkm::Id zero_z)
Definition: WaveletTransforms.h:3534
VTKM_EXEC void operator()(const PortalInType &portalIn, PortalOutType &portalOut, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3214
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3314
Definition: WaveletTransforms.h:3585
VTKM_EXEC ValueType operator()(const ValueType &num) const
Definition: WaveletTransforms.h:3163
void(FieldIn, FieldOut) ControlSignature
Definition: WaveletTransforms.h:3191
@ ASYMH
Definition: WaveletTransforms.h:30
VTKM_EXEC void operator()(const ValueInType &valueIn, PortalOutType &arrayOut, const vtkm::Id &workIdx) const
Definition: WaveletTransforms.h:3686
const vtkm::Id sigPretendDimY
Definition: WaveletTransforms.h:236
void(WholeArrayIn, WholeArrayOut) ControlSignature
Definition: WaveletTransforms.h:3205
#define VTKM_EXEC
Definition: ExportMacros.h:51
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3399
Groups connected points that have the same field value.
Definition: Atomic.h:19
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3315
Definition: WaveletTransforms.h:3639
const DWTMode mode
Definition: WaveletTransforms.h:237
const vtkm::Id sigPretendDimX
Definition: WaveletTransforms.h:2376
VTKM_EXEC_CONT AssignZeroWorklet(vtkm::Id idx)
Definition: WaveletTransforms.h:3458
vtkm::Id outXStart
Definition: WaveletTransforms.h:3635
VTKM_EXEC_CONT vtkm::Id SigPretend3Dto1D(vtkm::Id x, vtkm::Id y, vtkm::Id z) const
Definition: WaveletTransforms.h:108
vtkm::Id dimX
Definition: WaveletTransforms.h:3519
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
vtkm::Float64 threshold
Definition: WaveletTransforms.h:3144
A control signature tag for output fields.
Definition: WorkletMapField.h:60
VTKM_EXEC_CONT void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3410
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3590
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3231
const vtkm::Id outStartY
Definition: WaveletTransforms.h:3699
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3343
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3230
VTKM_EXEC void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:2295
vtkm::Id zeroX
Definition: WaveletTransforms.h:3580
VTKM_EXEC_CONT void Ext1Dto3D(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z) const
Definition: WaveletTransforms.h:92
Definition: WaveletTransforms.h:2239
VTKM_EXEC void operator()(PortalType &array, const vtkm::Id &workIdx) const
Definition: WaveletTransforms.h:3464
Definition: WaveletTransforms.h:3310
VTKM_EXEC_CONT LeftASYMWExtentionWorklet(vtkm::Id len)
Definition: WaveletTransforms.h:3320
const vtkm::Id sigPretendDimZ
Definition: WaveletTransforms.h:236
VTKM_EXEC_CONT ExtensionWorklet2D(vtkm::Id extdimX, vtkm::Id extdimY, vtkm::Id sigdimX, vtkm::Id sigdimY, vtkm::Id sigstartX, vtkm::Id sigstartY, vtkm::Id sigpretendX, vtkm::Id sigpretendY, DWTMode m, ExtensionDirection dir, bool pad_zero)
Definition: WaveletTransforms.h:2249
vtkm::Id zeroY
Definition: WaveletTransforms.h:3580
Definition: WaveletTransforms.h:3450
_3(_1, _2) ExecutionSignature
Definition: WaveletTransforms.h:3178
vtkm::Id inXLen
Definition: WaveletTransforms.h:3633
Definition: WaveletTransforms.h:3478
Definition: WaveletTransforms.h:3526
const vtkm::Id sigPretendDimY
Definition: WaveletTransforms.h:2376
void(_1, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3482
void(WholeArrayInOut) ControlSignature
Definition: WaveletTransforms.h:3529
vtkm::Id dimY
Definition: WaveletTransforms.h:3519
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3371
vtkm::Id zeroX
Definition: WaveletTransforms.h:3520
VTKM_EXEC_CONT LeftSYMHExtentionWorklet(vtkm::Id len)
Definition: WaveletTransforms.h:3236
void(FieldIn, WholeArrayOut) ControlSignature
Definition: WaveletTransforms.h:3589
vtkm::Id outXLen
Definition: WaveletTransforms.h:3634
vtkm::Id dimZ
Definition: WaveletTransforms.h:3579
const vtkm::Id sigStartY
Definition: WaveletTransforms.h:235
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
Definition: WaveletTransforms.h:3174
vtkm::Id dimY
Definition: WaveletTransforms.h:3579
void(_1, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3454
VTKM_EXEC_CONT void GetLogicalDimOfInputCube(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z) const
Definition: WaveletTransforms.h:3672
VTKM_EXEC_CONT RectangleCopyTo(vtkm::Id inx, vtkm::Id iny, vtkm::Id outx, vtkm::Id outy, vtkm::Id xStart, vtkm::Id yStart)
Definition: WaveletTransforms.h:3594
VTKM_EXEC void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3354
VTKM_EXEC_CONT void GetLogicalDim(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y) const
Definition: WaveletTransforms.h:3497
vtkm::Id addLen
Definition: WaveletTransforms.h:3278
const bool padZero
Definition: WaveletTransforms.h:239
VTKM_EXEC void operator()(PortalType &array, const vtkm::Id &workIdx) const
Definition: WaveletTransforms.h:3560
VTKM_EXEC void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:114
@ LEFT
Definition: WaveletTransforms.h:36
VTKM_EXEC_CONT vtkm::Id Get1DIdxOfOutputRect(vtkm::Id x, vtkm::Id y) const
Definition: WaveletTransforms.h:3619
vtkm::Id sigInLen
Definition: WaveletTransforms.h:3362
const vtkm::Id inDimX
Definition: WaveletTransforms.h:3697
vtkm::Id addLen
Definition: WaveletTransforms.h:3250
vtkm::Id zeroZ
Definition: WaveletTransforms.h:3580
VTKM_EXEC_CONT ExtensionWorklet3D(vtkm::Id extdimX, vtkm::Id extdimY, vtkm::Id extdimZ, vtkm::Id sigdimX, vtkm::Id sigdimY, vtkm::Id sigdimZ, vtkm::Id sigstartX, vtkm::Id sigstartY, vtkm::Id sigstartZ, vtkm::Id sigpretendX, vtkm::Id sigpretendY, vtkm::Id sigpretendZ, DWTMode m, ExtensionDirection dir, bool pad_zero)
Definition: WaveletTransforms.h:56
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3287
const vtkm::Id extDimZ
Definition: WaveletTransforms.h:234
VTKM_EXEC_CONT AssignZero2DWorklet(vtkm::Id x, vtkm::Id y, vtkm::Id zero_x, vtkm::Id zero_y)
Definition: WaveletTransforms.h:3486
void(_1, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3530
VTKM_EXEC_CONT CubeCopyTo(vtkm::Id inx, vtkm::Id iny, vtkm::Id inz, vtkm::Id outx, vtkm::Id outy, vtkm::Id outz, vtkm::Id xStart, vtkm::Id yStart, vtkm::Id zStart)
Definition: WaveletTransforms.h:3648
void(FieldInOut) ControlSignature
Definition: WaveletTransforms.h:3122
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3286
@ BACK
Definition: WaveletTransforms.h:41
VTKM_EXEC_CONT vtkm::Id Sig2Dto1D(vtkm::Id x, vtkm::Id y) const
Definition: WaveletTransforms.h:2285
vtkm::Id dimX
Definition: WaveletTransforms.h:3579
VTKM_EXEC_CONT SquaredDeviation(ValueType t)
Definition: WaveletTransforms.h:3157
VTKM_EXEC void operator()(PortalType &array, const vtkm::Id &workIdx) const
Definition: WaveletTransforms.h:3504
vtkm::Id startIdx
Definition: WaveletTransforms.h:3222
const vtkm::Id sigDimX
Definition: WaveletTransforms.h:234
@ ASYMW
Definition: WaveletTransforms.h:31
const ExtensionDirection direction
Definition: WaveletTransforms.h:238
VTKM_EXEC void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3270
A control signature tag for input fields.
Definition: WorkletMapField.h:49
VTKM_EXEC_CONT vtkm::Id SigPretend2Dto1D(vtkm::Id x, vtkm::Id y) const
Definition: WaveletTransforms.h:2289
void(FieldIn, WholeArrayOut) ControlSignature
Definition: WaveletTransforms.h:3643
Definition: WaveletTransforms.h:3188
VTKM_EXEC ValueType1 operator()(const ValueType1 &v1, const ValueType2 &v2) const
Definition: WaveletTransforms.h:3182
@ SYMH
Definition: WaveletTransforms.h:28
@ SYMW
Definition: WaveletTransforms.h:29
VTKM_EXEC ValueType operator()(const ValueType &v) const
Definition: WaveletTransforms.h:3196
const ExtensionDirection direction
Definition: WaveletTransforms.h:2378
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3258
VTKM_EXEC_CONT RightSYMHExtentionWorklet(vtkm::Id sigInl)
Definition: WaveletTransforms.h:3348
void(FieldIn, FieldIn, FieldOut) ControlSignature
Definition: WaveletTransforms.h:3177
VTKM_EXEC_CONT void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3438
VTKM_EXEC_CONT CopyWorklet(vtkm::Id idx)
Definition: WaveletTransforms.h:3211
void(_1) ExecutionSignature
Definition: WaveletTransforms.h:3123
VTKM_EXEC_CONT vtkm::Id Sig3Dto1D(vtkm::Id x, vtkm::Id y, vtkm::Id z) const
Definition: WaveletTransforms.h:101
@ FRONT
Definition: WaveletTransforms.h:40
const vtkm::Id extDimY
Definition: WaveletTransforms.h:234
A control signature tag for input-output (in-place) fields.
Definition: WorkletMapField.h:71
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:2244
DWTMode
Definition: WaveletTransforms.h:26
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:51
Definition: WaveletTransforms.h:3226
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3342
const DWTMode mode
Definition: WaveletTransforms.h:2377
vtkm::Id sigInLen
Definition: WaveletTransforms.h:3390
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3426
VTKM_EXEC_CONT RightASYMWExtentionWorklet(vtkm::Id sigInl)
Definition: WaveletTransforms.h:3432
Definition: WaveletTransforms.h:3394
Definition: WaveletTransforms.h:3254
VTKM_EXEC_CONT LeftSYMWExtentionWorklet(vtkm::Id len)
Definition: WaveletTransforms.h:3264
const vtkm::Id extDimX
Definition: WaveletTransforms.h:2375
Definition: WaveletTransforms.h:3119
VTKM_EXEC_CONT void GetLogicalDimOfInputRect(const vtkm::Id &idx, vtkm::Id &x, vtkm::Id &y) const
Definition: WaveletTransforms.h:3612
vtkm::Float64 neg_threshold
Definition: WaveletTransforms.h:3145
vtkm::Id zeroY
Definition: WaveletTransforms.h:3520
VTKM_EXEC_CONT void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3326
Definition: WaveletTransforms.h:3338
const vtkm::Id inDimY
Definition: WaveletTransforms.h:3697
vtkm::Id addLen
Definition: WaveletTransforms.h:3306
const vtkm::Id outDimY
Definition: WaveletTransforms.h:3698
ThresholdWorklet(vtkm::Float64 t)
Definition: WaveletTransforms.h:3127
@ RIGHT
Definition: WaveletTransforms.h:37
vtkm::Id outYLen
Definition: WaveletTransforms.h:3634
VTKM_EXEC_CONT void GetLogicalDim(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z) const
Definition: WaveletTransforms.h:3552
@ BOTTOM
Definition: WaveletTransforms.h:39
const vtkm::Id sigDimY
Definition: WaveletTransforms.h:234
vtkm::Id inYLen
Definition: WaveletTransforms.h:3633
void(WholeArrayInOut) ControlSignature
Definition: WaveletTransforms.h:3453
const vtkm::Id outDimZ
Definition: WaveletTransforms.h:3698
Definition: WaveletTransforms.h:46
const vtkm::Id sigStartY
Definition: WaveletTransforms.h:2376
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:2243
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3206
_2(_1) ExecutionSignature
Definition: WaveletTransforms.h:3152
const vtkm::Id sigDimX
Definition: WaveletTransforms.h:2375
vtkm::Id sigInLen
Definition: WaveletTransforms.h:3446
Definition: WaveletTransforms.h:3422
VTKM_EXEC_CONT RightSYMWExtentionWorklet(vtkm::Id sigInl)
Definition: WaveletTransforms.h:3376
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3259
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3398
double Float64
Definition: Types.h:155
ExtensionDirection
Definition: WaveletTransforms.h:34
_2(_1) ExecutionSignature
Definition: WaveletTransforms.h:3192
const vtkm::Id sigStartZ
Definition: WaveletTransforms.h:235
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:50
const vtkm::Id outStartZ
Definition: WaveletTransforms.h:3699
VTKM_EXEC_CONT void Ext1Dto2D(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y) const
Definition: WaveletTransforms.h:2277
vtkm::Id zeroIdx
Definition: WaveletTransforms.h:3473
const vtkm::Id sigStartX
Definition: WaveletTransforms.h:2376
VTKM_EXEC_CONT LeftASYMHExtentionWorklet(vtkm::Id len)
Definition: WaveletTransforms.h:3292
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3370
VTKM_EXEC void operator()(const ValueInType &valueIn, PortalOutType &arrayOut, const vtkm::Id &workIdx) const
Definition: WaveletTransforms.h:3622
vtkm::Id outYStart
Definition: WaveletTransforms.h:3635
Definition: WaveletTransforms.h:3148
Definition: WaveletTransforms.h:3282
const vtkm::Id outDimX
Definition: WaveletTransforms.h:3698
vtkm::Float64 mean
Definition: WaveletTransforms.h:3171
@ TOP
Definition: WaveletTransforms.h:38
VTKM_EXEC_CONT void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3298
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3644
vtkm::Id addLen
Definition: WaveletTransforms.h:3334
VTKM_EXEC_CONT RightASYMHExtentionWorklet(vtkm::Id sigInl)
Definition: WaveletTransforms.h:3404
Definition: WaveletTransforms.h:3202
VTKM_EXEC_CONT vtkm::Id Get1DIdxOfOutputCube(vtkm::Id x, vtkm::Id y, vtkm::Id z) const
Definition: WaveletTransforms.h:3680
const vtkm::Id extDimY
Definition: WaveletTransforms.h:2375
VTKM_EXEC void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3382
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3427
const vtkm::Id sigPretendDimX
Definition: WaveletTransforms.h:236
VTKM_EXEC void operator()(ValueType &coeffVal) const
Definition: WaveletTransforms.h:3135
const vtkm::Id outStartX
Definition: WaveletTransforms.h:3699
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38
vtkm::Id sigInLen
Definition: WaveletTransforms.h:3418
const vtkm::Id sigDimY
Definition: WaveletTransforms.h:2375
The ExecutionSignature tag to use to get the work index.
Definition: WorkIndex.h:39
const bool padZero
Definition: WaveletTransforms.h:2379
const vtkm::Id extDimX
Definition: WaveletTransforms.h:234
const vtkm::Id sigStartX
Definition: WaveletTransforms.h:235
const vtkm::Id sigDimZ
Definition: WaveletTransforms.h:234