11 #ifndef vtk_m_worklet_wavelets_waveletdwt_h
12 #define vtk_m_worklet_wavelets_waveletdwt_h
42 template <
typename SigInArrayType,
typename ExtensionArrayType>
53 ExtensionArrayType& ext1,
54 ExtensionArrayType& ext2,
58 bool pretendSigPaddedZero,
62 VTKM_ASSERT(!pretendSigPaddedZero || !padZeroAtExt2);
67 if (pretendSigPaddedZero || padZeroAtExt2)
69 ext2.Allocate(sigPretendDimY * sigPretendDimZ);
79 using ValueType =
typename SigInArrayType::ValueType;
89 extDimY = sigPretendDimY;
90 extDimZ = sigPretendDimZ;
92 ext1.Allocate(extDimX * extDimY * extDimZ);
93 ExtensionWorklet worklet(extDimX,
108 DispatcherType dispatcher(worklet);
109 dispatcher.Invoke(ext1, sigIn);
114 extDimY = sigPretendDimY;
115 extDimZ = sigPretendDimZ;
116 if (!pretendSigPaddedZero && !padZeroAtExt2)
119 ext2.Allocate(extDimX * extDimY * extDimZ);
120 ExtensionWorklet worklet(extDimX,
135 DispatcherType dispatcher(worklet);
136 dispatcher.Invoke(ext2, sigIn);
138 else if (!pretendSigPaddedZero && padZeroAtExt2)
142 extDimX = addLen + 1;
143 ext2.Allocate(extDimX * extDimY * extDimZ);
144 ExtensionWorklet worklet(extDimX,
159 DispatcherType dispatcher(worklet);
160 dispatcher.Invoke(ext2, sigIn);
164 ExtendArrayType ext2Temp;
166 ext2Temp.Allocate(extDimX * extDimY * extDimZ);
167 ExtensionWorklet worklet(extDimX,
182 DispatcherType dispatcher(worklet);
183 dispatcher.Invoke(ext2Temp, sigIn);
186 ext2.Allocate((extDimX + 1) * extDimY * extDimZ);
188 ext2Temp, extDimX, extDimY, extDimZ, ext2, extDimX + 1, extDimY, extDimZ, 1, 0, 0);
195 template <
typename SigInArrayType,
typename ExtensionArrayType>
206 ExtensionArrayType& ext1,
207 ExtensionArrayType& ext2,
211 bool pretendSigPaddedZero,
215 VTKM_ASSERT(!pretendSigPaddedZero || !padZeroAtExt2);
220 if (pretendSigPaddedZero || padZeroAtExt2)
222 ext2.Allocate(sigPretendDimX * 1 * sigPretendDimZ);
232 using ValueType =
typename SigInArrayType::ValueType;
241 extDimX = sigPretendDimX;
243 extDimZ = sigPretendDimZ;
245 ext1.Allocate(extDimX * extDimY * extDimZ);
246 ExtensionWorklet worklet(extDimX,
261 DispatcherType dispatcher(worklet);
262 dispatcher.Invoke(ext1, sigIn);
267 extDimX = sigPretendDimX;
268 extDimZ = sigPretendDimZ;
269 if (!pretendSigPaddedZero && !padZeroAtExt2)
272 ext2.Allocate(extDimX * extDimY * extDimZ);
273 ExtensionWorklet worklet(extDimX,
288 DispatcherType dispatcher(worklet);
289 dispatcher.Invoke(ext2, sigIn);
291 else if (!pretendSigPaddedZero && padZeroAtExt2)
295 extDimY = addLen + 1;
296 ext2.Allocate(extDimX * extDimY * extDimZ);
297 ExtensionWorklet worklet(extDimX,
312 DispatcherType dispatcher(worklet);
313 dispatcher.Invoke(ext2, sigIn);
317 ExtendArrayType ext2Temp;
319 ext2Temp.Allocate(extDimX * extDimY * extDimZ);
320 ExtensionWorklet worklet(extDimX,
335 DispatcherType dispatcher(worklet);
336 dispatcher.Invoke(ext2Temp, sigIn);
339 ext2.Allocate(extDimX * (extDimY + 1) * extDimZ);
341 ext2Temp, extDimX, extDimY, extDimZ, ext2, extDimX, extDimY + 1, extDimZ, 0, 1, 0);
348 template <
typename SigInArrayType,
typename ExtensionArrayType>
359 ExtensionArrayType& ext1,
360 ExtensionArrayType& ext2,
364 bool pretendSigPaddedZero,
368 VTKM_ASSERT(!pretendSigPaddedZero || !padZeroAtExt2);
373 if (pretendSigPaddedZero || padZeroAtExt2)
375 ext2.Allocate(sigPretendDimX * sigPretendDimY * 1);
385 using ValueType =
typename SigInArrayType::ValueType;
394 extDimX = sigPretendDimX;
395 extDimY = sigPretendDimY;
398 ext1.Allocate(extDimX * extDimY * extDimZ);
399 ExtensionWorklet worklet(extDimX,
414 DispatcherType dispatcher(worklet);
415 dispatcher.Invoke(ext1, sigIn);
420 extDimX = sigPretendDimX;
421 extDimY = sigPretendDimY;
422 if (!pretendSigPaddedZero && !padZeroAtExt2)
425 ext2.Allocate(extDimX * extDimY * extDimZ);
426 ExtensionWorklet worklet(extDimX,
441 DispatcherType dispatcher(worklet);
442 dispatcher.Invoke(ext2, sigIn);
444 else if (!pretendSigPaddedZero && padZeroAtExt2)
448 extDimZ = addLen + 1;
449 ext2.Allocate(extDimX * extDimY * extDimZ);
450 ExtensionWorklet worklet(extDimX,
465 DispatcherType dispatcher(worklet);
466 dispatcher.Invoke(ext2, sigIn);
470 ExtendArrayType ext2Temp;
472 ext2Temp.Allocate(extDimX * extDimY * extDimZ);
473 ExtensionWorklet worklet(extDimX,
488 DispatcherType dispatcher(worklet);
489 dispatcher.Invoke(ext2Temp, sigIn);
492 ext2.Allocate(extDimX * extDimY * (extDimZ + 1));
494 ext2Temp, extDimX, extDimY, extDimZ, ext2, extDimX, extDimY, extDimZ + 1, 0, 0, 1);
525 template <
typename ArrayInType,
typename ArrayOutType>
536 ArrayOutType& coeffOut,
539 std::vector<vtkm::Id> L(27, 0);
574 L[24] = sigPretendDimX;
575 L[25] = sigPretendDimY;
576 L[26] = sigPretendDimZ;
580 if (filterLen % 2 != 0)
586 using ValueType =
typename ArrayInType::ValueType;
600 afterX.
Allocate(sigPretendDimX * sigPretendDimY * sigPretendDimZ);
602 ArrayType leftExt, rightExt;
620 LeftRightXFormType worklet(filterLen,
638 LeftRightDispatcherType dispatcher(worklet);
640 dispatcher.Invoke(leftExt,
651 sigIn.ReleaseResourcesExecution();
656 afterY.
Allocate(sigPretendDimX * sigPretendDimY * sigPretendDimZ);
658 ArrayType topExt, bottomExt;
676 TopDownXFormType worklet(filterLen,
694 TopDownDispatcherType dispatcher(worklet);
696 dispatcher.Invoke(topExt,
706 afterX.ReleaseResources();
708 ArrayType frontExt, backExt;
709 coeffOut.
Allocate(sigPretendDimX * sigPretendDimY * sigPretendDimZ);
727 FrontBackXFormType worklet(filterLen,
745 FrontBackDispatcherType dispatcher(worklet);
747 dispatcher.Invoke(frontExt,
756 return computationTime;
761 template <
typename ArrayInType,
typename ArrayOutType>
769 const std::vector<vtkm::Id>& L,
770 ArrayOutType& sigOut,
775 vtkm::Id inPretendDimX = L[0] + L[12];
776 vtkm::Id inPretendDimY = L[1] + L[7];
777 vtkm::Id inPretendDimZ = L[2] + L[5];
792 BasicArrayType afterZ;
793 afterZ.Allocate(inPretendDimX * inPretendDimY * inPretendDimZ);
795 BasicArrayType ext1, ext2, ext3, ext4;
798 vtkm::Id ext1DimZ = 0, ext2DimZ = 0, ext3DimZ = 0, ext4DimZ = 0;
821 FrontBackXFormType worklet(filterLen,
846 FrontBackDispatcherType dispatcher(worklet);
848 dispatcher.Invoke(ext1,
861 coeffIn.ReleaseResourcesExecution();
865 BasicArrayType afterY;
866 afterY.Allocate(inPretendDimX * inPretendDimY * inPretendDimZ);
868 BasicArrayType ext1, ext2, ext3, ext4;
871 vtkm::Id ext1DimY = 0, ext2DimY = 0, ext3DimY = 0, ext4DimY = 0;
894 TopDownXFormType worklet(filterLen,
919 TopDownDispatcherType dispatcher(worklet);
921 dispatcher.Invoke(ext1,
933 afterZ.ReleaseResources();
935 BasicArrayType ext1, ext2, ext3, ext4;
938 vtkm::Id ext1DimX = 0, ext2DimX = 0, ext3DimX = 0, ext4DimX = 0;
961 sigOut.Allocate(inPretendDimX * inPretendDimY * inPretendDimZ);
962 LeftRightXFormType worklet(filterLen,
987 LeftRightDispatcherType dispatcher(worklet);
989 dispatcher.Invoke(ext1,
1000 return computationTime;
1005 template <
typename SigInArrayType,
typename ExtensionArrayType>
1013 ExtensionArrayType& ext1,
1014 ExtensionArrayType& ext2,
1018 bool pretendSigPaddedZero,
1023 VTKM_ASSERT(!pretendSigPaddedZero || !padZeroAtExt2);
1028 if (pretendSigPaddedZero || padZeroAtExt2)
1032 ext2.Allocate(sigPretendDimY);
1037 ext2.Allocate(sigPretendDimX);
1048 using ValueType =
typename SigInArrayType::ValueType;
1060 extDimY = sigPretendDimY;
1065 extDimX = sigPretendDimX;
1068 ext1.Allocate(extDimX * extDimY);
1069 ExtensionWorklet worklet(extDimX,
1080 DispatcherType dispatcher(worklet);
1081 dispatcher.Invoke(ext1, sigIn);
1085 if (!pretendSigPaddedZero && !padZeroAtExt2)
1091 extDimY = sigPretendDimY;
1096 extDimX = sigPretendDimX;
1099 ext2.Allocate(extDimX * extDimY);
1100 ExtensionWorklet worklet(extDimX,
1111 DispatcherType dispatcher(worklet);
1112 dispatcher.Invoke(ext2, sigIn);
1114 else if (!pretendSigPaddedZero && padZeroAtExt2)
1119 extDimX = addLen + 1;
1120 extDimY = sigPretendDimY;
1125 extDimX = sigPretendDimX;
1126 extDimY = addLen + 1;
1128 ext2.Allocate(extDimX * extDimY);
1129 ExtensionWorklet worklet(extDimX,
1140 DispatcherType dispatcher(worklet);
1141 dispatcher.Invoke(ext2, sigIn);
1158 ExtendArrayType ext2Temp;
1163 extDimY = sigPretendDimY;
1168 extDimX = sigPretendDimX;
1171 ext2Temp.Allocate(extDimX * extDimY);
1172 ExtensionWorklet worklet(extDimX,
1183 DispatcherType dispatcher(worklet);
1184 dispatcher.Invoke(ext2Temp, sigIn);
1188 ext2.Allocate((extDimX + 1) * extDimY);
1190 ext2Temp, extDimX, extDimY, ext2, extDimX + 1, extDimY, 1, 0);
1195 ext2.Allocate(extDimX * (extDimY + 1));
1197 ext2Temp, extDimX, extDimY, ext2, extDimX, extDimY + 1, 0, 1);
1205 template <
typename SigInArrayType,
typename SigExtendedArrayType>
1207 SigExtendedArrayType& sigOut,
1211 bool attachZeroRightLeft,
1212 bool attachZeroRightRight)
1215 VTKM_ASSERT(!attachZeroRightRight || !attachZeroRightLeft);
1217 using ValueType =
typename SigInArrayType::ValueType;
1221 ExtensionArrayType leftExtend, rightExtend;
1225 if (attachZeroRightLeft || attachZeroRightRight)
1228 rightExtend.Allocate(1);
1233 leftExtend.Allocate(0);
1234 rightExtend.Allocate(0);
1236 ArrayConcat leftOn(leftExtend, sigIn);
1241 leftExtend.Allocate(addLen);
1242 vtkm::Id sigInLen = sigIn.GetNumberOfValues();
1253 switch (leftExtMethod)
1257 LeftSYMH worklet(addLen);
1259 dispatcher.Invoke(leftExtend, sigIn);
1264 LeftSYMW worklet(addLen);
1266 dispatcher.Invoke(leftExtend, sigIn);
1271 LeftASYMH worklet(addLen);
1273 dispatcher.Invoke(leftExtend, sigIn);
1278 LeftASYMW worklet(addLen);
1280 dispatcher.Invoke(leftExtend, sigIn);
1290 if (!attachZeroRightLeft)
1293 if (attachZeroRightRight)
1295 rightExtend.Allocate(addLen + 1);
1299 rightExtend.Allocate(addLen);
1302 switch (rightExtMethod)
1306 RightSYMH worklet(sigInLen);
1308 dispatcher.Invoke(rightExtend, sigIn);
1313 RightSYMW worklet(sigInLen);
1315 dispatcher.Invoke(rightExtend, sigIn);
1320 RightASYMH worklet(sigInLen);
1322 dispatcher.Invoke(rightExtend, sigIn);
1327 RightASYMW worklet(sigInLen);
1329 dispatcher.Invoke(rightExtend, sigIn);
1338 if (attachZeroRightRight)
1347 ExtensionArrayType singleValArray;
1350 ConcatArray sigInPlusOne(sigIn, singleValArray);
1353 rightExtend.Allocate(addLen);
1355 switch (rightExtMethod)
1359 RightSYMH worklet(sigInLen + 1);
1361 dispatcher.Invoke(rightExtend, sigInPlusOne);
1366 RightSYMW worklet(sigInLen + 1);
1368 dispatcher.Invoke(rightExtend, sigInPlusOne);
1373 RightASYMH worklet(sigInLen + 1);
1375 dispatcher.Invoke(rightExtend, sigInPlusOne);
1380 RightASYMW worklet(sigInLen + 1);
1382 dispatcher.Invoke(rightExtend, sigInPlusOne);
1393 ExtensionArrayType rightExtendPlusOne;
1394 rightExtendPlusOne.Allocate(addLen + 1);
1397 rightExtend = rightExtendPlusOne;
1400 ArrayConcat leftOn(leftExtend, sigIn);
1408 template <
typename SignalArrayType,
typename CoeffArrayType>
1410 CoeffArrayType& coeffOut,
1411 std::vector<vtkm::Id>& L)
1413 vtkm::Id sigInLen = sigIn.GetNumberOfValues();
1429 bool doSymConv =
false;
1441 bool oddHigh =
true;
1442 if (filterLen % 2 != 0)
1448 addLen = filterLen / 2;
1452 addLen = filterLen - 1;
1455 vtkm::Id sigExtendedLen = sigInLen + 2 * addLen;
1457 using SigInValueType =
typename SignalArrayType::ValueType;
1463 ConcatType2 sigInExtended;
1471 filterLen, L[0], L[1], oddLow, oddHigh);
1473 coeffOut.Allocate(sigExtendedLen);
1479 dispatcher.Invoke(sigInExtended,
1493 template <
typename CoeffArrayType,
typename SignalArrayType>
1495 std::vector<vtkm::Id>& L,
1496 SignalArrayType& sigOut)
1499 bool doSymConv =
false;
1518 cDRightMode =
ASYMW;
1522 cDRightMode =
ASYMH;
1546 addLen = filterLen / 4;
1551 cATempLen = L[0] + 2 * addLen;
1552 cDTempLen = cATempLen;
1566 PermutArrayType cA(approxIndices, coeffIn);
1567 PermutArrayType cD(detailIndices, coeffIn);
1569 using CoeffValueType =
typename CoeffArrayType::ValueType;
1574 Concat2 cATemp, cDTemp;
1579 this->
Extend1D(cA, cATemp, addLen, cALeftMode, cARightMode,
false,
false);
1585 this->
Extend1D(cD, cDTemp, addLen, cDLeftMode, cDRightMode,
true,
false);
1589 vtkm::Id cDTempLenWouldBe = L[1] + 2 * addLen;
1590 if (cDTempLenWouldBe == cDTempLen)
1592 this->
Extend1D(cD, cDTemp, addLen, cDLeftMode, cDRightMode,
false,
false);
1594 else if (cDTempLenWouldBe == cDTempLen - 1)
1596 this->
Extend1D(cD, cDTemp, addLen, cDLeftMode, cDRightMode,
false,
true);
1608 ExtensionArrayType dummyArray;
1609 dummyArray.Allocate(0);
1610 Concat1 cALeftOn(dummyArray, cA);
1612 vtkm::cont::make_ArrayHandleConcatenate<Concat1, ExtensionArrayType>(cALeftOn, dummyArray);
1615 Concat1 cDLeftOn(dummyArray, cD);
1617 vtkm::cont::make_ArrayHandleConcatenate<Concat1, ExtensionArrayType>(cDLeftOn, dummyArray);
1623 sigOut.Allocate(cATempLen + cDTempLen);
1626 if (filterLen % 2 != 0)
1634 dispatcher.Invoke(coeffInExtended,
1643 filterLen, L[0], cATempLen, !doSymConv);
1649 dispatcher.Invoke(coeffInExtended,
1684 template <
typename ArrayInType,
typename ArrayOutType>
1692 ArrayOutType& coeffOut,
1693 std::vector<vtkm::Id>& L)
1703 L[8] = sigPretendDimX;
1704 L[9] = sigPretendDimY;
1708 if (filterLen % 2 != 0)
1714 using ValueType =
typename ArrayInType::ValueType;
1723 afterX.
Allocate(sigPretendDimX * sigPretendDimY);
1727 ArrayType leftExt, rightExt;
1743 ForwardXForm worklet(filterLen,
1757 DispatcherType dispatcher(worklet);
1759 dispatcher.Invoke(leftExt,
1770 ArrayType topExt, bottomExt;
1771 coeffOut.
Allocate(sigPretendDimX * sigPretendDimY);
1787 ForwardXForm worklet(filterLen,
1801 DispatcherType dispatcher(worklet);
1803 dispatcher.Invoke(topExt,
1812 return computationTime;
1817 template <
typename ArrayInType,
typename ArrayOutType>
1823 const std::vector<vtkm::Id>& L,
1824 ArrayOutType& sigOut)
1826 vtkm::Id inPretendDimX = L[0] + L[4];
1827 vtkm::Id inPretendDimY = L[1] + L[3];
1837 BasicArrayType afterY;
1839 BasicArrayType ext1, ext2, ext3, ext4;
1841 vtkm::Id ext1DimY = 0, ext2DimY = 0, ext3DimY = 0, ext4DimY = 0;
1862 afterY.Allocate(inPretendDimX * inPretendDimY);
1863 IDWT2DWorklet worklet(filterLen,
1881 Dispatcher dispatcher(worklet);
1883 dispatcher.Invoke(ext1,
1896 BasicArrayType ext1, ext2, ext3, ext4;
1898 vtkm::Id ext1DimX = 0, ext2DimX = 0, ext3DimX = 0, ext4DimX = 0;
1918 sigOut.Allocate(inPretendDimX * inPretendDimY);
1919 IDWT2DWorklet worklet(filterLen,
1937 Dispatcher dispatcher(worklet);
1939 dispatcher.Invoke(ext1,
1950 return computationTime;
1955 template <
typename ArrayInType,
typename ArrayOutType>
1979 DWTMode cALeft, cARight, cDLeft, cDRight;
1980 cALeft = cARight = cDLeft = cDRight = mode;
1984 if (inPretendDimX % 2 != 0)
1997 if (inPretendDimX % 2 != 0)
2008 vtkm::Id cAExtendedDimX, cDExtendedDimX;
2011 if ((cADimX > cDDimX) && (mode ==
SYMH))
2015 cAExtendedDimX = cADimX + 2 * addLen;
2016 cDExtendedDimX = cAExtendedDimX;
2036 ext1DimX = ext2DimX = addLen;
2058 ext4DimX = addLen + 1;
2062 vtkm::Id cDExtendedWouldBe = cDDimX + 2 * addLen;
2063 if (cDExtendedWouldBe == cDExtendedDimX)
2080 ext3DimX = ext4DimX = addLen;
2082 else if (cDExtendedWouldBe == cDExtendedDimX - 1)
2100 ext4DimX = addLen + 1;
2111 template <
typename ArrayInType,
typename ArrayOutType>
2135 DWTMode cATopMode, cADownMode, cDTopMode, cDDownMode;
2136 cATopMode = cADownMode = cDTopMode = cDDownMode = mode;
2140 if (inPretendDimY % 2 != 0)
2153 if (inPretendDimY % 2 != 0)
2164 vtkm::Id cAExtendedDimY, cDExtendedDimY;
2167 if ((cADimY > cDDimY) && (mode ==
SYMH))
2169 cAExtendedDimY = cADimY + 2 * addLen;
2170 cDExtendedDimY = cAExtendedDimY;
2189 ext1DimY = ext2DimY = addLen;
2211 ext4DimY = addLen + 1;
2215 vtkm::Id cDExtendedWouldBe = cDDimY + 2 * addLen;
2216 if (cDExtendedWouldBe == cDExtendedDimY)
2233 ext3DimY = ext4DimY = addLen;
2235 else if (cDExtendedWouldBe == cDExtendedDimY - 1)
2253 ext4DimY = addLen + 1;
2264 template <
typename ArrayInType,
typename ArrayOutType>
2291 DWTMode cALeftMode, cARightMode, cDLeftMode, cDRightMode;
2292 cALeftMode = cARightMode = cDLeftMode = cDRightMode = mode;
2296 if (inPretendDimX % 2 != 0)
2299 cDRightMode =
ASYMW;
2303 cDRightMode =
ASYMH;
2309 if (inPretendDimX % 2 != 0)
2321 vtkm::Id cAExtendedDimX, cDExtendedDimX;
2324 if ((cADimX > cDDimX) && (mode ==
SYMH))
2328 cAExtendedDimX = cADimX + 2 * addLen;
2329 cDExtendedDimX = cAExtendedDimX;
2351 ext1DimX = ext2DimX = addLen;
2356 bool pretendSigPaddedZero, padZeroAtExt2;
2360 ext4DimX = addLen + 1;
2361 pretendSigPaddedZero =
true;
2362 padZeroAtExt2 =
false;
2366 vtkm::Id cDExtendedWouldBe = cDDimX + 2 * addLen;
2367 if (cDExtendedWouldBe == cDExtendedDimX)
2369 ext3DimX = ext4DimX = addLen;
2370 pretendSigPaddedZero =
false;
2371 padZeroAtExt2 =
false;
2373 else if (cDExtendedWouldBe == cDExtendedDimX - 1)
2376 ext4DimX = addLen + 1;
2377 pretendSigPaddedZero =
false;
2378 padZeroAtExt2 =
true;
2382 pretendSigPaddedZero = padZeroAtExt2 =
false;
2401 pretendSigPaddedZero,
2405 template <
typename ArrayInType,
typename ArrayOutType>
2432 DWTMode cATopMode, cADownMode, cDTopMode, cDDownMode;
2433 cATopMode = cADownMode = cDTopMode = cDDownMode = mode;
2437 if (inPretendDimY % 2 != 0)
2450 if (inPretendDimY % 2 != 0)
2462 vtkm::Id cAExtendedDimY, cDExtendedDimY;
2465 if ((cADimY > cDDimY) && (mode ==
SYMH))
2469 cAExtendedDimY = cADimY + 2 * addLen;
2470 cDExtendedDimY = cAExtendedDimY;
2492 ext1DimY = ext2DimY = addLen;
2497 bool pretendSigPaddedZero, padZeroAtExt2;
2501 ext4DimY = addLen + 1;
2502 pretendSigPaddedZero =
true;
2503 padZeroAtExt2 =
false;
2507 vtkm::Id cDExtendedWouldBe = cDDimY + 2 * addLen;
2508 if (cDExtendedWouldBe == cDExtendedDimY)
2510 ext3DimY = ext4DimY = addLen;
2511 pretendSigPaddedZero =
false;
2512 padZeroAtExt2 =
false;
2514 else if (cDExtendedWouldBe == cDExtendedDimY - 1)
2517 ext4DimY = addLen + 1;
2518 pretendSigPaddedZero =
false;
2519 padZeroAtExt2 =
true;
2523 pretendSigPaddedZero = padZeroAtExt2 =
false;
2542 pretendSigPaddedZero,
2546 template <
typename ArrayInType,
typename ArrayOutType>
2573 DWTMode cAFrontMode, cABackMode, cDFrontMode, cDBackMode;
2574 cAFrontMode = cABackMode = cDFrontMode = cDBackMode = mode;
2577 cDFrontMode =
ASYMH;
2578 if (inPretendDimZ % 2 != 0)
2591 if (inPretendDimZ % 2 != 0)
2603 vtkm::Id cAExtendedDimZ, cDExtendedDimZ;
2606 if ((cADimZ > cDDimZ) && (mode ==
SYMH))
2610 cAExtendedDimZ = cADimZ + 2 * addLen;
2611 cDExtendedDimZ = cAExtendedDimZ;
2633 ext1DimZ = ext2DimZ = addLen;
2638 bool pretendSigPaddedZero, padZeroAtExt2;
2642 ext4DimZ = addLen + 1;
2643 pretendSigPaddedZero =
true;
2644 padZeroAtExt2 =
false;
2648 vtkm::Id cDExtendedWouldBe = cDDimZ + 2 * addLen;
2649 if (cDExtendedWouldBe == cDExtendedDimZ)
2651 ext3DimZ = ext4DimZ = addLen;
2652 pretendSigPaddedZero =
false;
2653 padZeroAtExt2 =
false;
2655 else if (cDExtendedWouldBe == cDExtendedDimZ - 1)
2658 ext4DimZ = addLen + 1;
2659 pretendSigPaddedZero =
false;
2660 padZeroAtExt2 =
true;
2664 pretendSigPaddedZero = padZeroAtExt2 =
false;
2683 pretendSigPaddedZero,