VTK-m  2.0
WaveletTransforms.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 
11 #ifndef vtk_m_worklet_Wavelets_h
12 #define vtk_m_worklet_Wavelets_h
13 
16 
17 #include <vtkm/Math.h>
18 
19 namespace vtkm
20 {
21 namespace worklet
22 {
23 namespace wavelets
24 {
25 
26 enum DWTMode
27 { // boundary extension modes
32 };
33 
35 { // which side of a cube to extend
36  LEFT, // X direction
37  RIGHT, // X direction Y
38  TOP, // Y direction | Z
39  BOTTOM, // Y direction | /
40  FRONT, // Z direction | /
41  BACK // Z direction |/________ X
42 };
43 
44 // Worklet for 3D signal extension
45 // It operates on a specified part of a big cube
47 {
48 public:
49  using ControlSignature = void(WholeArrayOut, // extension
50  WholeArrayIn); // signal
51  using ExecutionSignature = void(_1, _2, WorkIndex);
52  using InputDomain = _1;
53 
54  // Constructor
57  vtkm::Id extdimY,
58  vtkm::Id extdimZ,
59  vtkm::Id sigdimX,
60  vtkm::Id sigdimY,
61  vtkm::Id sigdimZ,
62  vtkm::Id sigstartX,
63  vtkm::Id sigstartY,
64  vtkm::Id sigstartZ,
65  vtkm::Id sigpretendX,
66  vtkm::Id sigpretendY,
67  vtkm::Id sigpretendZ,
68  DWTMode m, // SYMH, SYMW, etc.
70  bool pad_zero)
71  : extDimX(extdimX)
72  , extDimY(extdimY)
73  , extDimZ(extdimZ)
74  , sigDimX(sigdimX)
75  , sigDimY(sigdimY)
76  , sigDimZ(sigdimZ)
77  , sigStartX(sigstartX)
78  , sigStartY(sigstartY)
79  , sigStartZ(sigstartZ)
80  , sigPretendDimX(sigpretendX)
81  , sigPretendDimY(sigpretendY)
82  , sigPretendDimZ(sigpretendZ)
83  , mode(m)
84  , direction(dir)
85  , padZero(pad_zero)
86  {
87  (void)sigDimZ;
88  }
89 
90  // Index translation helper
92  void Ext1Dto3D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const
93  {
94  z = idx / (extDimX * extDimY);
95  y = (idx - z * extDimX * extDimY) / extDimX;
96  x = idx % extDimX;
97  }
98 
99  // Index translation helper
102  {
103  return z * sigDimX * sigDimY + y * sigDimX + x;
104  }
105 
106  // Index translation helper
109  {
110  return (z + sigStartZ) * sigDimX * sigDimY + (y + sigStartY) * sigDimX + x + sigStartX;
111  }
112 
113  template <typename PortalOutType, typename PortalInType>
114  VTKM_EXEC void operator()(PortalOutType& portalOut,
115  const PortalInType& portalIn,
116  const vtkm::Id& workIndex) const
117  {
118  vtkm::Id extX, extY, extZ;
119  vtkm::Id sigPretendX, sigPretendY, sigPretendZ;
120  Ext1Dto3D(workIndex, extX, extY, extZ);
121  typename PortalOutType::ValueType sym = 1.0;
122  if (mode == ASYMH || mode == ASYMW)
123  {
124  sym = -1.0;
125  }
126  if (direction == LEFT)
127  {
128  sigPretendY = extY;
129  sigPretendZ = extZ;
130  if (mode == SYMH || mode == ASYMH)
131  {
132  sigPretendX = extDimX - extX - 1;
133  }
134  else // mode == SYMW || mode == ASYMW
135  {
136  sigPretendX = extDimX - extX;
137  }
138  }
139  else if (direction == RIGHT)
140  {
141  sigPretendY = extY;
142  sigPretendZ = extZ;
143  if (mode == SYMH || mode == ASYMH)
144  {
145  sigPretendX = sigPretendDimX - extX - 1;
146  }
147  else
148  {
149  sigPretendX = sigPretendDimX - extX - 2;
150  }
151  if (padZero)
152  {
153  sigPretendX++;
154  }
155  }
156  else if (direction == TOP)
157  {
158  sigPretendX = extX;
159  sigPretendZ = extZ;
160  if (mode == SYMH || mode == ASYMH)
161  {
162  sigPretendY = extDimY - extY - 1;
163  }
164  else // mode == SYMW || mode == ASYMW
165  {
166  sigPretendY = extDimY - extY;
167  }
168  }
169  else if (direction == BOTTOM)
170  {
171  sigPretendX = extX;
172  sigPretendZ = extZ;
173  if (mode == SYMH || mode == ASYMH)
174  {
175  sigPretendY = sigPretendDimY - extY - 1;
176  }
177  else
178  {
179  sigPretendY = sigPretendDimY - extY - 2;
180  }
181  if (padZero)
182  {
183  sigPretendY++;
184  }
185  }
186  else if (direction == FRONT)
187  {
188  sigPretendX = extX;
189  sigPretendY = extY;
190  if (mode == SYMH || mode == ASYMH)
191  {
192  sigPretendZ = extDimZ - extZ - 1;
193  }
194  else // mode == SYMW || mode == ASYMW
195  {
196  sigPretendZ = extDimZ - extZ;
197  }
198  }
199  else if (direction == BACK)
200  {
201  sigPretendX = extX;
202  sigPretendY = extY;
203  if (mode == SYMH || mode == ASYMH)
204  {
205  sigPretendZ = sigPretendDimZ - extZ - 1;
206  }
207  else
208  {
209  sigPretendZ = sigPretendDimZ - extZ - 2;
210  }
211  if (padZero)
212  {
213  sigPretendZ++;
214  }
215  }
216  else
217  {
218  sigPretendX = sigPretendY = sigPretendZ = 0; // so the compiler doesn't complain
219  }
220 
221  if (sigPretendX == sigPretendDimX || // decides to pad a zero
222  sigPretendY == sigPretendDimY || sigPretendZ == sigPretendDimZ)
223  {
224  portalOut.Set(workIndex, 0.0);
225  }
226  else
227  {
228  portalOut.Set(workIndex,
229  sym * portalIn.Get(SigPretend3Dto1D(sigPretendX, sigPretendY, sigPretendZ)));
230  }
231  }
232 
233 private:
235  const vtkm::Id sigStartX, sigStartY, sigStartZ; // defines a small cube to work on
237  const DWTMode mode;
239  const bool padZero; // treat sigIn as having a zero at the end
240 };
241 
242 //=============================================================================
243 
244 // Y
245 //
246 // | Z
247 // | /
248 // | /
249 // | /
250 // | /
251 // | /
252 // |/------------- X
253 //
254 // The following 3 classes perform the same functionaliry in 3 directions
256 {
257 public:
259  vtkm::Id y_1,
260  vtkm::Id z_1,
261  vtkm::Id x_2,
262  vtkm::Id y_2,
263  vtkm::Id z_2,
264  vtkm::Id startx_2,
265  vtkm::Id starty_2,
266  vtkm::Id startz_2,
267  vtkm::Id pretendx_2,
268  vtkm::Id pretendy_2,
269  vtkm::Id pretendz_2,
270  vtkm::Id x_3,
271  vtkm::Id y_3,
272  vtkm::Id z_3)
273  : dimX1(x_1)
274  , dimY1(y_1)
275  , dimZ1(z_1)
276  , dimX2(x_2)
277  , dimY2(y_2)
278  , dimZ2(z_2)
279  , startX2(startx_2)
280  , startY2(starty_2)
281  , startZ2(startz_2)
282  , pretendDimX2(pretendx_2)
283  , pretendDimY2(pretendy_2)
284  , pretendDimZ2(pretendz_2)
285  , dimX3(x_3)
286  , dimY3(y_3)
287  , dimZ3(z_3)
288  {
289  (void)dimZ1;
290  (void)dimZ2;
291  (void)dimZ3;
292  (void)pretendDimY2;
293  (void)pretendDimZ2;
294  }
295 
298  vtkm::Id inY,
299  vtkm::Id inZ, // 3D indices as input
300  vtkm::Id& cube,
301  vtkm::Id& idx) const // which cube, and idx of that cube
302  {
303  if (dimX1 <= inX && inX < (dimX1 + pretendDimX2))
304  {
305  vtkm::Id inX_local = inX - dimX1;
306  cube = 2;
307  idx = (inZ + startZ2) * dimX2 * dimY2 + (inY + startY2) * dimX2 + (inX_local + startX2);
308  }
309  else if (0 <= inX && inX < dimX1)
310  {
311  cube = 1;
312  idx = inZ * dimX1 * dimY1 + inY * dimX1 + inX;
313  }
314  else if ((dimX1 + pretendDimX2) <= inX && inX < (dimX1 + pretendDimX2 + dimX3))
315  {
316  vtkm::Id inX_local = inX - dimX1 - pretendDimX2;
317  cube = 3;
318  idx = inZ * dimX3 * dimY3 + inY * dimX3 + inX_local;
319  }
320  }
321 
322 private:
323  const vtkm::Id dimX1, dimY1, dimZ1; // left extension
324  const vtkm::Id dimX2, dimY2, dimZ2; // actual signal dims
326  const vtkm::Id dimX3, dimY3, dimZ3; // right extension
327 };
328 
330 {
331 public:
333  vtkm::Id y_1,
334  vtkm::Id z_1,
335  vtkm::Id x_2,
336  vtkm::Id y_2,
337  vtkm::Id z_2,
338  vtkm::Id startx_2,
339  vtkm::Id starty_2,
340  vtkm::Id startz_2,
341  vtkm::Id pretendx_2,
342  vtkm::Id pretendy_2,
343  vtkm::Id pretendz_2,
344  vtkm::Id x_3,
345  vtkm::Id y_3,
346  vtkm::Id z_3)
347  : dimX1(x_1)
348  , dimY1(y_1)
349  , dimZ1(z_1)
350  , dimX2(x_2)
351  , dimY2(y_2)
352  , dimZ2(z_2)
353  , startX2(startx_2)
354  , startY2(starty_2)
355  , startZ2(startz_2)
356  , pretendDimX2(pretendx_2)
357  , pretendDimY2(pretendy_2)
358  , pretendDimZ2(pretendz_2)
359  , dimX3(x_3)
360  , dimY3(y_3)
361  , dimZ3(z_3)
362  {
363  (void)dimZ1;
364  (void)dimZ2;
365  (void)dimZ3;
366  (void)pretendDimX2;
367  (void)pretendDimZ2;
368  }
369 
372  vtkm::Id inY,
373  vtkm::Id inZ, // 3D indices as input
374  vtkm::Id& cube,
375  vtkm::Id& idx) const // which cube, and idx of that cube
376  {
377  if (dimY1 <= inY && inY < (dimY1 + pretendDimY2))
378  {
379  vtkm::Id inY_local = inY - dimY1;
380  cube = 2;
381  idx = (inZ + startZ2) * dimX2 * dimY2 + (inY_local + startY2) * dimX2 + inX + startX2;
382  }
383  else if (0 <= inY && inY < dimY1)
384  {
385  cube = 1;
386  idx = inZ * dimX1 * dimY1 + inY * dimX1 + inX;
387  }
388  else if ((dimY1 + pretendDimY2) <= inY && inY < (dimY1 + pretendDimY2 + dimY3))
389  {
390  vtkm::Id inY_local = inY - dimY1 - pretendDimY2;
391  cube = 3;
392  idx = inZ * dimX3 * dimY3 + inY_local * dimX3 + inX;
393  }
394  }
395 
396 private:
397  const vtkm::Id dimX1, dimY1, dimZ1; // left extension
398  const vtkm::Id dimX2, dimY2, dimZ2; // actual signal dims
400  const vtkm::Id dimX3, dimY3, dimZ3; // right extension
401 };
402 
404 {
405 public:
407  vtkm::Id y_1,
408  vtkm::Id z_1,
409  vtkm::Id x_2,
410  vtkm::Id y_2,
411  vtkm::Id z_2,
412  vtkm::Id startx_2,
413  vtkm::Id starty_2,
414  vtkm::Id startz_2,
415  vtkm::Id pretendx_2,
416  vtkm::Id pretendy_2,
417  vtkm::Id pretendz_2,
418  vtkm::Id x_3,
419  vtkm::Id y_3,
420  vtkm::Id z_3)
421  : dimX1(x_1)
422  , dimY1(y_1)
423  , dimZ1(z_1)
424  , dimX2(x_2)
425  , dimY2(y_2)
426  , dimZ2(z_2)
427  , startX2(startx_2)
428  , startY2(starty_2)
429  , startZ2(startz_2)
430  , pretendDimX2(pretendx_2)
431  , pretendDimY2(pretendy_2)
432  , pretendDimZ2(pretendz_2)
433  , dimX3(x_3)
434  , dimY3(y_3)
435  , dimZ3(z_3)
436  {
437  (void)dimZ2;
438  (void)pretendDimX2;
439  (void)pretendDimY2;
440  }
441 
444  vtkm::Id inY,
445  vtkm::Id inZ, // 3D indices as input
446  vtkm::Id& cube,
447  vtkm::Id& idx) const // which cube, and idx of that cube
448  {
449  if (dimZ1 <= inZ && inZ < (dimZ1 + pretendDimZ2))
450  {
451  vtkm::Id inZ_local = inZ - dimZ1;
452  cube = 2;
453  idx = (inZ_local + startZ2) * dimX2 * dimY2 + (inY + startY2) * dimX2 + inX + startX2;
454  }
455  else if (0 <= inZ && inZ < dimZ1)
456  {
457  cube = 1;
458  idx = inZ * dimX1 * dimY1 + inY * dimX1 + inX;
459  }
460  else if ((dimZ1 + pretendDimZ2) <= inZ && inZ < (dimZ1 + pretendDimZ2 + dimZ3))
461  {
462  vtkm::Id inZ_local = inZ - dimZ1 - pretendDimZ2;
463  cube = 3;
464  idx = inZ_local * dimX3 * dimY3 + inY * dimX3 + inX;
465  }
466  }
467 
468 private:
469  const vtkm::Id dimX1, dimY1, dimZ1; // left extension
470  const vtkm::Id dimX2, dimY2, dimZ2; // actual signal dims
472  const vtkm::Id dimX3, dimY3, dimZ3; // right extension
473 };
474 
475 //=============================================================================
476 
477 //
478 // ---------------------------------------------------
479 // | | | | | | |
480 // |cube1 | cube5 |cube2 |cube3 | cube5 |cube4 |
481 // | ext1 | cA | ext2 | ext3 | cD | ext4 |
482 // | (x1) | (xa) | (x2) | (x3) | (xd) | (x4) |
483 // | | | | | | |
484 // ----------------------------------------------------
485 // The following 3 classes perform the same functionaliry in 3 directions
487 {
488 public:
490  vtkm::Id y_1,
491  vtkm::Id z_1,
492  vtkm::Id x_2,
493  vtkm::Id y_2,
494  vtkm::Id z_2,
495  vtkm::Id x_3,
496  vtkm::Id y_3,
497  vtkm::Id z_3,
498  vtkm::Id x_4,
499  vtkm::Id y_4,
500  vtkm::Id z_4,
501  vtkm::Id x_a,
502  vtkm::Id y_a,
503  vtkm::Id z_a,
504  vtkm::Id x_d,
505  vtkm::Id y_d,
506  vtkm::Id z_d,
507  vtkm::Id x_5,
508  vtkm::Id y_5,
509  vtkm::Id z_5,
510  vtkm::Id start_x5,
511  vtkm::Id start_y5,
512  vtkm::Id start_z5)
513  : dimX1(x_1)
514  , dimY1(y_1)
515  , dimZ1(z_1)
516  , dimX2(x_2)
517  , dimY2(y_2)
518  , dimZ2(z_2)
519  , dimX3(x_3)
520  , dimY3(y_3)
521  , dimZ3(z_3)
522  , dimX4(x_4)
523  , dimY4(y_4)
524  , dimZ4(z_4)
525  , dimXa(x_a)
526  , dimYa(y_a)
527  , dimZa(z_a)
528  , dimXd(x_d)
529  , dimYd(y_d)
530  , dimZd(z_d)
531  , dimX5(x_5)
532  , dimY5(y_5)
533  , dimZ5(z_5)
534  , startX5(start_x5)
535  , startY5(start_y5)
536  , startZ5(start_z5)
537  {
538  (void)dimYa;
539  (void)dimYd;
540  (void)dimZa;
541  (void)dimZd;
542  (void)dimZ5;
543  (void)dimZ4;
544  (void)dimZ3;
545  (void)dimZ2;
546  (void)dimZ1;
547  }
548 
551  vtkm::Id inY,
552  vtkm::Id inZ, // 3D indices as input
553  vtkm::Id& cube,
554  vtkm::Id& idx) const // which cube, and idx of that cube
555  {
556  if (dimX1 <= inX && inX < (dimX1 + dimXa))
557  {
558  vtkm::Id inX_local = inX - dimX1;
559  cube = 5; // cAcD
560  idx = (inZ + startZ5) * dimX5 * dimY5 + (inY + startY5) * dimX5 + (inX_local + startX5);
561  }
562  else if ((dimX1 + dimXa + dimX2 + dimX3) <= inX &&
563  inX < (dimX1 + dimXa + dimX2 + dimX3 + dimXd))
564  {
565  vtkm::Id inX_local = inX - dimX1 - dimX2 - dimX3; // no -dimXa since this is on the same cube
566  cube = 5; // cAcD
567  idx = (inZ + startZ5) * dimX5 * dimY5 + (inY + startY5) * dimX5 + (inX_local + startX5);
568  }
569  else if (0 <= inX && inX < dimX1)
570  {
571  cube = 1; // ext1
572  idx = inZ * dimX1 * dimY1 + inY * dimX1 + inX;
573  }
574  else if ((dimX1 + dimXa) <= inX && inX < (dimX1 + dimXa + dimX2))
575  {
576  vtkm::Id inX_local = inX - dimX1 - dimXa;
577  cube = 2; // ext2
578  idx = inZ * dimX2 * dimY2 + inY * dimX2 + inX_local;
579  }
580  else if ((dimX1 + dimXa + dimX2) <= inX && inX < (dimX1 + dimXa + dimX2 + dimX3))
581  {
582  vtkm::Id inX_local = inX - dimX1 - dimXa - dimX2;
583  cube = 3; // ext3
584  idx = inZ * dimX3 * dimY3 + inY * dimX3 + inX_local;
585  }
586  else if ((dimX1 + dimXa + dimX2 + dimX3 + dimXd) <= inX &&
587  inX < (dimX1 + dimXa + dimX2 + dimX3 + dimXd + dimX4))
588  {
589  vtkm::Id inX_local = inX - dimX1 - dimXa - dimX2 - dimX3 - dimXd;
590  cube = 4; // ext4
591  idx = inZ * dimX4 * dimY4 + inY * dimX4 + inX_local;
592  }
593  }
594 
595 private:
596  const vtkm::Id dimX1, dimY1, dimZ1, dimX2, dimY2, dimZ2; // extension cube sizes
597  const vtkm::Id dimX3, dimY3, dimZ3, dimX4, dimY4, dimZ4; // extension cube sizes
598  const vtkm::Id dimXa, dimYa, dimZa, dimXd, dimYd, dimZd; // signal cube sizes
599  const vtkm::Id dimX5, dimY5, dimZ5, startX5, startY5, startZ5; // entire cube size
600 };
601 
603 {
604 public:
606  vtkm::Id y_1,
607  vtkm::Id z_1,
608  vtkm::Id x_2,
609  vtkm::Id y_2,
610  vtkm::Id z_2,
611  vtkm::Id x_3,
612  vtkm::Id y_3,
613  vtkm::Id z_3,
614  vtkm::Id x_4,
615  vtkm::Id y_4,
616  vtkm::Id z_4,
617  vtkm::Id x_a,
618  vtkm::Id y_a,
619  vtkm::Id z_a,
620  vtkm::Id x_d,
621  vtkm::Id y_d,
622  vtkm::Id z_d,
623  vtkm::Id x_5,
624  vtkm::Id y_5,
625  vtkm::Id z_5,
626  vtkm::Id start_x5,
627  vtkm::Id start_y5,
628  vtkm::Id start_z5)
629  : dimX1(x_1)
630  , dimY1(y_1)
631  , dimZ1(z_1)
632  , dimX2(x_2)
633  , dimY2(y_2)
634  , dimZ2(z_2)
635  , dimX3(x_3)
636  , dimY3(y_3)
637  , dimZ3(z_3)
638  , dimX4(x_4)
639  , dimY4(y_4)
640  , dimZ4(z_4)
641  , dimXa(x_a)
642  , dimYa(y_a)
643  , dimZa(z_a)
644  , dimXd(x_d)
645  , dimYd(y_d)
646  , dimZd(z_d)
647  , dimX5(x_5)
648  , dimY5(y_5)
649  , dimZ5(z_5)
650  , startX5(start_x5)
651  , startY5(start_y5)
652  , startZ5(start_z5)
653  {
654  (void)dimXa;
655  (void)dimXd;
656  (void)dimZd;
657  (void)dimZa;
658  (void)dimZ5;
659  (void)dimZ4;
660  (void)dimZ3;
661  (void)dimZ2;
662  (void)dimZ1;
663  }
664 
667  vtkm::Id inY,
668  vtkm::Id inZ, // 3D indices as input
669  vtkm::Id& cube,
670  vtkm::Id& idx) const // which cube, and idx of that cube
671  {
672  if (dimY1 <= inY && inY < (dimY1 + dimYa))
673  {
674  vtkm::Id inY_local = inY - dimY1;
675  cube = 5; // cAcD
676  idx = (inZ + startZ5) * dimX5 * dimY5 + (inY_local + startY5) * dimX5 + (inX + startX5);
677  }
678  else if ((dimY1 + dimYa + dimY2 + dimY3) <= inY &&
679  inY < (dimY1 + dimYa + dimY2 + dimY3 + dimYd))
680  {
681  vtkm::Id inY_local = inY - dimY1 - dimY2 - dimY3;
682  cube = 5; // cAcD
683  idx = (inZ + startZ5) * dimX5 * dimY5 + (inY_local + startY5) * dimX5 + (inX + startX5);
684  }
685  else if (0 <= inY && inY < dimY1)
686  {
687  cube = 1; // ext1
688  idx = inZ * dimX1 * dimY1 + inY * dimX1 + inX;
689  }
690  else if ((dimY1 + dimYa) <= inY && inY < (dimY1 + dimYa + dimY2))
691  {
692  vtkm::Id inY_local = inY - dimY1 - dimYa;
693  cube = 2; // ext2
694  idx = inZ * dimX2 * dimY2 + inY_local * dimX2 + inX;
695  }
696  else if ((dimY1 + dimYa + dimY2) <= inY && inY < (dimY1 + dimYa + dimY2 + dimY3))
697  {
698  vtkm::Id inY_local = inY - dimY1 - dimYa - dimY2;
699  cube = 3; // ext3
700  idx = inZ * dimX3 * dimY3 + inY_local * dimX3 + inX;
701  }
702  else if ((dimY1 + dimYa + dimY2 + dimY3 + dimYd) <= inY &&
703  inY < (dimY1 + dimYa + dimY2 + dimY3 + dimYd + dimY4))
704  {
705  vtkm::Id inY_local = inY - dimY1 - dimYa - dimY2 - dimY3 - dimYd;
706  cube = 4; // ext4
707  idx = inZ * dimX4 * dimY4 + inY_local * dimX4 + inX;
708  }
709  }
710 
711 private:
712  const vtkm::Id dimX1, dimY1, dimZ1, dimX2, dimY2, dimZ2; // extension cube sizes
713  const vtkm::Id dimX3, dimY3, dimZ3, dimX4, dimY4, dimZ4; // extension cube sizes
714  const vtkm::Id dimXa, dimYa, dimZa, dimXd, dimYd, dimZd; // signal cube sizes
715  const vtkm::Id dimX5, dimY5, dimZ5, startX5, startY5, startZ5; // entire cube size
716 };
717 
719 {
720 public:
723  vtkm::Id y_1,
724  vtkm::Id z_1,
725  vtkm::Id x_2,
726  vtkm::Id y_2,
727  vtkm::Id z_2,
728  vtkm::Id x_3,
729  vtkm::Id y_3,
730  vtkm::Id z_3,
731  vtkm::Id x_4,
732  vtkm::Id y_4,
733  vtkm::Id z_4,
734  vtkm::Id x_a,
735  vtkm::Id y_a,
736  vtkm::Id z_a,
737  vtkm::Id x_d,
738  vtkm::Id y_d,
739  vtkm::Id z_d,
740  vtkm::Id x_5,
741  vtkm::Id y_5,
742  vtkm::Id z_5,
743  vtkm::Id start_x5,
744  vtkm::Id start_y5,
745  vtkm::Id start_z5)
746  : dimX1(x_1)
747  , dimY1(y_1)
748  , dimZ1(z_1)
749  , dimX2(x_2)
750  , dimY2(y_2)
751  , dimZ2(z_2)
752  , dimX3(x_3)
753  , dimY3(y_3)
754  , dimZ3(z_3)
755  , dimX4(x_4)
756  , dimY4(y_4)
757  , dimZ4(z_4)
758  , dimXa(x_a)
759  , dimYa(y_a)
760  , dimZa(z_a)
761  , dimXd(x_d)
762  , dimYd(y_d)
763  , dimZd(z_d)
764  , dimX5(x_5)
765  , dimY5(y_5)
766  , dimZ5(z_5)
767  , startX5(start_x5)
768  , startY5(start_y5)
769  , startZ5(start_z5)
770  {
771  (void)dimXd;
772  (void)dimXa;
773  (void)dimYd;
774  (void)dimYa;
775  (void)dimZ5;
776  }
777 
780  vtkm::Id inY,
781  vtkm::Id inZ, // 3D indices as input
782  vtkm::Id& cube,
783  vtkm::Id& idx) const // which cube, and idx of that cube
784  {
785  if (dimZ1 <= inZ && inZ < (dimZ1 + dimZa))
786  {
787  vtkm::Id inZ_local = inZ - dimZ1;
788  cube = 5; // cAcD
789  idx = (inZ_local + startZ5) * dimX5 * dimY5 + (inY + startY5) * dimX5 + (inX + startX5);
790  }
791  else if ((dimZ1 + dimZa + dimZ2 + dimZ3) <= inZ &&
792  inZ < (dimZ1 + dimZa + dimZ2 + dimZ3 + dimZd))
793  {
794  vtkm::Id inZ_local = inZ - dimZ1 - dimZ2 - dimZ3;
795  cube = 5; // cAcD
796  idx = (inZ_local + startZ5) * dimX5 * dimY5 + (inY + startY5) * dimX5 + (inX + startX5);
797  }
798  else if (0 <= inZ && inZ < dimZ1)
799  {
800  cube = 1; // ext1
801  idx = inZ * dimX1 * dimY1 + inY * dimX1 + inX;
802  }
803  else if ((dimZ1 + dimZa) <= inZ && inZ < (dimZ1 + dimZa + dimZ2))
804  {
805  vtkm::Id inZ_local = inZ - dimZ1 - dimZa;
806  cube = 2; // ext2
807  idx = inZ_local * dimX2 * dimY2 + inY * dimX2 + inX;
808  }
809  else if ((dimZ1 + dimZa + dimZ2) <= inZ && inZ < (dimZ1 + dimZa + dimZ2 + dimZ3))
810  {
811  vtkm::Id inZ_local = inZ - dimZ1 - dimZa - dimZ2;
812  cube = 3; // ext3
813  idx = inZ_local * dimX3 * dimY3 + inY * dimX3 + inX;
814  }
815  else if ((dimZ1 + dimZa + dimZ2 + dimZ3 + dimZd) <= inZ &&
816  inZ < (dimZ1 + dimZa + dimZ2 + dimZ3 + dimZd + dimZ4))
817  {
818  vtkm::Id inZ_local = inZ - dimZ1 - dimZa - dimZ2 - dimZ3 - dimZd;
819  cube = 4; // ext4
820  idx = inZ_local * dimX4 * dimY4 + inY * dimX4 + inX;
821  }
822  }
823 
824 private:
825  const vtkm::Id dimX1, dimY1, dimZ1, dimX2, dimY2, dimZ2; // extension cube sizes
826  const vtkm::Id dimX3, dimY3, dimZ3, dimX4, dimY4, dimZ4; // extension cube sizes
827  const vtkm::Id dimXa, dimYa, dimZa, dimXd, dimYd, dimZd; // signal cube sizes
828  const vtkm::Id dimX5, dimY5, dimZ5, startX5, startY5, startZ5; // entire cube size
829 };
830 
831 //=============================================================================
832 
833 // Worklet: 3D forward transform along X (left-right)
835 {
836 public:
837  using ControlSignature = void(WholeArrayIn, // left extension
838  WholeArrayIn, // signal
839  WholeArrayIn, // right extension
840  WholeArrayIn, // lowFilter
841  WholeArrayIn, // highFilter
842  WholeArrayOut); // cA followed by cD
843  using ExecutionSignature = void(_1, _2, _3, _4, _5, _6, WorkIndex);
844  using InputDomain = _6;
845 
847  vtkm::Id approx_len,
848  bool odd_low,
849  vtkm::Id dimX1,
850  vtkm::Id dimY1,
851  vtkm::Id dimZ1,
852  vtkm::Id dimX2,
853  vtkm::Id dimY2,
854  vtkm::Id dimZ2,
855  vtkm::Id startX2,
856  vtkm::Id startY2,
857  vtkm::Id startZ2,
858  vtkm::Id pretendX2,
859  vtkm::Id pretendY2,
860  vtkm::Id pretendZ2,
861  vtkm::Id dimX3,
862  vtkm::Id dimY3,
863  vtkm::Id dimZ3)
864  : filterLen(filter_len)
865  , approxLen(approx_len)
866  , outDimX(pretendX2)
867  , outDimY(pretendY2)
868  //, outDimZ(pretendZ2)
869  , translator(dimX1,
870  dimY1,
871  dimZ1,
872  dimX2,
873  dimY2,
874  dimZ2,
875  startX2,
876  startY2,
877  startZ2,
878  pretendX2,
879  pretendY2,
880  pretendZ2,
881  dimX3,
882  dimY3,
883  dimZ3)
884  {
885  this->lstart = odd_low ? 1 : 0;
886  this->hstart = 1;
887  }
888 
890  void Output1Dto3D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const
891  {
892  z = idx / (this->outDimX * this->outDimY);
893  y = (idx - z * this->outDimX * this->outDimY) / this->outDimX;
894  x = idx % this->outDimX;
895  }
898  {
899  return z * outDimX * outDimY + y * outDimX + x;
900  }
901 
902 // Use 64-bit float for convolution calculation
903 #define VAL vtkm::Float64
904 #define MAKEVAL(a) (static_cast<VAL>(a))
905  template <typename InPortalType1, typename InPortalType2, typename InPortalType3>
906  VTKM_EXEC_CONT VAL GetVal(const InPortalType1& portal1,
907  const InPortalType2& portal2,
908  const InPortalType3& portal3,
909  vtkm::Id inCube,
910  vtkm::Id inIdx) const
911  {
912  if (inCube == 2)
913  {
914  return MAKEVAL(portal2.Get(inIdx));
915  }
916  else if (inCube == 1)
917  {
918  return MAKEVAL(portal1.Get(inIdx));
919  }
920  else if (inCube == 3)
921  {
922  return MAKEVAL(portal3.Get(inIdx));
923  }
924  else
925  {
926  return -1;
927  }
928  }
929 
930  template <typename InPortalType1,
931  typename InPortalType2,
932  typename InPortalType3,
933  typename FilterPortalType,
934  typename OutputPortalType>
935  VTKM_EXEC_CONT void operator()(const InPortalType1& inPortal1, // left extension
936  const InPortalType2& inPortal2, // signal
937  const InPortalType3& inPortal3, // right extension
938  const FilterPortalType& lowFilter, // lowFilter
939  const FilterPortalType& highFilter, // highFilter
940  OutputPortalType& coeffOut,
941  const vtkm::Id& workIndex) const
942  {
943  vtkm::Id workX, workY, workZ, output1D;
944  this->Output1Dto3D(workIndex, workX, workY, workZ);
945  vtkm::Id inputCube = 0, inputIdx = 0;
946  using OutputValueType = typename OutputPortalType::ValueType;
947 
948  if (workX % 2 == 0) // calculate cA
949  {
950  vtkm::Id xl = lstart + workX;
951  VAL sum = MAKEVAL(0.0);
952  for (vtkm::Id k = filterLen - 1; k > -1; k--)
953  {
954  translator.Translate3Dto1D(xl, workY, workZ, inputCube, inputIdx);
955  sum += lowFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx);
956  xl++;
957  }
958  output1D = Output3Dto1D(workX / 2, workY, workZ);
959  coeffOut.Set(output1D, static_cast<OutputValueType>(sum));
960  }
961  else // calculate cD
962  {
963  vtkm::Id xh = hstart + workX - 1;
964  VAL sum = MAKEVAL(0.0);
965  for (vtkm::Id k = filterLen - 1; k > -1; k--)
966  {
967  translator.Translate3Dto1D(xh, workY, workZ, inputCube, inputIdx);
968  sum += highFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx);
969  xh++;
970  }
971  output1D = Output3Dto1D((workX - 1) / 2 + approxLen, workY, workZ);
972  coeffOut.Set(output1D, static_cast<OutputValueType>(sum));
973  }
974  }
975 #undef MAKEVAL
976 #undef VAL
977 
978 private:
982  //const vtkm::Id outDimZ; Not used
985 };
986 
988 {
989 public:
990  using ControlSignature = void(WholeArrayIn, // left extension
991  WholeArrayIn, // signal
992  WholeArrayIn, // right extension
993  WholeArrayIn, // lowFilter
994  WholeArrayIn, // highFilter
995  WholeArrayOut); // cA followed by cD
996  using ExecutionSignature = void(_1, _2, _3, _4, _5, _6, WorkIndex);
997  using InputDomain = _6;
998 
1000  vtkm::Id approx_len,
1001  bool odd_low,
1002  vtkm::Id dimX1,
1003  vtkm::Id dimY1,
1004  vtkm::Id dimZ1,
1005  vtkm::Id dimX2,
1006  vtkm::Id dimY2,
1007  vtkm::Id dimZ2,
1008  vtkm::Id startX2,
1009  vtkm::Id startY2,
1010  vtkm::Id startZ2,
1011  vtkm::Id pretendX2,
1012  vtkm::Id pretendY2,
1013  vtkm::Id pretendZ2,
1014  vtkm::Id dimX3,
1015  vtkm::Id dimY3,
1016  vtkm::Id dimZ3)
1017  : filterLen(filter_len)
1018  , approxLen(approx_len)
1019  , outDimX(pretendX2)
1020  , outDimY(pretendY2)
1021  //, outDimZ(pretendZ2)
1022  , translator(dimX1,
1023  dimY1,
1024  dimZ1,
1025  dimX2,
1026  dimY2,
1027  dimZ2,
1028  startX2,
1029  startY2,
1030  startZ2,
1031  pretendX2,
1032  pretendY2,
1033  pretendZ2,
1034  dimX3,
1035  dimY3,
1036  dimZ3)
1037  {
1038  this->lstart = odd_low ? 1 : 0;
1039  this->hstart = 1;
1040  }
1041 
1043  void Output1Dto3D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const
1044  {
1045  z = idx / (outDimX * outDimY);
1046  y = (idx - z * outDimX * outDimY) / outDimX;
1047  x = idx % outDimX;
1048  }
1051  {
1052  return z * outDimX * outDimY + y * outDimX + x;
1053  }
1054 
1055 // Use 64-bit float for convolution calculation
1056 #define VAL vtkm::Float64
1057 #define MAKEVAL(a) (static_cast<VAL>(a))
1058  template <typename InPortalType1, typename InPortalType2, typename InPortalType3>
1059  VTKM_EXEC_CONT VAL GetVal(const InPortalType1& portal1,
1060  const InPortalType2& portal2,
1061  const InPortalType3& portal3,
1062  vtkm::Id inCube,
1063  vtkm::Id inIdx) const
1064  {
1065  if (inCube == 2)
1066  {
1067  return MAKEVAL(portal2.Get(inIdx));
1068  }
1069  else if (inCube == 1)
1070  {
1071  return MAKEVAL(portal1.Get(inIdx));
1072  }
1073  else if (inCube == 3)
1074  {
1075  return MAKEVAL(portal3.Get(inIdx));
1076  }
1077  else
1078  {
1079  return -1;
1080  }
1081  }
1082 
1083  template <typename InPortalType1,
1084  typename InPortalType2,
1085  typename InPortalType3,
1086  typename FilterPortalType,
1087  typename OutputPortalType>
1088  VTKM_EXEC_CONT void operator()(const InPortalType1& inPortal1, // top extension
1089  const InPortalType2& inPortal2, // signal
1090  const InPortalType3& inPortal3, // down extension
1091  const FilterPortalType& lowFilter, // lowFilter
1092  const FilterPortalType& highFilter, // highFilter
1093  OutputPortalType& coeffOut,
1094  const vtkm::Id& workIndex) const
1095  {
1096  vtkm::Id workX, workY, workZ, output1D;
1097  Output1Dto3D(workIndex, workX, workY, workZ);
1098  vtkm::Id inputCube = 0, inputIdx = 0;
1099  using OutputValueType = typename OutputPortalType::ValueType;
1100 
1101  if (workY % 2 == 0) // calculate cA
1102  {
1103  vtkm::Id yl = lstart + workY;
1104  VAL sum = MAKEVAL(0.0);
1105  for (vtkm::Id k = filterLen - 1; k > -1; k--)
1106  {
1107  translator.Translate3Dto1D(workX, yl, workZ, inputCube, inputIdx);
1108  sum += lowFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx);
1109  yl++;
1110  }
1111  output1D = Output3Dto1D(workX, workY / 2, workZ);
1112  coeffOut.Set(output1D, static_cast<OutputValueType>(sum));
1113  }
1114  else // calculate cD
1115  {
1116  vtkm::Id yh = hstart + workY - 1;
1117  VAL sum = MAKEVAL(0.0);
1118  for (vtkm::Id k = filterLen - 1; k > -1; k--)
1119  {
1120  translator.Translate3Dto1D(workX, yh, workZ, inputCube, inputIdx);
1121  sum += highFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx);
1122  yh++;
1123  }
1124  output1D = Output3Dto1D(workX, (workY - 1) / 2 + approxLen, workZ);
1125  coeffOut.Set(output1D, static_cast<OutputValueType>(sum));
1126  }
1127  }
1128 #undef MAKEVAL
1129 #undef VAL
1130 
1131 private:
1135  //const vtkm::Id outDimZ; Not used
1138 };
1139 
1141 {
1142 public:
1143  using ControlSignature = void(WholeArrayIn, // left extension
1144  WholeArrayIn, // signal
1145  WholeArrayIn, // right extension
1146  WholeArrayIn, // lowFilter
1147  WholeArrayIn, // highFilter
1148  WholeArrayOut); // cA followed by cD
1149  using ExecutionSignature = void(_1, _2, _3, _4, _5, _6, WorkIndex);
1150  using InputDomain = _6;
1151 
1153  vtkm::Id approx_len,
1154  bool odd_low,
1155  vtkm::Id dimX1,
1156  vtkm::Id dimY1,
1157  vtkm::Id dimZ1,
1158  vtkm::Id dimX2,
1159  vtkm::Id dimY2,
1160  vtkm::Id dimZ2,
1161  vtkm::Id startX2,
1162  vtkm::Id startY2,
1163  vtkm::Id startZ2,
1164  vtkm::Id pretendX2,
1165  vtkm::Id pretendY2,
1166  vtkm::Id pretendZ2,
1167  vtkm::Id dimX3,
1168  vtkm::Id dimY3,
1169  vtkm::Id dimZ3)
1170  : filterLen(filter_len)
1171  , approxLen(approx_len)
1172  , outDimX(pretendX2)
1173  , outDimY(pretendY2)
1174  //, outDimZ(pretendZ2)
1175  , translator(dimX1,
1176  dimY1,
1177  dimZ1,
1178  dimX2,
1179  dimY2,
1180  dimZ2,
1181  startX2,
1182  startY2,
1183  startZ2,
1184  pretendX2,
1185  pretendY2,
1186  pretendZ2,
1187  dimX3,
1188  dimY3,
1189  dimZ3)
1190  {
1191  this->lstart = odd_low ? 1 : 0;
1192  this->hstart = 1;
1193  }
1194 
1196  void Output1Dto3D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const
1197  {
1198  z = idx / (outDimX * outDimY);
1199  y = (idx - z * outDimX * outDimY) / outDimX;
1200  x = idx % outDimX;
1201  }
1204  {
1205  return z * outDimX * outDimY + y * outDimX + x;
1206  }
1207 
1208 // Use 64-bit float for convolution calculation
1209 #define VAL vtkm::Float64
1210 #define MAKEVAL(a) (static_cast<VAL>(a))
1211  template <typename InPortalType1, typename InPortalType2, typename InPortalType3>
1212  VTKM_EXEC_CONT VAL GetVal(const InPortalType1& portal1,
1213  const InPortalType2& portal2,
1214  const InPortalType3& portal3,
1215  vtkm::Id inCube,
1216  vtkm::Id inIdx) const
1217  {
1218  if (inCube == 2)
1219  {
1220  return MAKEVAL(portal2.Get(inIdx));
1221  }
1222  else if (inCube == 1)
1223  {
1224  return MAKEVAL(portal1.Get(inIdx));
1225  }
1226  else if (inCube == 3)
1227  {
1228  return MAKEVAL(portal3.Get(inIdx));
1229  }
1230  else
1231  {
1232  return -1;
1233  }
1234  }
1235 
1236  template <typename InPortalType1,
1237  typename InPortalType2,
1238  typename InPortalType3,
1239  typename FilterPortalType,
1240  typename OutputPortalType>
1241  VTKM_EXEC_CONT void operator()(const InPortalType1& inPortal1, // top extension
1242  const InPortalType2& inPortal2, // signal
1243  const InPortalType3& inPortal3, // down extension
1244  const FilterPortalType& lowFilter,
1245  const FilterPortalType& highFilter,
1246  OutputPortalType& coeffOut,
1247  const vtkm::Id& workIndex) const
1248  {
1249  vtkm::Id workX, workY, workZ, output1D;
1250  Output1Dto3D(workIndex, workX, workY, workZ);
1251  vtkm::Id inputCube = 0, inputIdx = 0;
1252  using OutputValueType = typename OutputPortalType::ValueType;
1253 
1254  if (workZ % 2 == 0) // calculate cA
1255  {
1256  vtkm::Id zl = lstart + workZ;
1257  VAL sum = MAKEVAL(0.0);
1258  for (vtkm::Id k = filterLen - 1; k > -1; k--)
1259  {
1260  translator.Translate3Dto1D(workX, workY, zl, inputCube, inputIdx);
1261  sum += lowFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx);
1262  zl++;
1263  }
1264  output1D = Output3Dto1D(workX, workY, workZ / 2);
1265  coeffOut.Set(output1D, static_cast<OutputValueType>(sum));
1266  }
1267  else // calculate cD
1268  {
1269  vtkm::Id zh = hstart + workZ - 1;
1270  VAL sum = MAKEVAL(0.0);
1271  for (vtkm::Id k = filterLen - 1; k > -1; k--)
1272  {
1273  translator.Translate3Dto1D(workX, workY, zh, inputCube, inputIdx);
1274  sum += highFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputCube, inputIdx);
1275  zh++;
1276  }
1277  output1D = Output3Dto1D(workX, workY, (workZ - 1) / 2 + approxLen);
1278  coeffOut.Set(output1D, static_cast<OutputValueType>(sum));
1279  }
1280  }
1281 #undef MAKEVAL
1282 #undef VAL
1283 
1284 private:
1288  //const vtkm::Id outDimZ; Not used
1291 };
1292 
1293 //=============================================================================
1294 
1295 //
1296 // ---------------------------------------------------
1297 // | | | | | | |
1298 // |cube1 | cube5 |cube2 |cube3 | cube5 |cube4 |
1299 // | ext1 | cA | ext2 | ext3 | cD | ext4 |
1300 // | (x1) | (xa) | (x2) | (x3) | (xd) | (x4) |
1301 // | | | | | | |
1302 // ----------------------------------------------------
1303 // The following 3 classes perform the same functionaliry in 3 directions
1304 //
1305 // Worklet: perform a simple 3D inverse transform along X direction (Left-right)
1307 {
1308 public:
1309  using ControlSignature = void(WholeArrayIn, // ext1
1310  WholeArrayIn, // ext2
1311  WholeArrayIn, // ext3
1312  WholeArrayIn, // ext4
1313  WholeArrayIn, // cA+cD (signal)
1314  WholeArrayIn, // lowFilter
1315  WholeArrayIn, // highFilter
1316  FieldOut); // outptu coefficients
1317  using ExecutionSignature = void(_1, _2, _3, _4, _5, _6, _7, _8, WorkIndex);
1318  using InputDomain = _8;
1319 
1320  // Constructor
1322  vtkm::Id x_1,
1323  vtkm::Id y_1,
1324  vtkm::Id z_1, // ext1
1325  vtkm::Id x_2,
1326  vtkm::Id y_2,
1327  vtkm::Id z_2, // ext2
1328  vtkm::Id x_3,
1329  vtkm::Id y_3,
1330  vtkm::Id z_3, // ext3
1331  vtkm::Id x_4,
1332  vtkm::Id y_4,
1333  vtkm::Id z_4, // ext4
1334  vtkm::Id x_a,
1335  vtkm::Id y_a,
1336  vtkm::Id z_a, // cA
1337  vtkm::Id x_d,
1338  vtkm::Id y_d,
1339  vtkm::Id z_d, // cD
1340  vtkm::Id x_5,
1341  vtkm::Id y_5,
1342  vtkm::Id z_5, // signal, actual dims
1343  vtkm::Id startX5,
1344  vtkm::Id startY5,
1345  vtkm::Id startZ5)
1346  : filterLen(fil_len)
1347  , outDimX(x_a + x_d)
1348  , outDimY(y_a)
1349  //, outDimZ(z_a)
1350  , cALenExtended(x_1 + x_a + x_2)
1351  , translator(x_1,
1352  y_1,
1353  z_1,
1354  x_2,
1355  y_2,
1356  z_2,
1357  x_3,
1358  y_3,
1359  z_3,
1360  x_4,
1361  y_4,
1362  z_4,
1363  x_a,
1364  y_a,
1365  z_a,
1366  x_d,
1367  y_d,
1368  z_d,
1369  x_5,
1370  y_5,
1371  z_5,
1372  startX5,
1373  startY5,
1374  startZ5)
1375  {
1376  }
1377 
1379  void Output1Dto3D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const
1380  {
1381  z = idx / (outDimX * outDimY);
1382  y = (idx - z * outDimX * outDimY) / outDimX;
1383  x = idx % outDimX;
1384  }
1385 
1386 // Use 64-bit float for convolution calculation
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>
1394  VTKM_EXEC_CONT VAL GetVal(const InPortalType1& ext1,
1395  const InPortalType2& ext2,
1396  const InPortalType3& ext3,
1397  const InPortalType4& ext4,
1398  const InPortalType5& sig5,
1399  vtkm::Id inCube,
1400  vtkm::Id inIdx) const
1401  {
1402  if (inCube == 2)
1403  {
1404  return MAKEVAL(ext2.Get(inIdx));
1405  }
1406  else if (inCube == 4)
1407  {
1408  return MAKEVAL(ext4.Get(inIdx));
1409  }
1410  else if (inCube == 1)
1411  {
1412  return MAKEVAL(ext1.Get(inIdx));
1413  }
1414  else if (inCube == 3)
1415  {
1416  return MAKEVAL(ext3.Get(inIdx));
1417  }
1418  else if (inCube == 5)
1419  {
1420  return MAKEVAL(sig5.Get(inIdx));
1421  }
1422  else
1423  {
1424  return -1;
1425  }
1426  }
1427 
1428  template <typename InPortalType1,
1429  typename InPortalType2,
1430  typename InPortalType3,
1431  typename InPortalType4,
1432  typename InPortalType5,
1433  typename FilterPortalType,
1434  typename OutputValueType>
1435  VTKM_EXEC void operator()(const InPortalType1& portal1,
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,
1443  const vtkm::Id& workIdx) const
1444  {
1445  vtkm::Id workX, workY, workZ;
1446  vtkm::Id k1, k2, xi;
1447  vtkm::Id inputCube = 0, inputIdx = 0;
1448  Output1Dto3D(workIdx, workX, workY, workZ);
1449 
1450  if (filterLen % 2 != 0) // odd filter
1451  {
1452  if (workX % 2 != 0)
1453  {
1454  k1 = filterLen - 2;
1455  k2 = filterLen - 1;
1456  }
1457  else
1458  {
1459  k1 = filterLen - 1;
1460  k2 = filterLen - 2;
1461  }
1462 
1463  VAL sum = 0.0;
1464  xi = (workX + 1) / 2;
1465  while (k1 > -1)
1466  {
1467  translator.Translate3Dto1D(xi, workY, workZ, inputCube, inputIdx);
1468  sum += lowFilter.Get(k1) *
1469  GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1470  xi++;
1471  k1 -= 2;
1472  }
1473  xi = workX / 2;
1474  while (k2 > -1)
1475  {
1476  translator.Translate3Dto1D(xi + cALenExtended, workY, workZ, inputCube, inputIdx);
1477  sum += highFilter.Get(k2) *
1478  GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1479  xi++;
1480  k2 -= 2;
1481  }
1482  coeffOut = static_cast<OutputValueType>(sum);
1483  }
1484  else // even filter
1485  {
1486  if ((filterLen / 2) % 2 != 0) // odd length half filter
1487  {
1488  xi = workX / 2;
1489  if (workX % 2 != 0)
1490  {
1491  k1 = filterLen - 1;
1492  }
1493  else
1494  {
1495  k1 = filterLen - 2;
1496  }
1497  }
1498  else // even length half filter
1499  {
1500  xi = (workX + 1) / 2;
1501  if (workX % 2 != 0)
1502  {
1503  k1 = filterLen - 2;
1504  }
1505  else
1506  {
1507  k1 = filterLen - 1;
1508  }
1509  }
1510  VAL cA, cD;
1511  VAL sum = 0.0;
1512  while (k1 > -1)
1513  {
1514  translator.Translate3Dto1D(xi, workY, workZ, inputCube, inputIdx);
1515  cA = GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1516  translator.Translate3Dto1D(xi + cALenExtended, workY, workZ, inputCube, inputIdx);
1517  cD = GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1518  sum += lowFilter.Get(k1) * cA + highFilter.Get(k1) * cD;
1519  xi++;
1520  k1 -= 2;
1521  }
1522  coeffOut = static_cast<OutputValueType>(sum);
1523  }
1524  }
1525 #undef MAKEVAL
1526 #undef VAL
1527 
1528 private:
1532  // vtkm::Id outDimZ; Not used
1533  vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD
1535 };
1536 
1538 {
1539 public:
1540  using ControlSignature = void(WholeArrayIn, // ext1
1541  WholeArrayIn, // ext2
1542  WholeArrayIn, // ext3
1543  WholeArrayIn, // ext4
1544  WholeArrayIn, // cA+cD (signal)
1545  WholeArrayIn, // lowFilter
1546  WholeArrayIn, // highFilter
1547  FieldOut); // outptu coefficients
1548  using ExecutionSignature = void(_1, _2, _3, _4, _5, _6, _7, _8, WorkIndex);
1549  using InputDomain = _8;
1550 
1551  // Constructor
1553  vtkm::Id x_1,
1554  vtkm::Id y_1,
1555  vtkm::Id z_1, // ext1
1556  vtkm::Id x_2,
1557  vtkm::Id y_2,
1558  vtkm::Id z_2, // ext2
1559  vtkm::Id x_3,
1560  vtkm::Id y_3,
1561  vtkm::Id z_3, // ext3
1562  vtkm::Id x_4,
1563  vtkm::Id y_4,
1564  vtkm::Id z_4, // ext4
1565  vtkm::Id x_a,
1566  vtkm::Id y_a,
1567  vtkm::Id z_a, // cA
1568  vtkm::Id x_d,
1569  vtkm::Id y_d,
1570  vtkm::Id z_d, // cD
1571  vtkm::Id x_5,
1572  vtkm::Id y_5,
1573  vtkm::Id z_5, // signal, actual dims
1574  vtkm::Id startX5,
1575  vtkm::Id startY5,
1576  vtkm::Id startZ5)
1577  : filterLen(fil_len)
1578  , outDimX(x_a)
1579  , outDimY(y_a + y_d)
1580  //, outDimZ(z_a)
1581  , cALenExtended(y_1 + y_a + y_2)
1582  , translator(x_1,
1583  y_1,
1584  z_1,
1585  x_2,
1586  y_2,
1587  z_2,
1588  x_3,
1589  y_3,
1590  z_3,
1591  x_4,
1592  y_4,
1593  z_4,
1594  x_a,
1595  y_a,
1596  z_a,
1597  x_d,
1598  y_d,
1599  z_d,
1600  x_5,
1601  y_5,
1602  z_5,
1603  startX5,
1604  startY5,
1605  startZ5)
1606  {
1607  }
1608 
1610  void Output1Dto3D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const
1611  {
1612  z = idx / (outDimX * outDimY);
1613  y = (idx - z * outDimX * outDimY) / outDimX;
1614  x = idx % outDimX;
1615  }
1616 
1617 // Use 64-bit float for convolution calculation
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>
1625  VTKM_EXEC_CONT VAL GetVal(const InPortalType1& ext1,
1626  const InPortalType2& ext2,
1627  const InPortalType3& ext3,
1628  const InPortalType4& ext4,
1629  const InPortalType5& sig5,
1630  vtkm::Id inCube,
1631  vtkm::Id inIdx) const
1632  {
1633  if (inCube == 2)
1634  {
1635  return MAKEVAL(ext2.Get(inIdx));
1636  }
1637  else if (inCube == 4)
1638  {
1639  return MAKEVAL(ext4.Get(inIdx));
1640  }
1641  else if (inCube == 1)
1642  {
1643  return MAKEVAL(ext1.Get(inIdx));
1644  }
1645  else if (inCube == 3)
1646  {
1647  return MAKEVAL(ext3.Get(inIdx));
1648  }
1649  else if (inCube == 5)
1650  {
1651  return MAKEVAL(sig5.Get(inIdx));
1652  }
1653  else
1654  {
1655  return -1;
1656  }
1657  }
1658 
1659  template <typename InPortalType1,
1660  typename InPortalType2,
1661  typename InPortalType3,
1662  typename InPortalType4,
1663  typename InPortalType5,
1664  typename FilterPortalType,
1665  typename OutputValueType>
1666  VTKM_EXEC void operator()(const InPortalType1& portal1,
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,
1674  const vtkm::Id& workIdx) const
1675  {
1676  vtkm::Id workX, workY, workZ;
1677  vtkm::Id k1, k2, yi;
1678  vtkm::Id inputCube = 0, inputIdx = 0;
1679  Output1Dto3D(workIdx, workX, workY, workZ);
1680 
1681  if (filterLen % 2 != 0) // odd filter
1682  {
1683  if (workY % 2 != 0)
1684  {
1685  k1 = filterLen - 2;
1686  k2 = filterLen - 1;
1687  }
1688  else
1689  {
1690  k1 = filterLen - 1;
1691  k2 = filterLen - 2;
1692  }
1693 
1694  VAL sum = 0.0;
1695  yi = (workY + 1) / 2;
1696  while (k1 > -1)
1697  {
1698  translator.Translate3Dto1D(workX, yi, workZ, inputCube, inputIdx);
1699  sum += lowFilter.Get(k1) *
1700  GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1701  yi++;
1702  k1 -= 2;
1703  }
1704  yi = workY / 2;
1705  while (k2 > -1)
1706  {
1707  translator.Translate3Dto1D(workX, yi + cALenExtended, workZ, inputCube, inputIdx);
1708  sum += highFilter.Get(k2) *
1709  GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1710  yi++;
1711  k2 -= 2;
1712  }
1713  coeffOut = static_cast<OutputValueType>(sum);
1714  }
1715  else // even filter
1716  {
1717  if ((filterLen / 2) % 2 != 0)
1718  {
1719  yi = workY / 2;
1720  if (workY % 2 != 0)
1721  {
1722  k1 = filterLen - 1;
1723  }
1724  else
1725  {
1726  k1 = filterLen - 2;
1727  }
1728  }
1729  else
1730  {
1731  yi = (workY + 1) / 2;
1732  if (workY % 2 != 0)
1733  {
1734  k1 = filterLen - 2;
1735  }
1736  else
1737  {
1738  k1 = filterLen - 1;
1739  }
1740  }
1741  VAL cA, cD;
1742  VAL sum = 0.0;
1743  while (k1 > -1)
1744  {
1745  translator.Translate3Dto1D(workX, yi, workZ, inputCube, inputIdx);
1746  cA = GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1747  translator.Translate3Dto1D(workX, yi + cALenExtended, workZ, inputCube, inputIdx);
1748  cD = GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1749  sum += lowFilter.Get(k1) * cA + highFilter.Get(k1) * cD;
1750  yi++;
1751  k1 -= 2;
1752  }
1753  coeffOut = static_cast<OutputValueType>(sum);
1754  }
1755  }
1756 #undef MAKEVAL
1757 #undef VAL
1758 
1759 private:
1763  //vtkm::Id outDimZ; Not used
1764  vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD
1766 };
1767 
1769 {
1770 public:
1771  using ControlSignature = void(WholeArrayIn, // ext1
1772  WholeArrayIn, // ext2
1773  WholeArrayIn, // ext3
1774  WholeArrayIn, // ext4
1775  WholeArrayIn, // cA+cD (signal)
1776  WholeArrayIn, // lowFilter
1777  WholeArrayIn, // highFilter
1778  FieldOut); // outptu coefficients
1779  using ExecutionSignature = void(_1, _2, _3, _4, _5, _6, _7, _8, WorkIndex);
1780  using InputDomain = _8;
1781 
1782  // Constructor
1784  vtkm::Id x_1,
1785  vtkm::Id y_1,
1786  vtkm::Id z_1, // ext1
1787  vtkm::Id x_2,
1788  vtkm::Id y_2,
1789  vtkm::Id z_2, // ext2
1790  vtkm::Id x_3,
1791  vtkm::Id y_3,
1792  vtkm::Id z_3, // ext3
1793  vtkm::Id x_4,
1794  vtkm::Id y_4,
1795  vtkm::Id z_4, // ext4
1796  vtkm::Id x_a,
1797  vtkm::Id y_a,
1798  vtkm::Id z_a, // cA
1799  vtkm::Id x_d,
1800  vtkm::Id y_d,
1801  vtkm::Id z_d, // cD
1802  vtkm::Id x_5,
1803  vtkm::Id y_5,
1804  vtkm::Id z_5, // signal, actual dims
1805  vtkm::Id startX5,
1806  vtkm::Id startY5,
1807  vtkm::Id startZ5)
1808  : filterLen(fil_len)
1809  , outDimX(x_a)
1810  , outDimY(y_a)
1811  //, outDimZ(z_a + z_d)
1812  , cALenExtended(z_1 + z_a + z_2)
1813  , translator(x_1,
1814  y_1,
1815  z_1,
1816  x_2,
1817  y_2,
1818  z_2,
1819  x_3,
1820  y_3,
1821  z_3,
1822  x_4,
1823  y_4,
1824  z_4,
1825  x_a,
1826  y_a,
1827  z_a,
1828  x_d,
1829  y_d,
1830  z_d,
1831  x_5,
1832  y_5,
1833  z_5,
1834  startX5,
1835  startY5,
1836  startZ5)
1837  {
1838  /* printf("InverseTransform3DFrontBack: \n");
1839  printf(" output dims: (%lld, %lld, %lld)\n", outDimX, outDimY, outDimZ ); */
1840  }
1841 
1843  void Output1Dto3D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const
1844  {
1845  z = idx / (outDimX * outDimY);
1846  y = (idx - z * outDimX * outDimY) / outDimX;
1847  x = idx % outDimX;
1848  }
1849 
1850 // Use 64-bit float for convolution calculation
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>
1858  VTKM_EXEC_CONT VAL GetVal(const InPortalType1& ext1,
1859  const InPortalType2& ext2,
1860  const InPortalType3& ext3,
1861  const InPortalType4& ext4,
1862  const InPortalType5& sig5,
1863  vtkm::Id inCube,
1864  vtkm::Id inIdx) const
1865  {
1866  if (inCube == 2)
1867  {
1868  return MAKEVAL(ext2.Get(inIdx));
1869  }
1870  else if (inCube == 4)
1871  {
1872  return MAKEVAL(ext4.Get(inIdx));
1873  }
1874  else if (inCube == 1)
1875  {
1876  return MAKEVAL(ext1.Get(inIdx));
1877  }
1878  else if (inCube == 3)
1879  {
1880  return MAKEVAL(ext3.Get(inIdx));
1881  }
1882  else if (inCube == 5)
1883  {
1884  return MAKEVAL(sig5.Get(inIdx));
1885  }
1886  else
1887  {
1888  return -1;
1889  }
1890  }
1891 
1892  template <typename InPortalType1,
1893  typename InPortalType2,
1894  typename InPortalType3,
1895  typename InPortalType4,
1896  typename InPortalType5,
1897  typename FilterPortalType,
1898  typename OutputValueType>
1899  VTKM_EXEC void operator()(const InPortalType1& portal1,
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,
1907  const vtkm::Id& workIdx) const
1908  {
1909  vtkm::Id workX, workY, workZ;
1910  vtkm::Id k1, k2, zi;
1911  vtkm::Id inputCube = 0, inputIdx = 0;
1912  Output1Dto3D(workIdx, workX, workY, workZ);
1913 
1914  if (filterLen % 2 != 0) // odd filter
1915  {
1916  if (workZ % 2 != 0)
1917  {
1918  k1 = filterLen - 2;
1919  k2 = filterLen - 1;
1920  }
1921  else
1922  {
1923  k1 = filterLen - 1;
1924  k2 = filterLen - 2;
1925  }
1926 
1927  VAL sum = 0.0;
1928  zi = (workZ + 1) / 2;
1929  while (k1 > -1)
1930  {
1931  translator.Translate3Dto1D(workX, workY, zi, inputCube, inputIdx);
1932  sum += lowFilter.Get(k1) *
1933  GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1934  zi++;
1935  k1 -= 2;
1936  }
1937  zi = workZ / 2;
1938  while (k2 > -1)
1939  {
1940  translator.Translate3Dto1D(workX, workY, zi + cALenExtended, inputCube, inputIdx);
1941  sum += highFilter.Get(k2) *
1942  GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1943  zi++;
1944  k2 -= 2;
1945  }
1946  coeffOut = static_cast<OutputValueType>(sum);
1947  }
1948  else // even filter
1949  {
1950  if ((filterLen / 2) % 2 != 0)
1951  {
1952  zi = workZ / 2;
1953  if (workZ % 2 != 0)
1954  {
1955  k1 = filterLen - 1;
1956  }
1957  else
1958  {
1959  k1 = filterLen - 2;
1960  }
1961  }
1962  else
1963  {
1964  zi = (workZ + 1) / 2;
1965  if (workZ % 2 != 0)
1966  {
1967  k1 = filterLen - 2;
1968  }
1969  else
1970  {
1971  k1 = filterLen - 1;
1972  }
1973  }
1974  VAL cA, cD;
1975  VAL sum = 0.0;
1976  while (k1 > -1)
1977  {
1978  translator.Translate3Dto1D(workX, workY, zi, inputCube, inputIdx);
1979  cA = GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1980  translator.Translate3Dto1D(workX, workY, zi + cALenExtended, inputCube, inputIdx);
1981  cD = GetVal(portal1, portal2, portal3, portal4, portal5, inputCube, inputIdx);
1982  sum += lowFilter.Get(k1) * cA + highFilter.Get(k1) * cD;
1983  zi++;
1984  k1 -= 2;
1985  }
1986  coeffOut = static_cast<OutputValueType>(sum);
1987  }
1988  }
1989 #undef MAKEVAL
1990 #undef VAL
1991 
1992 private:
1996  //vtkm::Id outDimZ; Not used
1997  vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD
1999 };
2000 
2001 //=============================================================================
2002 
2003 // ---------------------------------------------------
2004 // | | | | | | |
2005 // | | | | | | |
2006 // | ext1 | cA | ext2 | ext3 | cD | ext4 |
2007 // | (x1) | (xa) | (x2) | (x3) | (xd) | (x4) |
2008 // | | | | | | |
2009 // ----------------------------------------------------
2010 // matrix1: ext1
2011 // matrix2: ext2
2012 // matrix3: ext3
2013 // matrix4: ext4
2014 // matrix5: cA + cD
2016 {
2017 public:
2019  vtkm::Id y_1,
2020  vtkm::Id x_a,
2021  vtkm::Id y_a,
2022  vtkm::Id x_2,
2023  vtkm::Id y_2,
2024  vtkm::Id x_3,
2025  vtkm::Id y_3,
2026  vtkm::Id x_d,
2027  vtkm::Id y_d,
2028  vtkm::Id x_4,
2029  vtkm::Id y_4,
2030  vtkm::Id x_5,
2031  vtkm::Id y_5, // actual size of matrix5
2032  vtkm::Id start_x5,
2033  vtkm::Id start_y5, // start indices of pretend matrix
2034  bool mode)
2035  : x1(x_1)
2036  , y1(y_1)
2037  , xa(x_a)
2038  , ya(y_a)
2039  , x2(x_2)
2040  , y2(y_2)
2041  , x3(x_3)
2042  , y3(y_3)
2043  , xd(x_d)
2044  , yd(y_d)
2045  , x4(x_4)
2046  , y4(y_4)
2047  , x5(x_5)
2048  , y5(y_5)
2049  , startX5(start_x5)
2050  , startY5(start_y5)
2051  , modeLR(mode)
2052  {
2053  // Get pretend matrix dims
2054  if (modeLR)
2055  {
2056  pretendX5 = xa + xd;
2057  pretendY5 = y1;
2058  }
2059  else
2060  {
2061  pretendX5 = x1;
2062  pretendY5 = ya + yd;
2063  }
2064  (void)y5;
2065  }
2066 
2069  vtkm::Id inY, // 2D indices as input
2070  vtkm::Id& mat,
2071  vtkm::Id& idx) const // which matrix, and idx of that matrix
2072  {
2073  if (modeLR) // left-right mode
2074  {
2075  if (0 <= inX && inX < x1)
2076  {
2077  mat = 1; // ext1
2078  idx = inY * x1 + inX;
2079  }
2080  else if (x1 <= inX && inX < (x1 + xa))
2081  {
2082  mat = 5; // cAcD
2083  idx = (inY + startY5) * x5 + (inX - x1 + startX5);
2084  }
2085  else if ((x1 + xa) <= inX && inX < (x1 + xa + x2))
2086  {
2087  mat = 2; // ext2
2088  idx = inY * x2 + (inX - x1 - xa);
2089  }
2090  else if ((x1 + xa + x2) <= inX && inX < (x1 + xa + x2 + x3))
2091  {
2092  mat = 3; // ext3
2093  idx = inY * x3 + (inX - x1 - xa - x2);
2094  }
2095  else if ((x1 + xa + x2 + x3) <= inX && inX < (x1 + xa + x2 + x3 + xd))
2096  {
2097  mat = 5; // cAcD
2098  idx = (inY + startY5) * x5 + (inX - x1 - x2 - x3 + startX5);
2099  }
2100  else if ((x1 + xa + x2 + x3 + xd) <= inX && inX < (x1 + xa + x2 + x3 + xd + x4))
2101  {
2102  mat = 4; // ext4
2103  idx = inY * x4 + (inX - x1 - xa - x2 - x3 - xd);
2104  }
2105  }
2106  else // top-down mode
2107  {
2108  if (0 <= inY && inY < y1)
2109  {
2110  mat = 1; // ext1
2111  idx = inY * x1 + inX;
2112  }
2113  else if (y1 <= inY && inY < (y1 + ya))
2114  {
2115  mat = 5; // cAcD
2116  idx = (inY - y1 + startY5) * x5 + inX + startX5;
2117  }
2118  else if ((y1 + ya) <= inY && inY < (y1 + ya + y2))
2119  {
2120  mat = 2; // ext2
2121  idx = (inY - y1 - ya) * x2 + inX;
2122  }
2123  else if ((y1 + ya + y2) <= inY && inY < (y1 + ya + y2 + y3))
2124  {
2125  mat = 3; // ext3
2126  idx = (inY - y1 - ya - y2) * x3 + inX;
2127  }
2128  else if ((y1 + ya + y2 + y3) <= inY && inY < (y1 + ya + y2 + y3 + yd))
2129  {
2130  mat = 5; // cAcD
2131  idx = (inY - y1 - y2 - y3 + startY5) * x5 + inX + startX5;
2132  }
2133  else if ((y1 + ya + y2 + y3 + yd) <= inY && inY < (y1 + ya + y2 + y3 + yd + y4))
2134  {
2135  mat = 4; // ext4
2136  idx = (inY - y1 - ya - y2 - y3 - yd) * x4 + inX;
2137  }
2138  }
2139  }
2140 
2141 private:
2142  const vtkm::Id x1, y1, xa, ya, x2, y2, x3, y3, xd, yd, x4, y4;
2144  const bool modeLR; // true = left-right mode; false = top-down mode.
2145 };
2146 
2147 // ................
2148 // . .
2149 // -----.--------------.-----
2150 // | . | | . |
2151 // | . | | . |
2152 // | ext1 | mat2 | ext2 |
2153 // | (x1) | (x2) | (x3) |
2154 // | . | | . |
2155 // -----.--------------.-----
2156 // ................
2158 {
2159 public:
2161  vtkm::Id y_1,
2162  vtkm::Id x_2,
2163  vtkm::Id y_2, // actual dims of mat2
2164  vtkm::Id startx_2,
2165  vtkm::Id starty_2, // start idx of pretend
2166  vtkm::Id pretendx_2,
2167  vtkm::Id pretendy_2, // pretend dims
2168  vtkm::Id x_3,
2169  vtkm::Id y_3,
2170  bool mode)
2171  : dimX1(x_1)
2172  , dimY1(y_1)
2173  , dimX2(x_2)
2174  , dimY2(y_2)
2175  , startX2(startx_2)
2176  , startY2(starty_2)
2177  , pretendDimX2(pretendx_2)
2178  , pretendDimY2(pretendy_2)
2179  , dimX3(x_3)
2180  , dimY3(y_3)
2181  , mode_lr(mode)
2182  {
2183  (void)dimY2;
2184  }
2185 
2188  vtkm::Id inY, // 2D indices as input
2189  vtkm::Id& mat,
2190  vtkm::Id& idx) const // which matrix, and idx of that matrix
2191  {
2192  if (mode_lr) // left-right mode
2193  {
2194  if (0 <= inX && inX < dimX1)
2195  {
2196  mat = 1;
2197  idx = inY * dimX1 + inX;
2198  }
2199  else if (dimX1 <= inX && inX < (dimX1 + pretendDimX2))
2200  {
2201  mat = 2;
2202  idx = (inY + startY2) * dimX2 + (inX + startX2 - dimX1);
2203  }
2204  else if ((dimX1 + pretendDimX2) <= inX && inX < (dimX1 + pretendDimX2 + dimX3))
2205  {
2206  mat = 3;
2207  idx = inY * dimX3 + (inX - dimX1 - pretendDimX2);
2208  }
2209  }
2210  else // top-down mode
2211  {
2212  if (0 <= inY && inY < dimY1)
2213  {
2214  mat = 1;
2215  idx = inY * dimX1 + inX;
2216  }
2217  else if (dimY1 <= inY && inY < (dimY1 + pretendDimY2))
2218  {
2219  mat = 2;
2220  idx = (inY + startY2 - dimY1) * dimX2 + inX + startX2;
2221  }
2222  else if ((dimY1 + pretendDimY2) <= inY && inY < (dimY1 + pretendDimY2 + dimY3))
2223  {
2224  mat = 3;
2225  idx = (inY - dimY1 - pretendDimY2) * dimX3 + inX;
2226  }
2227  }
2228  }
2229 
2230 private:
2234  const bool mode_lr; // true: left right mode; false: top down mode.
2235 };
2236 
2237 // Worklet for 2D signal extension
2238 // This implementation operates on a specified part of a big rectangle
2240 {
2241 public:
2242  using ControlSignature = void(WholeArrayOut, // extension part
2243  WholeArrayIn); // signal part
2244  using ExecutionSignature = void(_1, _2, WorkIndex);
2245  using InputDomain = _1;
2246 
2247  // Constructor
2250  vtkm::Id extdimY,
2251  vtkm::Id sigdimX,
2252  vtkm::Id sigdimY,
2253  vtkm::Id sigstartX,
2254  vtkm::Id sigstartY,
2255  vtkm::Id sigpretendX,
2256  vtkm::Id sigpretendY,
2257  DWTMode m,
2258  ExtensionDirection dir,
2259  bool pad_zero)
2260  : extDimX(extdimX)
2261  , extDimY(extdimY)
2262  , sigDimX(sigdimX)
2263  , sigDimY(sigdimY)
2264  , sigStartX(sigstartX)
2265  , sigStartY(sigstartY)
2266  , sigPretendDimX(sigpretendX)
2267  , sigPretendDimY(sigpretendY)
2268  , mode(m)
2269  , direction(dir)
2270  , padZero(pad_zero)
2271  {
2272  (void)sigDimY;
2273  }
2274 
2275  // Index translation helper
2277  void Ext1Dto2D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y) const
2278  {
2279  x = idx % extDimX;
2280  y = idx / extDimX;
2281  }
2282 
2283  // Index translation helper
2285  vtkm::Id Sig2Dto1D(vtkm::Id x, vtkm::Id y) const { return y * sigDimX + x; }
2286 
2287  // Index translation helper
2290  {
2291  return (y + sigStartY) * sigDimX + x + sigStartX;
2292  }
2293 
2294  template <typename PortalOutType, typename PortalInType>
2295  VTKM_EXEC void operator()(PortalOutType& portalOut,
2296  const PortalInType& portalIn,
2297  const vtkm::Id& workIndex) const
2298  {
2299  vtkm::Id extX, extY, sigPretendX, sigPretendY;
2300  sigPretendX = sigPretendY = 0;
2301  Ext1Dto2D(workIndex, extX, extY);
2302  typename PortalOutType::ValueType sym = 1.0;
2303  if (mode == ASYMH || mode == ASYMW)
2304  {
2305  sym = -1.0;
2306  }
2307  if (direction == LEFT)
2308  {
2309  sigPretendY = extY;
2310  if (mode == SYMH || mode == ASYMH)
2311  {
2312  sigPretendX = extDimX - extX - 1;
2313  }
2314  else // mode == SYMW || mode == ASYMW
2315  {
2316  sigPretendX = extDimX - extX;
2317  }
2318  }
2319  else if (direction == TOP)
2320  {
2321  sigPretendX = extX;
2322  if (mode == SYMH || mode == ASYMH)
2323  {
2324  sigPretendY = extDimY - extY - 1;
2325  }
2326  else // mode == SYMW || mode == ASYMW
2327  {
2328  sigPretendY = extDimY - extY;
2329  }
2330  }
2331  else if (direction == RIGHT)
2332  {
2333  sigPretendY = extY;
2334  if (mode == SYMH || mode == ASYMH)
2335  {
2336  sigPretendX = sigPretendDimX - extX - 1;
2337  }
2338  else
2339  {
2340  sigPretendX = sigPretendDimX - extX - 2;
2341  }
2342  if (padZero)
2343  {
2344  sigPretendX++;
2345  }
2346  }
2347  else if (direction == BOTTOM)
2348  {
2349  sigPretendX = extX;
2350  if (mode == SYMH || mode == ASYMH)
2351  {
2352  sigPretendY = sigPretendDimY - extY - 1;
2353  }
2354  else
2355  {
2356  sigPretendY = sigPretendDimY - extY - 2;
2357  }
2358  if (padZero)
2359  {
2360  sigPretendY++;
2361  }
2362  }
2363 
2364  if (sigPretendX == sigPretendDimX || sigPretendY == sigPretendDimY)
2365  {
2366  portalOut.Set(workIndex, 0.0);
2367  }
2368  else
2369  {
2370  portalOut.Set(workIndex, sym * portalIn.Get(SigPretend2Dto1D(sigPretendX, sigPretendY)));
2371  }
2372  }
2373 
2374 private:
2377  const DWTMode mode;
2379  const bool padZero; // treat sigIn as having a column/row zeros
2380 };
2381 
2382 // Worklet: perform a simple 2D forward transform
2384 {
2385 public:
2386  using ControlSignature = void(WholeArrayIn, // left/top extension
2387  WholeArrayIn, // sigIn
2388  WholeArrayIn, // right/bottom extension
2389  WholeArrayIn, // lowFilter
2390  WholeArrayIn, // highFilter
2391  WholeArrayOut); // cA followed by cD
2392  using ExecutionSignature = void(_1, _2, _3, _4, _5, _6, WorkIndex);
2393  using InputDomain = _6;
2394 
2395  // Constructor
2397  vtkm::Id approx_len,
2398  bool odd_low,
2399  bool mode_lr,
2400  vtkm::Id x1,
2401  vtkm::Id y1, // dims of left/top extension
2402  vtkm::Id x2,
2403  vtkm::Id y2, // dims of signal
2404  vtkm::Id startx2,
2405  vtkm::Id starty2, // start idx of signal
2406  vtkm::Id pretendx2,
2407  vtkm::Id pretendy2, // pretend dims of signal
2408  vtkm::Id x3,
2409  vtkm::Id y3) // dims of right/bottom extension
2410  : filterLen(filter_len)
2411  , approxLen(approx_len)
2412  , outDimX(pretendx2)
2413  ,
2414  //outDimY(pretendy2),
2415  oddlow(odd_low)
2416  , modeLR(mode_lr)
2417  , translator(x1, y1, x2, y2, startx2, starty2, pretendx2, pretendy2, x3, y3, mode_lr)
2418  {
2419  this->SetStartPosition();
2420  }
2421 
2423  void Output1Dto2D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y) const
2424  {
2425  x = idx % outDimX;
2426  y = idx / outDimX;
2427  }
2429  vtkm::Id Output2Dto1D(vtkm::Id x, vtkm::Id y) const { return y * outDimX + x; }
2430 
2431 // Use 64-bit float for convolution calculation
2432 #define VAL vtkm::Float64
2433 #define MAKEVAL(a) (static_cast<VAL>(a))
2434  template <typename InPortalType1, typename InPortalType2, typename InPortalType3>
2435  VTKM_EXEC_CONT VAL GetVal(const InPortalType1& portal1,
2436  const InPortalType2& portal2,
2437  const InPortalType3& portal3,
2438  vtkm::Id inMatrix,
2439  vtkm::Id inIdx) const
2440  {
2441  if (inMatrix == 1)
2442  {
2443  return MAKEVAL(portal1.Get(inIdx));
2444  }
2445  else if (inMatrix == 2)
2446  {
2447  return MAKEVAL(portal2.Get(inIdx));
2448  }
2449  else if (inMatrix == 3)
2450  {
2451  return MAKEVAL(portal3.Get(inIdx));
2452  }
2453  else
2454  {
2455  return -1;
2456  }
2457  }
2458 
2459  template <typename InPortalType1,
2460  typename InPortalType2,
2461  typename InPortalType3,
2462  typename FilterPortalType,
2463  typename OutputPortalType>
2464  VTKM_EXEC_CONT void operator()(const InPortalType1& inPortal1, // left/top extension
2465  const InPortalType2& inPortal2, // signal
2466  const InPortalType3& inPortal3, // right/bottom extension
2467  const FilterPortalType& lowFilter,
2468  const FilterPortalType& highFilter,
2469  OutputPortalType& coeffOut,
2470  const vtkm::Id& workIndex) const
2471  {
2472  vtkm::Id workX, workY, output1D;
2473  Output1Dto2D(workIndex, workX, workY);
2474  vtkm::Id inputMatrix = 0, inputIdx = 0;
2475  using OutputValueType = typename OutputPortalType::ValueType;
2476 
2477  if (modeLR)
2478  {
2479  if (workX % 2 == 0) // calculate cA
2480  {
2481  vtkm::Id xl = lstart + workX;
2482  VAL sum = MAKEVAL(0.0);
2483  for (vtkm::Id k = filterLen - 1; k > -1; k--)
2484  {
2485  translator.Translate2Dto1D(xl, workY, inputMatrix, inputIdx);
2486  sum += lowFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx);
2487  xl++;
2488  }
2489  output1D = Output2Dto1D(workX / 2, workY);
2490  coeffOut.Set(output1D, static_cast<OutputValueType>(sum));
2491  }
2492  else // calculate cD
2493  {
2494  vtkm::Id xh = hstart + workX - 1;
2495  VAL sum = MAKEVAL(0.0);
2496  for (vtkm::Id k = filterLen - 1; k > -1; k--)
2497  {
2498  translator.Translate2Dto1D(xh, workY, inputMatrix, inputIdx);
2499  sum += highFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx);
2500  xh++;
2501  }
2502  output1D = Output2Dto1D((workX - 1) / 2 + approxLen, workY);
2503  coeffOut.Set(output1D, static_cast<OutputValueType>(sum));
2504  }
2505  }
2506  else // top-down order
2507  {
2508  if (workY % 2 == 0) // calculate cA
2509  {
2510  vtkm::Id yl = lstart + workY;
2511  VAL sum = MAKEVAL(0.0);
2512  for (vtkm::Id k = filterLen - 1; k > -1; k--)
2513  {
2514  translator.Translate2Dto1D(workX, yl, inputMatrix, inputIdx);
2515  sum += lowFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx);
2516  yl++;
2517  }
2518  output1D = Output2Dto1D(workX, workY / 2);
2519  coeffOut.Set(output1D, static_cast<OutputValueType>(sum));
2520  }
2521  else // calculate cD
2522  {
2523  vtkm::Id yh = hstart + workY - 1;
2524  VAL sum = MAKEVAL(0.0);
2525  for (vtkm::Id k = filterLen - 1; k > -1; k--)
2526  {
2527  translator.Translate2Dto1D(workX, yh, inputMatrix, inputIdx);
2528  sum += highFilter.Get(k) * GetVal(inPortal1, inPortal2, inPortal3, inputMatrix, inputIdx);
2529  yh++;
2530  }
2531  output1D = Output2Dto1D(workX, (workY - 1) / 2 + approxLen);
2532  coeffOut.Set(output1D, static_cast<OutputValueType>(sum));
2533  }
2534  }
2535  }
2536 #undef MAKEVAL
2537 #undef VAL
2538 
2539 private:
2542  //const vtkm::Id outDimY; Not used
2543  bool oddlow;
2544  bool modeLR; // true = left right; false = top down.
2547 
2550  {
2551  this->lstart = this->oddlow ? 1 : 0;
2552  this->hstart = 1;
2553  }
2554 };
2555 
2556 // ---------------------------------------------------
2557 // | | | | | | |
2558 // | | | | | | |
2559 // | ext1 | cA | ext2 | ext3 | cD | ext4 |
2560 // | (x1) | (xa) | (x2) | (x3) | (xd) | (x4) |
2561 // | | | | | | |
2562 // ----------------------------------------------------
2563 // portal1: ext1
2564 // portal2: ext2
2565 // portal3: ext3
2566 // portal4: ext4
2567 // portal5: cA + cD
2568 // Worklet: perform a simple 2D inverse transform
2570 {
2571 public:
2572  using ControlSignature = void(WholeArrayIn, // ext1
2573  WholeArrayIn, // ext2
2574  WholeArrayIn, // ext3
2575  WholeArrayIn, // ext4
2576  WholeArrayIn, // cA+cD (signal)
2577  WholeArrayIn, // lowFilter
2578  WholeArrayIn, // highFilter
2579  FieldOut); // outptu coeffs
2580  using ExecutionSignature = void(_1, _2, _3, _4, _5, _6, _7, _8, WorkIndex);
2581  using InputDomain = _8;
2582 
2583  // Constructor
2585  vtkm::Id x_1,
2586  vtkm::Id y_1, // ext1
2587  vtkm::Id x_a,
2588  vtkm::Id y_a, // cA
2589  vtkm::Id x_2,
2590  vtkm::Id y_2, // ext2
2591  vtkm::Id x_3,
2592  vtkm::Id y_3, // ext3
2593  vtkm::Id x_d,
2594  vtkm::Id y_d, // cD
2595  vtkm::Id x_4,
2596  vtkm::Id y_4, // ext4
2597  vtkm::Id x_5,
2598  vtkm::Id y_5,
2599  vtkm::Id startX5,
2600  vtkm::Id startY5,
2601  bool mode_lr)
2602  : filterLen(fil_len)
2603  , translator(x_1,
2604  y_1,
2605  x_a,
2606  y_a,
2607  x_2,
2608  y_2,
2609  x_3,
2610  y_3,
2611  x_d,
2612  y_d,
2613  x_4,
2614  y_4,
2615  x_5,
2616  y_5,
2617  startX5,
2618  startY5,
2619  mode_lr)
2620  , modeLR(mode_lr)
2621  {
2622  if (modeLR)
2623  {
2624  outputDimX = x_a + x_d;
2625  outputDimY = y_1;
2626  cALenExtended = x_1 + x_a + x_2;
2627  }
2628  else
2629  {
2630  outputDimX = x_1;
2631  outputDimY = y_a + y_d;
2632  cALenExtended = y_1 + y_a + y_2;
2633  }
2634  }
2635 
2637  void Output1Dto2D(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y) const
2638  {
2639  x = idx % outputDimX;
2640  y = idx / outputDimX;
2641  }
2642 
2643 // Use 64-bit float for convolution calculation
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>
2651  VTKM_EXEC_CONT VAL GetVal(const InPortalType1& ext1,
2652  const InPortalType2& ext2,
2653  const InPortalType3& ext3,
2654  const InPortalType4& ext4,
2655  const InPortalTypecAcD& cAcD,
2656  vtkm::Id inMatrix,
2657  vtkm::Id inIdx) const
2658  {
2659  if (inMatrix == 1)
2660  {
2661  return MAKEVAL(ext1.Get(inIdx));
2662  }
2663  else if (inMatrix == 2)
2664  {
2665  return MAKEVAL(ext2.Get(inIdx));
2666  }
2667  else if (inMatrix == 3)
2668  {
2669  return MAKEVAL(ext3.Get(inIdx));
2670  }
2671  else if (inMatrix == 4)
2672  {
2673  return MAKEVAL(ext4.Get(inIdx));
2674  }
2675  else if (inMatrix == 5)
2676  {
2677  return MAKEVAL(cAcD.Get(inIdx));
2678  }
2679  else
2680  {
2681  return -1;
2682  }
2683  }
2684 
2685  template <typename InPortalType1,
2686  typename InPortalType2,
2687  typename InPortalType3,
2688  typename InPortalType4,
2689  typename InPortalTypecAcD,
2690  typename FilterPortalType,
2691  typename OutputValueType>
2692  VTKM_EXEC void operator()(const InPortalType1& portal1,
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,
2700  const vtkm::Id& workIdx) const
2701  {
2702  vtkm::Id workX, workY;
2703  vtkm::Id k1 = 0, k2 = 0, xi = 0, yi = 0, inputMatrix = 0, inputIdx = 0;
2704  Output1Dto2D(workIdx, workX, workY);
2705 
2706  // left-right, odd filter
2707  if (modeLR && (filterLen % 2 != 0))
2708  {
2709  if (workX % 2 != 0)
2710  {
2711  k1 = filterLen - 2;
2712  k2 = filterLen - 1;
2713  }
2714  else
2715  {
2716  k1 = filterLen - 1;
2717  k2 = filterLen - 2;
2718  }
2719 
2720  VAL sum = 0.0;
2721  xi = (workX + 1) / 2;
2722  while (k1 > -1)
2723  {
2724  translator.Translate2Dto1D(xi, workY, inputMatrix, inputIdx);
2725  sum += lowFilter.Get(k1) *
2726  GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2727  xi++;
2728  k1 -= 2;
2729  }
2730  xi = workX / 2;
2731  while (k2 > -1)
2732  {
2733  translator.Translate2Dto1D(xi + cALenExtended, workY, inputMatrix, inputIdx);
2734  sum += highFilter.Get(k2) *
2735  GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2736  xi++;
2737  k2 -= 2;
2738  }
2739  coeffOut = static_cast<OutputValueType>(sum);
2740  }
2741 
2742  // top-down, odd filter
2743  else if (!modeLR && (filterLen % 2 != 0))
2744  {
2745  if (workY % 2 != 0)
2746  {
2747  k1 = filterLen - 2;
2748  k2 = filterLen - 1;
2749  }
2750  else
2751  {
2752  k1 = filterLen - 1;
2753  k2 = filterLen - 2;
2754  }
2755 
2756  VAL sum = 0.0;
2757  yi = (workY + 1) / 2;
2758  while (k1 > -1)
2759  {
2760  translator.Translate2Dto1D(workX, yi, inputMatrix, inputIdx);
2761  VAL cA = GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2762  sum += lowFilter.Get(k1) * cA;
2763  yi++;
2764  k1 -= 2;
2765  }
2766  yi = workY / 2;
2767  while (k2 > -1)
2768  {
2769  translator.Translate2Dto1D(workX, yi + cALenExtended, inputMatrix, inputIdx);
2770  VAL cD = GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2771  sum += highFilter.Get(k2) * cD;
2772  yi++;
2773  k2 -= 2;
2774  }
2775  coeffOut = static_cast<OutputValueType>(sum);
2776  }
2777 
2778  // left-right, even filter
2779  else if (modeLR && (filterLen % 2 == 0))
2780  {
2781  if ((filterLen / 2) % 2 != 0) // odd length half filter
2782  {
2783  xi = workX / 2;
2784  if (workX % 2 != 0)
2785  {
2786  k1 = filterLen - 1;
2787  }
2788  else
2789  {
2790  k1 = filterLen - 2;
2791  }
2792  }
2793  else // even length half filter
2794  {
2795  xi = (workX + 1) / 2;
2796  if (workX % 2 != 0)
2797  {
2798  k1 = filterLen - 2;
2799  }
2800  else
2801  {
2802  k1 = filterLen - 1;
2803  }
2804  }
2805  VAL cA, cD;
2806  VAL sum = 0.0;
2807  while (k1 > -1)
2808  {
2809  translator.Translate2Dto1D(xi, workY, inputMatrix, inputIdx);
2810  cA = GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2811  translator.Translate2Dto1D(xi + cALenExtended, workY, inputMatrix, inputIdx);
2812  cD = GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2813  sum += lowFilter.Get(k1) * cA + highFilter.Get(k1) * cD;
2814  xi++;
2815  k1 -= 2;
2816  }
2817  coeffOut = static_cast<OutputValueType>(sum);
2818  }
2819 
2820  // top-down, even filter
2821  else
2822  {
2823  if ((filterLen / 2) % 2 != 0)
2824  {
2825  yi = workY / 2;
2826  if (workY % 2 != 0)
2827  {
2828  k1 = filterLen - 1;
2829  }
2830  else
2831  {
2832  k1 = filterLen - 2;
2833  }
2834  }
2835  else
2836  {
2837  yi = (workY + 1) / 2;
2838  if (workY % 2 != 0)
2839  {
2840  k1 = filterLen - 2;
2841  }
2842  else
2843  {
2844  k1 = filterLen - 1;
2845  }
2846  }
2847  VAL cA, cD;
2848  VAL sum = 0.0;
2849  while (k1 > -1)
2850  {
2851  translator.Translate2Dto1D(workX, yi, inputMatrix, inputIdx);
2852  cA = GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2853  translator.Translate2Dto1D(workX, yi + cALenExtended, inputMatrix, inputIdx);
2854  cD = GetVal(portal1, portal2, portal3, portal4, portalcAcD, inputMatrix, inputIdx);
2855  sum += lowFilter.Get(k1) * cA + highFilter.Get(k1) * cD;
2856  yi++;
2857  k1 -= 2;
2858  }
2859  coeffOut = static_cast<OutputValueType>(sum);
2860  }
2861  }
2862 #undef MAKEVAL
2863 #undef VAL
2864 
2865 private:
2868  vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD
2870  const bool modeLR;
2871 };
2872 
2873 // Worklet: perform a simple 1D forward transform
2875 {
2876 public:
2877  using ControlSignature = void(WholeArrayIn, // sigIn
2878  WholeArrayIn, // lowFilter
2879  WholeArrayIn, // highFilter
2880  WholeArrayOut); // cA followed by cD
2881  using ExecutionSignature = void(_1, _2, _3, _4, WorkIndex);
2882  using InputDomain = _1;
2883 
2884  // Constructor
2886  vtkm::Id approx_len,
2887  vtkm::Id detail_len,
2888  bool odd_low,
2889  bool odd_high)
2890  : filterLen(filLen)
2891  , approxLen(approx_len)
2892  , detailLen(detail_len)
2893  , oddlow(odd_low)
2894  , oddhigh(odd_high)
2895  {
2896  this->SetStartPosition();
2897  }
2898 
2899 // Use 64-bit float for convolution calculation
2900 #define VAL vtkm::Float64
2901 #define MAKEVAL(a) (static_cast<VAL>(a))
2902  template <typename InputPortalType, typename FilterPortalType, typename OutputPortalType>
2903  VTKM_EXEC void operator()(const InputPortalType& signalIn,
2904  const FilterPortalType lowFilter,
2905  const FilterPortalType highFilter,
2906  OutputPortalType& coeffOut,
2907  const vtkm::Id& workIndex) const
2908  {
2909  using OutputValueType = typename OutputPortalType::ValueType;
2910  if (workIndex < approxLen + detailLen)
2911  {
2912  if (workIndex % 2 == 0) // calculate cA
2913  {
2914  vtkm::Id xl = xlstart + workIndex;
2915  VAL sum = MAKEVAL(0.0);
2916  for (vtkm::Id k = filterLen - 1; k >= 0; k--)
2917  {
2918  sum += lowFilter.Get(k) * MAKEVAL(signalIn.Get(xl++));
2919  }
2920  vtkm::Id outputIdx = workIndex / 2; // put cA at the beginning
2921  coeffOut.Set(outputIdx, static_cast<OutputValueType>(sum));
2922  }
2923  else // calculate cD
2924  {
2925  VAL sum = MAKEVAL(0.0);
2926  vtkm::Id xh = xhstart + workIndex - 1;
2927  for (vtkm::Id k = filterLen - 1; k >= 0; k--)
2928  {
2929  sum += highFilter.Get(k) * MAKEVAL(signalIn.Get(xh++));
2930  }
2931  vtkm::Id outputIdx = approxLen + (workIndex - 1) / 2; // put cD after cA
2932  coeffOut.Set(outputIdx, static_cast<OutputValueType>(sum));
2933  }
2934  }
2935  }
2936 #undef MAKEVAL
2937 #undef VAL
2938 
2939 private:
2940  const vtkm::Id filterLen, approxLen, detailLen; // filter and outcome coeff length.
2943 
2946  {
2947  this->xlstart = this->oddlow ? 1 : 0;
2948  this->xhstart = this->oddhigh ? 1 : 0;
2949  }
2950 };
2951 
2952 // Worklet: perform an 1D inverse transform for odd length, symmetric filters.
2954 {
2955 public:
2956  using ControlSignature = void(WholeArrayIn, // Input: coeffs, cA followed by cD
2957  WholeArrayIn, // lowFilter
2958  WholeArrayIn, // highFilter
2959  WholeArrayOut); // output
2960  using ExecutionSignature = void(_1, _2, _3, _4, WorkIndex);
2961  using InputDomain = _1;
2962 
2963  // Constructor
2966  : filterLen(filLen)
2967  //, cALen(ca_len)
2968  , cALen2(ca_len * 2)
2969  , cALenExtended(ext_len)
2970  {
2971  }
2972 
2973 // Use 64-bit float for convolution calculation
2974 #define VAL vtkm::Float64
2975 #define MAKEVAL(a) (static_cast<VAL>(a))
2976  template <typename InputPortalType, typename FilterPortalType, typename OutputPortalType>
2977  VTKM_EXEC void operator()(const InputPortalType& coeffs,
2978  const FilterPortalType& lowFilter,
2979  const FilterPortalType& highFilter,
2980  OutputPortalType& sigOut,
2981  vtkm::Id workIndex) const
2982  {
2983  if (workIndex >= cALen2) // valid calculation region
2984  {
2985  return;
2986  }
2987  vtkm::Id xi1 = (workIndex + 1) / 2; // coeff indices
2988  vtkm::Id xi2 = this->cALenExtended + ((workIndex) / 2); // coeff indices
2989  VAL sum = 0.0;
2990 
2991  const bool odd = workIndex % 2 != 0;
2992  if (odd)
2993  {
2994  vtkm::Id k1 = this->filterLen - 2;
2995  vtkm::Id k2 = this->filterLen - 1;
2996  for (; k1 >= 0; k1 -= 2, k2 -= 2)
2997  {
2998  sum += lowFilter.Get(k1) * MAKEVAL(coeffs.Get(xi1++));
2999  sum += highFilter.Get(k2) * MAKEVAL(coeffs.Get(xi2++));
3000  }
3001  if (k2 >= 0)
3002  {
3003  sum += highFilter.Get(k2) * MAKEVAL(coeffs.Get(xi2++));
3004  }
3005  }
3006  else //even
3007  {
3008  vtkm::Id k1 = this->filterLen - 1;
3009  vtkm::Id k2 = this->filterLen - 2;
3010  for (; k2 >= 0; k1 -= 2, k2 -= 2)
3011  {
3012  sum += lowFilter.Get(k1) * MAKEVAL(coeffs.Get(xi1++));
3013  sum += highFilter.Get(k2) * MAKEVAL(coeffs.Get(xi2++));
3014  }
3015  if (k1 >= 0)
3016  {
3017  sum += lowFilter.Get(k1) * MAKEVAL(coeffs.Get(xi1++));
3018  }
3019  }
3020 
3021  sigOut.Set(workIndex, static_cast<typename OutputPortalType::ValueType>(sum));
3022  }
3023 
3024 #undef MAKEVAL
3025 #undef VAL
3026 
3027 private:
3028  const vtkm::Id filterLen; // filter length.
3029  //const vtkm::Id cALen; // Number of actual cAs (Not used)
3030  const vtkm::Id cALen2; // = cALen * 2
3031  const vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD
3032 };
3033 
3034 // Worklet: perform an 1D inverse transform for even length, symmetric filters.
3036 {
3037 public:
3038  using ControlSignature = void(WholeArrayIn, // Input: coeffs, cA followed by cD
3039  WholeArrayIn, // lowFilter
3040  WholeArrayIn, // highFilter
3041  WholeArrayOut); // output
3042  using ExecutionSignature = void(_1, _2, _3, _4, WorkIndex);
3043  using InputDomain = _1;
3044 
3045  // Constructor
3046  InverseTransformEven(vtkm::Id filtL, vtkm::Id cAL, vtkm::Id cALExt, bool m)
3047  : filterLen(filtL)
3048  //, cALen(cAL)
3049  , cALen2(cAL * 2)
3050  , cALenExtended(cALExt)
3051  , matlab(m)
3052  {
3053  }
3054 
3055 // Use 64-bit float for convolution calculation
3056 #define VAL vtkm::Float64
3057 #define MAKEVAL(a) (static_cast<VAL>(a))
3058  template <typename InputPortalType, typename FilterPortalType, typename OutputPortalType>
3059  VTKM_EXEC void operator()(const InputPortalType& coeffs,
3060  const FilterPortalType& lowFilter,
3061  const FilterPortalType& highFilter,
3062  OutputPortalType& sigOut,
3063  const vtkm::Id& workIndex) const
3064  {
3065  if (workIndex < cALen2) // valid calculation region
3066  {
3067  vtkm::Id xi; // coeff indices
3068  vtkm::Id k; // indices for low and high filter
3069  VAL sum = 0.0;
3070 
3071  if (matlab || (filterLen / 2) % 2 != 0) // odd length half filter
3072  {
3073  xi = workIndex / 2;
3074  if (workIndex % 2 != 0)
3075  {
3076  k = filterLen - 1;
3077  }
3078  else
3079  {
3080  k = filterLen - 2;
3081  }
3082  }
3083  else
3084  {
3085  xi = (workIndex + 1) / 2;
3086  if (workIndex % 2 != 0)
3087  {
3088  k = filterLen - 2;
3089  }
3090  else
3091  {
3092  k = filterLen - 1;
3093  }
3094  }
3095 
3096  while (k > -1) // k >= 0
3097  {
3098  sum += lowFilter.Get(k) * MAKEVAL(coeffs.Get(xi)) + // cA
3099  highFilter.Get(k) * MAKEVAL(coeffs.Get(xi + cALenExtended)); // cD
3100  xi++;
3101  k -= 2;
3102  }
3103 
3104  sigOut.Set(workIndex, static_cast<typename OutputPortalType::ValueType>(sum));
3105  }
3106  }
3107 #undef MAKEVAL
3108 #undef VAL
3109 
3110 private:
3111  const vtkm::Id filterLen; // filter length.
3112  //const vtkm::Id cALen; // Number of actual cAs (not used)
3113  const vtkm::Id cALen2; // = cALen * 2
3114  const vtkm::Id cALenExtended; // Number of cA at the beginning of input, followed by cD
3115  bool matlab; // followed the naming convention from VAPOR
3116  // It's always false for the 1st 4 filters.
3117 };
3118 
3120 {
3121 public:
3122  using ControlSignature = void(FieldInOut); // Thresholding in-place
3123  using ExecutionSignature = void(_1);
3124  using InputDomain = _1;
3125 
3126  // Constructor
3128  : threshold(t)
3129  , // must pass in a positive val
3130  neg_threshold(t * -1.0)
3131  {
3132  }
3133 
3134  template <typename ValueType>
3135  VTKM_EXEC void operator()(ValueType& coeffVal) const
3136  {
3137  if (neg_threshold < coeffVal && coeffVal < threshold)
3138  {
3139  coeffVal = 0.0;
3140  }
3141  }
3142 
3143 private:
3146 };
3147 
3149 {
3150 public:
3152  using ExecutionSignature = _2(_1);
3153  using InputDomain = _1;
3154 
3155  // Constructor
3156  template <typename ValueType>
3158  {
3159  this->mean = static_cast<vtkm::Float64>(t);
3160  }
3161 
3162  template <typename ValueType>
3163  VTKM_EXEC ValueType operator()(const ValueType& num) const
3164  {
3165  vtkm::Float64 num64 = static_cast<vtkm::Float64>(num);
3166  vtkm::Float64 diff = this->mean - num64;
3167  return static_cast<ValueType>(diff * diff);
3168  }
3169 
3170 private:
3172 };
3173 
3175 {
3176 public:
3178  using ExecutionSignature = _3(_1, _2);
3179  using InputDomain = _1;
3180 
3181  template <typename ValueType1, typename ValueType2>
3182  VTKM_EXEC ValueType1 operator()(const ValueType1& v1, const ValueType2& v2) const
3183  {
3184  return v1 - static_cast<ValueType1>(v2);
3185  }
3186 };
3187 
3189 {
3190 public:
3192  using ExecutionSignature = _2(_1);
3193  using InputDomain = _1;
3194 
3195  template <typename ValueType>
3196  VTKM_EXEC ValueType operator()(const ValueType& v) const
3197  {
3198  return (v * v);
3199  }
3200 };
3201 
3203 {
3204 public:
3205  using ControlSignature = void(WholeArrayIn, WholeArrayOut);
3206  using ExecutionSignature = void(_1, _2, WorkIndex);
3207  using InputDomain = _1;
3208 
3209  // Constructor
3211  CopyWorklet(vtkm::Id idx) { this->startIdx = idx; }
3212 
3213  template <typename PortalInType, typename PortalOutType>
3214  VTKM_EXEC void operator()(const PortalInType& portalIn,
3215  PortalOutType& portalOut,
3216  const vtkm::Id& workIndex) const
3217  {
3218  portalOut.Set((startIdx + workIndex), portalIn.Get(workIndex));
3219  }
3220 
3221 private:
3223 };
3224 
3225 // Worklet for 1D signal extension no. 1
3227 {
3228 public:
3229  using ControlSignature = void(WholeArrayOut, // extension part
3230  WholeArrayIn); // signal part
3231  using ExecutionSignature = void(_1, _2, WorkIndex);
3232  using InputDomain = _1;
3233 
3234  // Constructor
3237  : addLen(len)
3238  {
3239  }
3240 
3241  template <typename PortalOutType, typename PortalInType>
3242  VTKM_EXEC void operator()(PortalOutType& portalOut,
3243  const PortalInType& portalIn,
3244  const vtkm::Id& workIndex) const
3245  {
3246  portalOut.Set(workIndex, portalIn.Get(this->addLen - workIndex - 1));
3247  }
3248 
3249 private:
3251 };
3252 
3253 // Worklet for 1D signal extension no. 2
3255 {
3256 public:
3257  using ControlSignature = void(WholeArrayOut, // extension part
3258  WholeArrayIn); // signal part
3259  using ExecutionSignature = void(_1, _2, WorkIndex);
3260  using InputDomain = _1;
3261 
3262  // Constructor
3265  : addLen(len)
3266  {
3267  }
3268 
3269  template <typename PortalOutType, typename PortalInType>
3270  VTKM_EXEC void operator()(PortalOutType& portalOut,
3271  const PortalInType& portalIn,
3272  const vtkm::Id& workIndex) const
3273  {
3274  portalOut.Set(workIndex, portalIn.Get(this->addLen - workIndex));
3275  }
3276 
3277 private:
3279 };
3280 
3281 // Worklet for 1D signal extension no. 3
3283 {
3284 public:
3285  using ControlSignature = void(WholeArrayOut, // extension part
3286  WholeArrayIn); // signal part
3287  using ExecutionSignature = void(_1, _2, WorkIndex);
3288  using InputDomain = _1;
3289 
3290  // Constructor
3293  : addLen(len)
3294  {
3295  }
3296 
3297  template <typename PortalOutType, typename PortalInType>
3298  VTKM_EXEC_CONT void operator()(PortalOutType& portalOut,
3299  const PortalInType& portalIn,
3300  const vtkm::Id& workIndex) const
3301  {
3302  portalOut.Set(workIndex, portalIn.Get(addLen - workIndex - 1) * (-1.0));
3303  }
3304 
3305 private:
3307 };
3308 
3309 // Worklet for 1D signal extension no. 4
3311 {
3312 public:
3313  using ControlSignature = void(WholeArrayOut, // extension part
3314  WholeArrayIn); // signal part
3315  using ExecutionSignature = void(_1, _2, WorkIndex);
3316  using InputDomain = _1;
3317 
3318  // Constructor
3321  : addLen(len)
3322  {
3323  }
3324 
3325  template <typename PortalOutType, typename PortalInType>
3326  VTKM_EXEC_CONT void operator()(PortalOutType& portalOut,
3327  const PortalInType& portalIn,
3328  const vtkm::Id& workIndex) const
3329  {
3330  portalOut.Set(workIndex, portalIn.Get(addLen - workIndex) * (-1.0));
3331  }
3332 
3333 private:
3335 };
3336 
3337 // Worklet for 1D signal extension no. 5
3339 {
3340 public:
3341  using ControlSignature = void(WholeArrayOut, // extension part
3342  WholeArrayIn); // signal part
3343  using ExecutionSignature = void(_1, _2, WorkIndex);
3344  using InputDomain = _1;
3345 
3346  // Constructor
3349  : sigInLen(sigInl)
3350  {
3351  }
3352 
3353  template <typename PortalOutType, typename PortalInType>
3354  VTKM_EXEC void operator()(PortalOutType& portalOut,
3355  const PortalInType& portalIn,
3356  const vtkm::Id& workIndex) const
3357  {
3358  portalOut.Set(workIndex, portalIn.Get(this->sigInLen - workIndex - 1));
3359  }
3360 
3361 private:
3363 };
3364 
3365 // Worklet for 1D signal extension no. 6
3367 {
3368 public:
3369  using ControlSignature = void(WholeArrayOut, // extension part
3370  WholeArrayIn); // signal part
3371  using ExecutionSignature = void(_1, _2, WorkIndex);
3372  using InputDomain = _1;
3373 
3374  // Constructor
3377  : sigInLen(sigInl)
3378  {
3379  }
3380 
3381  template <typename PortalOutType, typename PortalInType>
3382  VTKM_EXEC void operator()(PortalOutType& portalOut,
3383  const PortalInType& portalIn,
3384  const vtkm::Id& workIndex) const
3385  {
3386  portalOut.Set(workIndex, portalIn.Get(this->sigInLen - workIndex - 2));
3387  }
3388 
3389 private:
3391 };
3392 
3393 // Worklet for 1D signal extension no. 7
3395 {
3396 public:
3397  using ControlSignature = void(WholeArrayOut, // extension part
3398  WholeArrayIn); // signal part
3399  using ExecutionSignature = void(_1, _2, WorkIndex);
3400  using InputDomain = _1;
3401 
3402  // Constructor
3405  : sigInLen(sigInl)
3406  {
3407  }
3408 
3409  template <typename PortalOutType, typename PortalInType>
3410  VTKM_EXEC_CONT void operator()(PortalOutType& portalOut,
3411  const PortalInType& portalIn,
3412  const vtkm::Id& workIndex) const
3413  {
3414  portalOut.Set(workIndex, portalIn.Get(sigInLen - workIndex - 1) * (-1.0));
3415  }
3416 
3417 private:
3419 };
3420 
3421 // Worklet for 1D signal extension no. 8
3423 {
3424 public:
3425  using ControlSignature = void(WholeArrayOut, // extension part
3426  WholeArrayIn); // signal part
3427  using ExecutionSignature = void(_1, _2, WorkIndex);
3428  using InputDomain = _1;
3429 
3430  // Constructor
3433  : sigInLen(sigInl)
3434  {
3435  }
3436 
3437  template <typename PortalOutType, typename PortalInType>
3438  VTKM_EXEC_CONT void operator()(PortalOutType& portalOut,
3439  const PortalInType& portalIn,
3440  const vtkm::Id& workIndex) const
3441  {
3442  portalOut.Set(workIndex, portalIn.Get(sigInLen - workIndex - 2) * (-1.0));
3443  }
3444 
3445 private:
3447 };
3448 
3449 // Assign zero to a single index
3451 {
3452 public:
3453  using ControlSignature = void(WholeArrayInOut);
3454  using ExecutionSignature = void(_1, WorkIndex);
3455 
3456  // Constructor
3459  : zeroIdx(idx)
3460  {
3461  }
3462 
3463  template <typename PortalType>
3464  VTKM_EXEC void operator()(PortalType& array, const vtkm::Id& workIdx) const
3465  {
3466  if (workIdx == this->zeroIdx)
3467  {
3468  array.Set(workIdx, static_cast<typename PortalType::ValueType>(0.0));
3469  }
3470  }
3471 
3472 private:
3474 };
3475 
3476 // Assign zero to a row or a column in a 2D array.
3477 // Change row or column is controlled by negative indices.
3479 {
3480 public:
3481  using ControlSignature = void(WholeArrayInOut);
3482  using ExecutionSignature = void(_1, WorkIndex);
3483 
3484  // Constructor
3487  : dimX(x)
3488  , dimY(y)
3489  , zeroX(zero_x)
3490  , zeroY(zero_y)
3491  {
3492  (void)dimY;
3493  }
3494 
3495  // Index translation helper
3497  void GetLogicalDim(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y) const
3498  {
3499  x = idx % dimX;
3500  y = idx / dimX;
3501  }
3502 
3503  template <typename PortalType>
3504  VTKM_EXEC void operator()(PortalType& array, const vtkm::Id& workIdx) const
3505  {
3506  vtkm::Id x, y;
3507  GetLogicalDim(workIdx, x, y);
3508  if (zeroY < 0 && x == zeroX) // assign zero to a column
3509  {
3510  array.Set(workIdx, static_cast<typename PortalType::ValueType>(0.0));
3511  }
3512  else if (zeroX < 0 && y == zeroY) // assign zero to a row
3513  {
3514  array.Set(workIdx, static_cast<typename PortalType::ValueType>(0.0));
3515  }
3516  }
3517 
3518 private:
3520  vtkm::Id zeroX, zeroY; // element at (zeroX, zeroY) will be assigned zero.
3521  // each becomes a wild card if negative
3522 };
3523 
3524 // Assign zero to a plane (2D) in a 3D cube.
3525 // Which plane to assign zero is controlled by negative indices.
3527 {
3528 public:
3529  using ControlSignature = void(WholeArrayInOut);
3530  using ExecutionSignature = void(_1, WorkIndex);
3531 
3532  // Constructor
3535  vtkm::Id y,
3536  vtkm::Id z,
3537  vtkm::Id zero_x,
3538  vtkm::Id zero_y,
3539  vtkm::Id zero_z)
3540  : dimX(x)
3541  , dimY(y)
3542  , dimZ(z)
3543  , zeroX(zero_x)
3544  , zeroY(zero_y)
3545  , zeroZ(zero_z)
3546  {
3547  (void)dimZ;
3548  }
3549 
3550  // Index translation helper
3552  void GetLogicalDim(vtkm::Id idx, vtkm::Id& x, vtkm::Id& y, vtkm::Id& z) const
3553  {
3554  z = idx / (dimX * dimY);
3555  y = (idx - z * dimX * dimY) / dimX;
3556  x = idx % dimX;
3557  }
3558 
3559  template <typename PortalType>
3560  VTKM_EXEC void operator()(PortalType& array, const vtkm::Id& workIdx) const
3561  {
3562  vtkm::Id x, y, z;
3563  GetLogicalDim(workIdx, x, y, z);
3564  if (zeroZ < 0 && zeroY < 0 && x == zeroX) // plane perpendicular to X axis
3565  {
3566  array.Set(workIdx, static_cast<typename PortalType::ValueType>(0.0));
3567  }
3568  else if (zeroZ < 0 && zeroX < 0 && y == zeroY) // plane perpendicular to Y axis
3569  {
3570  array.Set(workIdx, static_cast<typename PortalType::ValueType>(0.0));
3571  }
3572  else if (zeroY < 0 && zeroX < 0 && z == zeroZ) // plane perpendicular to Z axis
3573  {
3574  array.Set(workIdx, static_cast<typename PortalType::ValueType>(0.0));
3575  }
3576  }
3577 
3578 private:
3580  vtkm::Id zeroX, zeroY, zeroZ; // element at (zeroX, zeroY, zeroZ) will be assigned zero.
3581  // each becomes a wild card if negative
3582 };
3583 
3584 // Worklet: Copies a small rectangle to become a part of a big rectangle
3586 {
3587 public:
3588  using ControlSignature = void(FieldIn, // Input, small rectangle
3589  WholeArrayOut); // Output, big rectangle
3590  using ExecutionSignature = void(_1, _2, WorkIndex);
3591 
3592  // Constructor
3595  vtkm::Id iny,
3596  vtkm::Id outx,
3597  vtkm::Id outy,
3598  vtkm::Id xStart,
3599  vtkm::Id yStart)
3600  : inXLen(inx)
3601  , inYLen(iny)
3602  , outXLen(outx)
3603  , outYLen(outy)
3604  , outXStart(xStart)
3605  , outYStart(yStart)
3606  {
3607  (void)outYLen;
3608  (void)inYLen;
3609  }
3610 
3612  void GetLogicalDimOfInputRect(const vtkm::Id& idx, vtkm::Id& x, vtkm::Id& y) const
3613  {
3614  x = idx % inXLen;
3615  y = idx / inXLen;
3616  }
3617 
3619  vtkm::Id Get1DIdxOfOutputRect(vtkm::Id x, vtkm::Id y) const { return y * outXLen + x; }
3620 
3621  template <typename ValueInType, typename PortalOutType>
3622  VTKM_EXEC void operator()(const ValueInType& valueIn,
3623  PortalOutType& arrayOut,
3624  const vtkm::Id& workIdx) const
3625  {
3626  vtkm::Id xOfIn, yOfIn;
3627  GetLogicalDimOfInputRect(workIdx, xOfIn, yOfIn);
3628  vtkm::Id outputIdx = Get1DIdxOfOutputRect(xOfIn + outXStart, yOfIn + outYStart);
3629  arrayOut.Set(outputIdx, valueIn);
3630  }
3631 
3632 private:
3636 };
3637 
3638 // Worklet: Copies a small cube to become a part of a big cube
3640 {
3641 public:
3642  using ControlSignature = void(FieldIn, // Input, small cube
3643  WholeArrayOut); // Output, big cube
3644  using ExecutionSignature = void(_1, _2, WorkIndex);
3645 
3646  // Constructor
3649  vtkm::Id iny,
3650  vtkm::Id inz,
3651  vtkm::Id outx,
3652  vtkm::Id outy,
3653  vtkm::Id outz,
3654  vtkm::Id xStart,
3655  vtkm::Id yStart,
3656  vtkm::Id zStart)
3657  : inDimX(inx)
3658  , inDimY(iny)
3659  , inDimZ(inz)
3660  , outDimX(outx)
3661  , outDimY(outy)
3662  , outDimZ(outz)
3663  , outStartX(xStart)
3664  , outStartY(yStart)
3665  , outStartZ(zStart)
3666  {
3667  (void)outDimZ;
3668  (void)inDimZ;
3669  }
3670 
3673  {
3674  z = idx / (inDimX * inDimY);
3675  y = (idx - z * inDimX * inDimY) / inDimX;
3676  x = idx % inDimX;
3677  }
3678 
3681  {
3682  return z * outDimX * outDimY + y * outDimX + x;
3683  }
3684 
3685  template <typename ValueInType, typename PortalOutType>
3686  VTKM_EXEC void operator()(const ValueInType& valueIn,
3687  PortalOutType& arrayOut,
3688  const vtkm::Id& workIdx) const
3689  {
3690  vtkm::Id inX, inY, inZ;
3691  GetLogicalDimOfInputCube(workIdx, inX, inY, inZ);
3692  vtkm::Id outputIdx = Get1DIdxOfOutputCube(inX + outStartX, inY + outStartY, inZ + outStartZ);
3693  arrayOut.Set(outputIdx, valueIn);
3694  }
3695 
3696 private:
3697  const vtkm::Id inDimX, inDimY, inDimZ; // input small cube
3698  const vtkm::Id outDimX, outDimY, outDimZ; // output big cube
3699  const vtkm::Id outStartX, outStartY, outStartZ; // where to put
3700 };
3701 
3702 } // namespace wavelets
3703 } // namespace worlet
3704 } // namespace vtkm
3705 
3706 #endif // vtk_m_worklet_Wavelets_h
vtkm::worklet::wavelets::SquaredDeviation::ControlSignature
void(FieldIn, FieldOut) ControlSignature
Definition: WaveletTransforms.h:3151
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimY1
const vtkm::Id dimY1
Definition: WaveletTransforms.h:596
vtkm::worklet::wavelets::RightSYMWExtentionWorklet
Definition: WaveletTransforms.h:3366
vtkm::worklet::wavelets::ForwardTransform3DTopDown::translator
const IndexTranslator3CubesTopDown translator
Definition: WaveletTransforms.h:1136
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimZd
const vtkm::Id dimZd
Definition: WaveletTransforms.h:714
vtkm::worklet::wavelets::ForwardTransform2D::ExecutionSignature
void(_1, _2, _3, _4, _5, _6, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:2392
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::dimZ2
const vtkm::Id dimZ2
Definition: WaveletTransforms.h:324
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::startX5
const vtkm::Id startX5
Definition: WaveletTransforms.h:715
vtkm::worklet::wavelets::AssignZero2DWorklet::ControlSignature
void(WholeArrayInOut) ControlSignature
Definition: WaveletTransforms.h:3481
vtkm::worklet::wavelets::IndexTranslator6Matrices::y4
const vtkm::Id y4
Definition: WaveletTransforms.h:2142
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::startY5
const vtkm::Id startY5
Definition: WaveletTransforms.h:715
vtkm::worklet::wavelets::ForwardTransform::SetStartPosition
VTKM_EXEC_CONT void SetStartPosition()
Definition: WaveletTransforms.h:2945
vtkm::worklet::wavelets::InverseTransform3DLeftRight::operator()
VTKM_EXEC void operator()(const InPortalType1 &portal1, const InPortalType2 &portal2, const InPortalType3 &portal3, const InPortalType4 &portal4, const InPortalType5 &portal5, const FilterPortalType &lowFilter, const FilterPortalType &highFilter, OutputValueType &coeffOut, const vtkm::Id &workIdx) const
Definition: WaveletTransforms.h:1435
vtkm::worklet::wavelets::CubeCopyTo::inDimZ
const vtkm::Id inDimZ
Definition: WaveletTransforms.h:3697
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::startZ5
const vtkm::Id startZ5
Definition: WaveletTransforms.h:599
vtkm::worklet::wavelets::IndexTranslator3Matrices::dimY2
const vtkm::Id dimY2
Definition: WaveletTransforms.h:2232
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimY2
const vtkm::Id dimY2
Definition: WaveletTransforms.h:596
vtkm::worklet::wavelets::LeftSYMHExtentionWorklet::operator()
VTKM_EXEC void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3242
vtkm::worklet::wavelets::ForwardTransform3DFrontBack::translator
const IndexTranslator3CubesFrontBack translator
Definition: WaveletTransforms.h:1289
vtkm::worklet::wavelets::ForwardTransform3DLeftRight::ControlSignature
void(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayOut) ControlSignature
Definition: WaveletTransforms.h:842
vtkm::worklet::wavelets::ForwardTransform2D::ControlSignature
void(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayOut) ControlSignature
Definition: WaveletTransforms.h:2391
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::dimY3
const vtkm::Id dimY3
Definition: WaveletTransforms.h:326
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::pretendDimY2
const vtkm::Id pretendDimY2
Definition: WaveletTransforms.h:471
vtkm::worklet::wavelets::InverseTransform2D::GetVal
VTKM_EXEC_CONT VAL GetVal(const InPortalType1 &ext1, const InPortalType2 &ext2, const InPortalType3 &ext3, const InPortalType4 &ext4, const InPortalTypecAcD &cAcD, vtkm::Id inMatrix, vtkm::Id inIdx) const
Definition: WaveletTransforms.h:2651
vtkm::worklet::wavelets::AssignZero3DWorklet::AssignZero3DWorklet
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::worklet::wavelets::IndexTranslator6CubesLeftRight::dimX3
const vtkm::Id dimX3
Definition: WaveletTransforms.h:597
vtkm::worklet::wavelets::ForwardTransform3DLeftRight::approxLen
const vtkm::Id approxLen
Definition: WaveletTransforms.h:979
vtkm::worklet::wavelets::ForwardTransform3DLeftRight::ForwardTransform3DLeftRight
ForwardTransform3DLeftRight(vtkm::Id filter_len, vtkm::Id approx_len, bool odd_low, vtkm::Id dimX1, vtkm::Id dimY1, vtkm::Id dimZ1, vtkm::Id dimX2, vtkm::Id dimY2, vtkm::Id dimZ2, vtkm::Id startX2, vtkm::Id startY2, vtkm::Id startZ2, vtkm::Id pretendX2, vtkm::Id pretendY2, vtkm::Id pretendZ2, vtkm::Id dimX3, vtkm::Id dimY3, vtkm::Id dimZ3)
Definition: WaveletTransforms.h:846
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimXd
const vtkm::Id dimXd
Definition: WaveletTransforms.h:827
vtkm::worklet::wavelets::ForwardTransform3DTopDown::outDimX
const vtkm::Id outDimX
Definition: WaveletTransforms.h:1133
vtkm::worklet::wavelets::CopyWorklet::operator()
VTKM_EXEC void operator()(const PortalInType &portalIn, PortalOutType &portalOut, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3214
vtkm::worklet::wavelets::LeftASYMWExtentionWorklet::ControlSignature
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3314
vtkm::worklet::wavelets::RectangleCopyTo
Definition: WaveletTransforms.h:3585
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::Translate3Dto1D
VTKM_EXEC_CONT void Translate3Dto1D(vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, vtkm::Id &cube, vtkm::Id &idx) const
Definition: WaveletTransforms.h:371
vtkm::worklet::wavelets::InverseTransform3DTopDown
Definition: WaveletTransforms.h:1537
vtkm::worklet::wavelets::ForwardTransform3DFrontBack::hstart
vtkm::Id hstart
Definition: WaveletTransforms.h:1290
vtkm::worklet::wavelets::InverseTransform3DTopDown::ControlSignature
void(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, FieldOut) ControlSignature
Definition: WaveletTransforms.h:1547
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimY4
const vtkm::Id dimY4
Definition: WaveletTransforms.h:597
vtkm::worklet::wavelets::InverseTransformEven::InverseTransformEven
InverseTransformEven(vtkm::Id filtL, vtkm::Id cAL, vtkm::Id cALExt, bool m)
Definition: WaveletTransforms.h:3046
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack
Definition: WaveletTransforms.h:718
vtkm::worklet::wavelets::SquaredDeviation::operator()
VTKM_EXEC ValueType operator()(const ValueType &num) const
Definition: WaveletTransforms.h:3163
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack
Definition: WaveletTransforms.h:403
vtkm::worklet::wavelets::SquareWorklet::ControlSignature
void(FieldIn, FieldOut) ControlSignature
Definition: WaveletTransforms.h:3191
vtkm::worklet::wavelets::ForwardTransform2D::ForwardTransform2D
ForwardTransform2D(vtkm::Id filter_len, vtkm::Id approx_len, bool odd_low, bool mode_lr, vtkm::Id x1, vtkm::Id y1, vtkm::Id x2, vtkm::Id y2, vtkm::Id startx2, vtkm::Id starty2, vtkm::Id pretendx2, vtkm::Id pretendy2, vtkm::Id x3, vtkm::Id y3)
Definition: WaveletTransforms.h:2396
vtkm::worklet::wavelets::ASYMH
@ ASYMH
Definition: WaveletTransforms.h:30
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::dimZ2
const vtkm::Id dimZ2
Definition: WaveletTransforms.h:470
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimZ4
const vtkm::Id dimZ4
Definition: WaveletTransforms.h:597
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimY5
const vtkm::Id dimY5
Definition: WaveletTransforms.h:599
vtkm::worklet::wavelets::CubeCopyTo::operator()
VTKM_EXEC void operator()(const ValueInType &valueIn, PortalOutType &arrayOut, const vtkm::Id &workIdx) const
Definition: WaveletTransforms.h:3686
vtkm::worklet::wavelets::ForwardTransform3DLeftRight::filterLen
const vtkm::Id filterLen
Definition: WaveletTransforms.h:979
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::Translate3Dto1D
VTKM_EXEC_CONT void Translate3Dto1D(vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, vtkm::Id &cube, vtkm::Id &idx) const
Definition: WaveletTransforms.h:779
vtkm::worklet::wavelets::ExtensionWorklet3D::sigPretendDimY
const vtkm::Id sigPretendDimY
Definition: WaveletTransforms.h:236
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::startY2
const vtkm::Id startY2
Definition: WaveletTransforms.h:471
vtkm::worklet::wavelets::CopyWorklet::ControlSignature
void(WholeArrayIn, WholeArrayOut) ControlSignature
Definition: WaveletTransforms.h:3205
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::dimZ1
const vtkm::Id dimZ1
Definition: WaveletTransforms.h:469
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::Translate3Dto1D
VTKM_EXEC_CONT void Translate3Dto1D(vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, vtkm::Id &cube, vtkm::Id &idx) const
Definition: WaveletTransforms.h:443
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::startZ5
const vtkm::Id startZ5
Definition: WaveletTransforms.h:715
VTKM_EXEC
#define VTKM_EXEC
Definition: ExportMacros.h:51
vtkm::worklet::wavelets::RightASYMHExtentionWorklet::ExecutionSignature
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3399
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::worklet::wavelets::ForwardTransform3DTopDown::ExecutionSignature
void(_1, _2, _3, _4, _5, _6, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:996
vtkm::worklet::wavelets::IndexTranslator6Matrices::yd
const vtkm::Id yd
Definition: WaveletTransforms.h:2142
vtkm::worklet::wavelets::LeftASYMWExtentionWorklet::ExecutionSignature
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3315
vtkm::worklet::wavelets::ForwardTransform3DLeftRight::Output1Dto3D
VTKM_EXEC_CONT void Output1Dto3D(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z) const
Definition: WaveletTransforms.h:890
vtkm::worklet::wavelets::InverseTransform3DLeftRight::InverseTransform3DLeftRight
InverseTransform3DLeftRight(vtkm::Id fil_len, vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, vtkm::Id x_5, vtkm::Id y_5, vtkm::Id z_5, vtkm::Id startX5, vtkm::Id startY5, vtkm::Id startZ5)
Definition: WaveletTransforms.h:1321
vtkm::worklet::wavelets::CubeCopyTo
Definition: WaveletTransforms.h:3639
vtkm::worklet::wavelets::ExtensionWorklet3D::mode
const DWTMode mode
Definition: WaveletTransforms.h:237
vtkm::worklet::wavelets::ExtensionWorklet2D::sigPretendDimX
const vtkm::Id sigPretendDimX
Definition: WaveletTransforms.h:2376
vtkm::worklet::wavelets::InverseTransform3DFrontBack::outDimY
vtkm::Id outDimY
Definition: WaveletTransforms.h:1995
vtkm::worklet::wavelets::AssignZeroWorklet::AssignZeroWorklet
VTKM_EXEC_CONT AssignZeroWorklet(vtkm::Id idx)
Definition: WaveletTransforms.h:3458
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::pretendDimY2
const vtkm::Id pretendDimY2
Definition: WaveletTransforms.h:399
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::IndexTranslator3CubesFrontBack
IndexTranslator3CubesFrontBack(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, vtkm::Id startx_2, vtkm::Id starty_2, vtkm::Id startz_2, vtkm::Id pretendx_2, vtkm::Id pretendy_2, vtkm::Id pretendz_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3)
Definition: WaveletTransforms.h:406
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimX4
const vtkm::Id dimX4
Definition: WaveletTransforms.h:597
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::dimX3
const vtkm::Id dimX3
Definition: WaveletTransforms.h:472
vtkm::worklet::wavelets::IndexTranslator3Matrices::startX2
const vtkm::Id startX2
Definition: WaveletTransforms.h:2232
vtkm::worklet::wavelets::RectangleCopyTo::outXStart
vtkm::Id outXStart
Definition: WaveletTransforms.h:3635
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimY1
const vtkm::Id dimY1
Definition: WaveletTransforms.h:825
WorkletMapField.h
vtkm::worklet::wavelets::ExtensionWorklet3D::SigPretend3Dto1D
VTKM_EXEC_CONT vtkm::Id SigPretend3Dto1D(vtkm::Id x, vtkm::Id y, vtkm::Id z) const
Definition: WaveletTransforms.h:108
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimX5
const vtkm::Id dimX5
Definition: WaveletTransforms.h:715
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::dimX3
const vtkm::Id dimX3
Definition: WaveletTransforms.h:326
vtkm::worklet::wavelets::AssignZero2DWorklet::dimX
vtkm::Id dimX
Definition: WaveletTransforms.h:3519
vtkm::worklet::wavelets::ForwardTransform3DFrontBack::outDimX
const vtkm::Id outDimX
Definition: WaveletTransforms.h:1286
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimXa
const vtkm::Id dimXa
Definition: WaveletTransforms.h:598
VTKM_EXEC_CONT
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
vtkm::worklet::wavelets::ForwardTransform::operator()
VTKM_EXEC void operator()(const InputPortalType &signalIn, const FilterPortalType lowFilter, const FilterPortalType highFilter, OutputPortalType &coeffOut, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:2903
vtkm::worklet::wavelets::ThresholdWorklet::threshold
vtkm::Float64 threshold
Definition: WaveletTransforms.h:3144
vtkm::worklet::WorkletMapField::FieldOut
A control signature tag for output fields.
Definition: WorkletMapField.h:60
vtkm::worklet::wavelets::InverseTransform3DLeftRight::translator
const IndexTranslator6CubesLeftRight translator
Definition: WaveletTransforms.h:1534
vtkm::worklet::wavelets::RightASYMHExtentionWorklet::operator()
VTKM_EXEC_CONT void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3410
vtkm::worklet::wavelets::RectangleCopyTo::ExecutionSignature
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3590
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::pretendDimY2
const vtkm::Id pretendDimY2
Definition: WaveletTransforms.h:325
vtkm::worklet::wavelets::LeftSYMHExtentionWorklet::ExecutionSignature
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3231
vtkm::worklet::wavelets::ForwardTransform2D::oddlow
bool oddlow
Definition: WaveletTransforms.h:2543
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimXd
const vtkm::Id dimXd
Definition: WaveletTransforms.h:598
vtkm::worklet::wavelets::CubeCopyTo::outStartY
const vtkm::Id outStartY
Definition: WaveletTransforms.h:3699
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::dimY1
const vtkm::Id dimY1
Definition: WaveletTransforms.h:323
vtkm::worklet::wavelets::IndexTranslator3Matrices::Translate2Dto1D
VTKM_EXEC_CONT void Translate2Dto1D(vtkm::Id inX, vtkm::Id inY, vtkm::Id &mat, vtkm::Id &idx) const
Definition: WaveletTransforms.h:2187
vtkm::worklet::wavelets::ForwardTransform3DFrontBack::GetVal
VTKM_EXEC_CONT VAL GetVal(const InPortalType1 &portal1, const InPortalType2 &portal2, const InPortalType3 &portal3, vtkm::Id inCube, vtkm::Id inIdx) const
Definition: WaveletTransforms.h:1212
vtkm::worklet::wavelets::InverseTransformEven
Definition: WaveletTransforms.h:3035
vtkm::worklet::wavelets::InverseTransformOdd
Definition: WaveletTransforms.h:2953
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::pretendDimZ2
const vtkm::Id pretendDimZ2
Definition: WaveletTransforms.h:325
vtkm::worklet::wavelets::RightSYMHExtentionWorklet::ExecutionSignature
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3343
vtkm::worklet::wavelets::LeftSYMHExtentionWorklet::ControlSignature
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3230
vtkm::worklet::wavelets::ExtensionWorklet2D::operator()
VTKM_EXEC void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:2295
vtkm::worklet::wavelets::AssignZero3DWorklet::zeroX
vtkm::Id zeroX
Definition: WaveletTransforms.h:3580
vtkm::worklet::wavelets::InverseTransform3DLeftRight::cALenExtended
vtkm::Id cALenExtended
Definition: WaveletTransforms.h:1533
vtkm::worklet::wavelets::ForwardTransform::ControlSignature
void(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayOut) ControlSignature
Definition: WaveletTransforms.h:2880
vtkm::worklet::wavelets::ExtensionWorklet3D::Ext1Dto3D
VTKM_EXEC_CONT void Ext1Dto3D(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z) const
Definition: WaveletTransforms.h:92
vtkm::worklet::wavelets::ForwardTransform::filterLen
const vtkm::Id filterLen
Definition: WaveletTransforms.h:2940
vtkm::worklet::wavelets::ExtensionWorklet2D
Definition: WaveletTransforms.h:2239
vtkm::worklet::wavelets::AssignZeroWorklet::operator()
VTKM_EXEC void operator()(PortalType &array, const vtkm::Id &workIdx) const
Definition: WaveletTransforms.h:3464
vtkm::worklet::wavelets::LeftASYMWExtentionWorklet
Definition: WaveletTransforms.h:3310
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimZ5
const vtkm::Id dimZ5
Definition: WaveletTransforms.h:599
vtkm::worklet::wavelets::ForwardTransform2D
Definition: WaveletTransforms.h:2383
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::startY2
const vtkm::Id startY2
Definition: WaveletTransforms.h:325
vtkm::worklet::wavelets::LeftASYMWExtentionWorklet::LeftASYMWExtentionWorklet
VTKM_EXEC_CONT LeftASYMWExtentionWorklet(vtkm::Id len)
Definition: WaveletTransforms.h:3320
vtkm::worklet::wavelets::ExtensionWorklet3D::sigPretendDimZ
const vtkm::Id sigPretendDimZ
Definition: WaveletTransforms.h:236
vtkm::worklet::wavelets::ForwardTransform2D::translator
const IndexTranslator3Matrices translator
Definition: WaveletTransforms.h:2545
vtkm::worklet::wavelets::IndexTranslator6Matrices::x2
const vtkm::Id x2
Definition: WaveletTransforms.h:2142
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimY3
const vtkm::Id dimY3
Definition: WaveletTransforms.h:597
vtkm::worklet::wavelets::ExtensionWorklet2D::ExtensionWorklet2D
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::worklet::wavelets::InverseTransform3DTopDown::operator()
VTKM_EXEC void operator()(const InPortalType1 &portal1, const InPortalType2 &portal2, const InPortalType3 &portal3, const InPortalType4 &portal4, const InPortalType5 &portal5, const FilterPortalType &lowFilter, const FilterPortalType &highFilter, OutputValueType &coeffOut, const vtkm::Id &workIdx) const
Definition: WaveletTransforms.h:1666
vtkm::worklet::wavelets::AssignZero3DWorklet::zeroY
vtkm::Id zeroY
Definition: WaveletTransforms.h:3580
vtkm::worklet::wavelets::InverseTransform3DFrontBack::GetVal
VTKM_EXEC_CONT VAL GetVal(const InPortalType1 &ext1, const InPortalType2 &ext2, const InPortalType3 &ext3, const InPortalType4 &ext4, const InPortalType5 &sig5, vtkm::Id inCube, vtkm::Id inIdx) const
Definition: WaveletTransforms.h:1858
vtkm::worklet::wavelets::ForwardTransform2D::lstart
vtkm::Id lstart
Definition: WaveletTransforms.h:2546
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimX5
const vtkm::Id dimX5
Definition: WaveletTransforms.h:599
vtkm::worklet::wavelets::ForwardTransform3DLeftRight::outDimX
const vtkm::Id outDimX
Definition: WaveletTransforms.h:980
vtkm::worklet::wavelets::AssignZeroWorklet
Definition: WaveletTransforms.h:3450
vtkm::worklet::wavelets::IndexTranslator3Matrices::startY2
const vtkm::Id startY2
Definition: WaveletTransforms.h:2232
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimXd
const vtkm::Id dimXd
Definition: WaveletTransforms.h:714
vtkm::worklet::wavelets::IndexTranslator6Matrices::x1
const vtkm::Id x1
Definition: WaveletTransforms.h:2142
vtkm::worklet::wavelets::Differencer::ExecutionSignature
_3(_1, _2) ExecutionSignature
Definition: WaveletTransforms.h:3178
vtkm::worklet::wavelets::ForwardTransform::oddlow
bool oddlow
Definition: WaveletTransforms.h:2941
vtkm::worklet::wavelets::InverseTransform3DFrontBack
Definition: WaveletTransforms.h:1768
vtkm::worklet::wavelets::ForwardTransform3DFrontBack::operator()
VTKM_EXEC_CONT void operator()(const InPortalType1 &inPortal1, const InPortalType2 &inPortal2, const InPortalType3 &inPortal3, const FilterPortalType &lowFilter, const FilterPortalType &highFilter, OutputPortalType &coeffOut, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:1241
vtkm::worklet::wavelets::RectangleCopyTo::inXLen
vtkm::Id inXLen
Definition: WaveletTransforms.h:3633
vtkm::worklet::wavelets::InverseTransformEven::cALen2
const vtkm::Id cALen2
Definition: WaveletTransforms.h:3113
vtkm::worklet::wavelets::InverseTransform3DTopDown::filterLen
const vtkm::Id filterLen
Definition: WaveletTransforms.h:1760
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::pretendDimX2
const vtkm::Id pretendDimX2
Definition: WaveletTransforms.h:399
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimZ3
const vtkm::Id dimZ3
Definition: WaveletTransforms.h:826
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::dimZ2
const vtkm::Id dimZ2
Definition: WaveletTransforms.h:398
vtkm::worklet::wavelets::AssignZero2DWorklet
Definition: WaveletTransforms.h:3478
vtkm::worklet::wavelets::InverseTransform3DLeftRight::ControlSignature
void(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, FieldOut) ControlSignature
Definition: WaveletTransforms.h:1316
vtkm::worklet::wavelets::AssignZero3DWorklet
Definition: WaveletTransforms.h:3526
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::startZ5
const vtkm::Id startZ5
Definition: WaveletTransforms.h:828
vtkm::worklet::wavelets::ExtensionWorklet2D::sigPretendDimY
const vtkm::Id sigPretendDimY
Definition: WaveletTransforms.h:2376
vtkm::worklet::wavelets::ForwardTransform3DLeftRight::hstart
vtkm::Id hstart
Definition: WaveletTransforms.h:984
vtkm::worklet::wavelets::ForwardTransform2D::operator()
VTKM_EXEC_CONT void operator()(const InPortalType1 &inPortal1, const InPortalType2 &inPortal2, const InPortalType3 &inPortal3, const FilterPortalType &lowFilter, const FilterPortalType &highFilter, OutputPortalType &coeffOut, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:2464
vtkm::worklet::wavelets::AssignZero2DWorklet::ExecutionSignature
void(_1, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3482
vtkm::worklet::wavelets::IndexTranslator3Matrices::dimY1
const vtkm::Id dimY1
Definition: WaveletTransforms.h:2231
vtkm::worklet::wavelets::AssignZero3DWorklet::ControlSignature
void(WholeArrayInOut) ControlSignature
Definition: WaveletTransforms.h:3529
vtkm::worklet::wavelets::IndexTranslator6Matrices::modeLR
const bool modeLR
Definition: WaveletTransforms.h:2144
vtkm::worklet::wavelets::AssignZero2DWorklet::dimY
vtkm::Id dimY
Definition: WaveletTransforms.h:3519
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimYa
const vtkm::Id dimYa
Definition: WaveletTransforms.h:827
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::dimZ3
const vtkm::Id dimZ3
Definition: WaveletTransforms.h:472
vtkm::worklet::wavelets::RightSYMWExtentionWorklet::ExecutionSignature
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3371
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::dimZ3
const vtkm::Id dimZ3
Definition: WaveletTransforms.h:326
vtkm::worklet::wavelets::AssignZero2DWorklet::zeroX
vtkm::Id zeroX
Definition: WaveletTransforms.h:3520
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimX1
const vtkm::Id dimX1
Definition: WaveletTransforms.h:712
vtkm::worklet::wavelets::InverseTransformOdd::ExecutionSignature
void(_1, _2, _3, _4, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:2960
vtkm::worklet::wavelets::InverseTransform3DFrontBack::InverseTransform3DFrontBack
InverseTransform3DFrontBack(vtkm::Id fil_len, vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, vtkm::Id x_5, vtkm::Id y_5, vtkm::Id z_5, vtkm::Id startX5, vtkm::Id startY5, vtkm::Id startZ5)
Definition: WaveletTransforms.h:1783
vtkm::worklet::wavelets::LeftSYMHExtentionWorklet::LeftSYMHExtentionWorklet
VTKM_EXEC_CONT LeftSYMHExtentionWorklet(vtkm::Id len)
Definition: WaveletTransforms.h:3236
vtkm::worklet::wavelets::ForwardTransform3DTopDown::ControlSignature
void(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayOut) ControlSignature
Definition: WaveletTransforms.h:995
vtkm::worklet::wavelets::InverseTransform3DFrontBack::cALenExtended
vtkm::Id cALenExtended
Definition: WaveletTransforms.h:1997
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::startX2
const vtkm::Id startX2
Definition: WaveletTransforms.h:325
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::startZ2
const vtkm::Id startZ2
Definition: WaveletTransforms.h:471
vtkm::worklet::wavelets::IndexTranslator6Matrices
Definition: WaveletTransforms.h:2015
vtkm::worklet::wavelets::ForwardTransform3DFrontBack::lstart
vtkm::Id lstart
Definition: WaveletTransforms.h:1290
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimZ1
const vtkm::Id dimZ1
Definition: WaveletTransforms.h:825
vtkm::worklet::wavelets::RectangleCopyTo::ControlSignature
void(FieldIn, WholeArrayOut) ControlSignature
Definition: WaveletTransforms.h:3589
vtkm::worklet::wavelets::IndexTranslator3Matrices
Definition: WaveletTransforms.h:2157
vtkm::worklet::wavelets::RectangleCopyTo::outXLen
vtkm::Id outXLen
Definition: WaveletTransforms.h:3634
vtkm::worklet::wavelets::AssignZero3DWorklet::dimZ
vtkm::Id dimZ
Definition: WaveletTransforms.h:3579
VAL
#define VAL
Definition: WaveletTransforms.h:3056
vtkm::worklet::wavelets::ExtensionWorklet3D::sigStartY
const vtkm::Id sigStartY
Definition: WaveletTransforms.h:235
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::worklet::wavelets::Differencer
Definition: WaveletTransforms.h:3174
vtkm::worklet::wavelets::InverseTransformEven::ExecutionSignature
void(_1, _2, _3, _4, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3042
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimYd
const vtkm::Id dimYd
Definition: WaveletTransforms.h:827
vtkm::worklet::wavelets::InverseTransform3DLeftRight::ExecutionSignature
void(_1, _2, _3, _4, _5, _6, _7, _8, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:1317
vtkm::worklet::wavelets::AssignZero3DWorklet::dimY
vtkm::Id dimY
Definition: WaveletTransforms.h:3579
vtkm::worklet::wavelets::ForwardTransform3DFrontBack::filterLen
const vtkm::Id filterLen
Definition: WaveletTransforms.h:1285
vtkm::worklet::wavelets::AssignZeroWorklet::ExecutionSignature
void(_1, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3454
DispatcherMapField.h
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimX4
const vtkm::Id dimX4
Definition: WaveletTransforms.h:713
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimX2
const vtkm::Id dimX2
Definition: WaveletTransforms.h:712
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::dimX1
const vtkm::Id dimX1
Definition: WaveletTransforms.h:397
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimX3
const vtkm::Id dimX3
Definition: WaveletTransforms.h:826
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimZ5
const vtkm::Id dimZ5
Definition: WaveletTransforms.h:715
vtkm::worklet::wavelets::CubeCopyTo::GetLogicalDimOfInputCube
VTKM_EXEC_CONT void GetLogicalDimOfInputCube(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z) const
Definition: WaveletTransforms.h:3672
vtkm::worklet::wavelets::RectangleCopyTo::RectangleCopyTo
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::worklet::wavelets::IndexTranslator6CubesFrontBack::dimXa
const vtkm::Id dimXa
Definition: WaveletTransforms.h:827
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimX4
const vtkm::Id dimX4
Definition: WaveletTransforms.h:826
vtkm::worklet::wavelets::ForwardTransform::ForwardTransform
ForwardTransform(vtkm::Id filLen, vtkm::Id approx_len, vtkm::Id detail_len, bool odd_low, bool odd_high)
Definition: WaveletTransforms.h:2885
vtkm::worklet::wavelets::RightSYMHExtentionWorklet::operator()
VTKM_EXEC void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3354
vtkm::worklet::wavelets::AssignZero2DWorklet::GetLogicalDim
VTKM_EXEC_CONT void GetLogicalDim(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y) const
Definition: WaveletTransforms.h:3497
vtkm::worklet::wavelets::InverseTransform3DTopDown::GetVal
VTKM_EXEC_CONT VAL GetVal(const InPortalType1 &ext1, const InPortalType2 &ext2, const InPortalType3 &ext3, const InPortalType4 &ext4, const InPortalType5 &sig5, vtkm::Id inCube, vtkm::Id inIdx) const
Definition: WaveletTransforms.h:1625
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimZ1
const vtkm::Id dimZ1
Definition: WaveletTransforms.h:712
vtkm::worklet::wavelets::IndexTranslator6Matrices::startX5
vtkm::Id startX5
Definition: WaveletTransforms.h:2143
vtkm::worklet::wavelets::ForwardTransform::xlstart
vtkm::Id xlstart
Definition: WaveletTransforms.h:2942
vtkm::worklet::wavelets::LeftSYMWExtentionWorklet::addLen
vtkm::Id addLen
Definition: WaveletTransforms.h:3278
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::Translate3Dto1D
VTKM_EXEC_CONT void Translate3Dto1D(vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, vtkm::Id &cube, vtkm::Id &idx) const
Definition: WaveletTransforms.h:666
vtkm::worklet::wavelets::IndexTranslator6Matrices::IndexTranslator6Matrices
IndexTranslator6Matrices(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id x_a, vtkm::Id y_a, vtkm::Id x_2, vtkm::Id y_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id x_d, vtkm::Id y_d, vtkm::Id x_4, vtkm::Id y_4, vtkm::Id x_5, vtkm::Id y_5, vtkm::Id start_x5, vtkm::Id start_y5, bool mode)
Definition: WaveletTransforms.h:2018
vtkm::worklet::wavelets::ExtensionWorklet3D::padZero
const bool padZero
Definition: WaveletTransforms.h:239
vtkm::worklet::wavelets::AssignZero3DWorklet::operator()
VTKM_EXEC void operator()(PortalType &array, const vtkm::Id &workIdx) const
Definition: WaveletTransforms.h:3560
vtkm::worklet::wavelets::ExtensionWorklet3D::operator()
VTKM_EXEC void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:114
vtkm::worklet::wavelets::ForwardTransform2D::SetStartPosition
VTKM_EXEC_CONT void SetStartPosition()
Definition: WaveletTransforms.h:2549
vtkm::worklet::wavelets::ForwardTransform3DTopDown::GetVal
VTKM_EXEC_CONT VAL GetVal(const InPortalType1 &portal1, const InPortalType2 &portal2, const InPortalType3 &portal3, vtkm::Id inCube, vtkm::Id inIdx) const
Definition: WaveletTransforms.h:1059
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight
Definition: WaveletTransforms.h:486
vtkm::worklet::wavelets::LEFT
@ LEFT
Definition: WaveletTransforms.h:36
vtkm::worklet::wavelets::InverseTransform3DLeftRight
Definition: WaveletTransforms.h:1306
vtkm::worklet::wavelets::ForwardTransform3DLeftRight::translator
const IndexTranslator3CubesLeftRight translator
Definition: WaveletTransforms.h:983
vtkm::worklet::wavelets::RectangleCopyTo::Get1DIdxOfOutputRect
VTKM_EXEC_CONT vtkm::Id Get1DIdxOfOutputRect(vtkm::Id x, vtkm::Id y) const
Definition: WaveletTransforms.h:3619
vtkm::worklet::wavelets::RightSYMHExtentionWorklet::sigInLen
vtkm::Id sigInLen
Definition: WaveletTransforms.h:3362
vtkm::worklet::wavelets::CubeCopyTo::inDimX
const vtkm::Id inDimX
Definition: WaveletTransforms.h:3697
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::dimY3
const vtkm::Id dimY3
Definition: WaveletTransforms.h:400
vtkm::worklet::wavelets::InverseTransformEven::matlab
bool matlab
Definition: WaveletTransforms.h:3115
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight
Definition: WaveletTransforms.h:255
vtkm::worklet::wavelets::IndexTranslator3Matrices::mode_lr
const bool mode_lr
Definition: WaveletTransforms.h:2234
vtkm::worklet::wavelets::LeftSYMHExtentionWorklet::addLen
vtkm::Id addLen
Definition: WaveletTransforms.h:3250
vtkm::worklet::wavelets::IndexTranslator6Matrices::startY5
vtkm::Id startY5
Definition: WaveletTransforms.h:2143
vtkm::worklet::wavelets::InverseTransform2D::cALenExtended
vtkm::Id cALenExtended
Definition: WaveletTransforms.h:2868
vtkm::worklet::wavelets::AssignZero3DWorklet::zeroZ
vtkm::Id zeroZ
Definition: WaveletTransforms.h:3580
vtkm::worklet::wavelets::ForwardTransform3DLeftRight::outDimY
const vtkm::Id outDimY
Definition: WaveletTransforms.h:981
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::startZ2
const vtkm::Id startZ2
Definition: WaveletTransforms.h:325
vtkm::worklet::wavelets::ExtensionWorklet3D::ExtensionWorklet3D
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
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimYd
const vtkm::Id dimYd
Definition: WaveletTransforms.h:714
vtkm::worklet::wavelets::LeftASYMHExtentionWorklet::ExecutionSignature
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3287
vtkm::worklet::wavelets::IndexTranslator3Matrices::pretendDimY2
const vtkm::Id pretendDimY2
Definition: WaveletTransforms.h:2232
vtkm::worklet::wavelets::ExtensionWorklet3D::extDimZ
const vtkm::Id extDimZ
Definition: WaveletTransforms.h:234
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimZ3
const vtkm::Id dimZ3
Definition: WaveletTransforms.h:713
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimY4
const vtkm::Id dimY4
Definition: WaveletTransforms.h:713
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::startY5
const vtkm::Id startY5
Definition: WaveletTransforms.h:599
vtkm::worklet::wavelets::AssignZero2DWorklet::AssignZero2DWorklet
VTKM_EXEC_CONT AssignZero2DWorklet(vtkm::Id x, vtkm::Id y, vtkm::Id zero_x, vtkm::Id zero_y)
Definition: WaveletTransforms.h:3486
vtkm::worklet::wavelets::AssignZero3DWorklet::ExecutionSignature
void(_1, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3530
vtkm::worklet::wavelets::IndexTranslator6Matrices::pretendY5
vtkm::Id pretendY5
Definition: WaveletTransforms.h:2143
vtkm::worklet::wavelets::InverseTransform3DLeftRight::GetVal
VTKM_EXEC_CONT VAL GetVal(const InPortalType1 &ext1, const InPortalType2 &ext2, const InPortalType3 &ext3, const InPortalType4 &ext4, const InPortalType5 &sig5, vtkm::Id inCube, vtkm::Id inIdx) const
Definition: WaveletTransforms.h:1394
vtkm::worklet::wavelets::CubeCopyTo::CubeCopyTo
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
vtkm::worklet::wavelets::ThresholdWorklet::ControlSignature
void(FieldInOut) ControlSignature
Definition: WaveletTransforms.h:3122
vtkm::worklet::wavelets::LeftASYMHExtentionWorklet::ControlSignature
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3286
vtkm::worklet::wavelets::BACK
@ BACK
Definition: WaveletTransforms.h:41
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::Translate3Dto1D
VTKM_EXEC_CONT void Translate3Dto1D(vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, vtkm::Id &cube, vtkm::Id &idx) const
Definition: WaveletTransforms.h:297
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimX2
const vtkm::Id dimX2
Definition: WaveletTransforms.h:825
vtkm::worklet::wavelets::ExtensionWorklet2D::Sig2Dto1D
VTKM_EXEC_CONT vtkm::Id Sig2Dto1D(vtkm::Id x, vtkm::Id y) const
Definition: WaveletTransforms.h:2285
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown
Definition: WaveletTransforms.h:329
vtkm::worklet::wavelets::InverseTransformOdd::filterLen
const vtkm::Id filterLen
Definition: WaveletTransforms.h:3028
vtkm::worklet::wavelets::AssignZero3DWorklet::dimX
vtkm::Id dimX
Definition: WaveletTransforms.h:3579
Math.h
vtkm::worklet::wavelets::SquaredDeviation::SquaredDeviation
VTKM_EXEC_CONT SquaredDeviation(ValueType t)
Definition: WaveletTransforms.h:3157
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::IndexTranslator3CubesTopDown
IndexTranslator3CubesTopDown(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, vtkm::Id startx_2, vtkm::Id starty_2, vtkm::Id startz_2, vtkm::Id pretendx_2, vtkm::Id pretendy_2, vtkm::Id pretendz_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3)
Definition: WaveletTransforms.h:332
vtkm::worklet::wavelets::AssignZero2DWorklet::operator()
VTKM_EXEC void operator()(PortalType &array, const vtkm::Id &workIdx) const
Definition: WaveletTransforms.h:3504
vtkm::worklet::wavelets::CopyWorklet::startIdx
vtkm::Id startIdx
Definition: WaveletTransforms.h:3222
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::dimZ1
const vtkm::Id dimZ1
Definition: WaveletTransforms.h:397
vtkm::worklet::wavelets::ExtensionWorklet3D::sigDimX
const vtkm::Id sigDimX
Definition: WaveletTransforms.h:234
vtkm::worklet::wavelets::ASYMW
@ ASYMW
Definition: WaveletTransforms.h:31
vtkm::worklet::wavelets::ExtensionWorklet3D::direction
const ExtensionDirection direction
Definition: WaveletTransforms.h:238
vtkm::worklet::wavelets::LeftSYMWExtentionWorklet::operator()
VTKM_EXEC void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3270
vtkm::worklet::WorkletMapField::FieldIn
A control signature tag for input fields.
Definition: WorkletMapField.h:49
vtkm::worklet::wavelets::ExtensionWorklet2D::SigPretend2Dto1D
VTKM_EXEC_CONT vtkm::Id SigPretend2Dto1D(vtkm::Id x, vtkm::Id y) const
Definition: WaveletTransforms.h:2289
vtkm::worklet::wavelets::ForwardTransform::ExecutionSignature
void(_1, _2, _3, _4, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:2881
vtkm::worklet::wavelets::CubeCopyTo::ControlSignature
void(FieldIn, WholeArrayOut) ControlSignature
Definition: WaveletTransforms.h:3643
vtkm::worklet::wavelets::ForwardTransform::approxLen
const vtkm::Id approxLen
Definition: WaveletTransforms.h:2940
vtkm::worklet::wavelets::ForwardTransform3DLeftRight
Definition: WaveletTransforms.h:834
vtkm::worklet::wavelets::IndexTranslator3Matrices::dimX3
const vtkm::Id dimX3
Definition: WaveletTransforms.h:2233
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimZ2
const vtkm::Id dimZ2
Definition: WaveletTransforms.h:596
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimY5
const vtkm::Id dimY5
Definition: WaveletTransforms.h:715
vtkm::worklet::wavelets::ForwardTransform3DTopDown
Definition: WaveletTransforms.h:987
vtkm::worklet::wavelets::SquareWorklet
Definition: WaveletTransforms.h:3188
vtkm::worklet::wavelets::IndexTranslator6Matrices::y3
const vtkm::Id y3
Definition: WaveletTransforms.h:2142
vtkm::worklet::wavelets::ForwardTransform3DTopDown::hstart
vtkm::Id hstart
Definition: WaveletTransforms.h:1137
vtkm::worklet::wavelets::Differencer::operator()
VTKM_EXEC ValueType1 operator()(const ValueType1 &v1, const ValueType2 &v2) const
Definition: WaveletTransforms.h:3182
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::IndexTranslator6CubesTopDown
IndexTranslator6CubesTopDown(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, vtkm::Id x_5, vtkm::Id y_5, vtkm::Id z_5, vtkm::Id start_x5, vtkm::Id start_y5, vtkm::Id start_z5)
Definition: WaveletTransforms.h:605
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::IndexTranslator6CubesFrontBack
VTKM_EXEC_CONT IndexTranslator6CubesFrontBack(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, vtkm::Id x_5, vtkm::Id y_5, vtkm::Id z_5, vtkm::Id start_x5, vtkm::Id start_y5, vtkm::Id start_z5)
Definition: WaveletTransforms.h:722
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimYa
const vtkm::Id dimYa
Definition: WaveletTransforms.h:598
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimX5
const vtkm::Id dimX5
Definition: WaveletTransforms.h:828
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::dimZ1
const vtkm::Id dimZ1
Definition: WaveletTransforms.h:323
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimXa
const vtkm::Id dimXa
Definition: WaveletTransforms.h:714
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::dimY2
const vtkm::Id dimY2
Definition: WaveletTransforms.h:470
vtkm::worklet::wavelets::SYMH
@ SYMH
Definition: WaveletTransforms.h:28
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimY5
const vtkm::Id dimY5
Definition: WaveletTransforms.h:828
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimYa
const vtkm::Id dimYa
Definition: WaveletTransforms.h:714
vtkm::worklet::wavelets::ForwardTransform3DFrontBack::Output3Dto1D
VTKM_EXEC_CONT vtkm::Id Output3Dto1D(vtkm::Id x, vtkm::Id y, vtkm::Id z) const
Definition: WaveletTransforms.h:1203
vtkm::worklet::wavelets::SYMW
@ SYMW
Definition: WaveletTransforms.h:29
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::startX2
const vtkm::Id startX2
Definition: WaveletTransforms.h:471
vtkm::worklet::wavelets::ForwardTransform3DTopDown::approxLen
const vtkm::Id approxLen
Definition: WaveletTransforms.h:1132
vtkm::worklet::wavelets::ForwardTransform2D::filterLen
const vtkm::Id filterLen
Definition: WaveletTransforms.h:2540
vtkm::worklet::wavelets::SquareWorklet::operator()
VTKM_EXEC ValueType operator()(const ValueType &v) const
Definition: WaveletTransforms.h:3196
vtkm::worklet::wavelets::ExtensionWorklet2D::direction
const ExtensionDirection direction
Definition: WaveletTransforms.h:2378
vtkm::worklet::wavelets::InverseTransform3DLeftRight::outDimX
vtkm::Id outDimX
Definition: WaveletTransforms.h:1530
vtkm::worklet::wavelets::LeftSYMWExtentionWorklet::ControlSignature
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3258
vtkm::worklet::wavelets::ForwardTransform3DFrontBack
Definition: WaveletTransforms.h:1140
vtkm::worklet::wavelets::ForwardTransform3DFrontBack::Output1Dto3D
VTKM_EXEC_CONT void Output1Dto3D(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z) const
Definition: WaveletTransforms.h:1196
vtkm::worklet::wavelets::ForwardTransform2D::GetVal
VTKM_EXEC_CONT VAL GetVal(const InPortalType1 &portal1, const InPortalType2 &portal2, const InPortalType3 &portal3, vtkm::Id inMatrix, vtkm::Id inIdx) const
Definition: WaveletTransforms.h:2435
vtkm::worklet::wavelets::InverseTransformOdd::InverseTransformOdd
VTKM_EXEC_CONT InverseTransformOdd(vtkm::Id filLen, vtkm::Id ca_len, vtkm::Id ext_len)
Definition: WaveletTransforms.h:2965
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::dimY2
const vtkm::Id dimY2
Definition: WaveletTransforms.h:398
vtkm::worklet::wavelets::ForwardTransform3DTopDown::outDimY
const vtkm::Id outDimY
Definition: WaveletTransforms.h:1134
vtkm::worklet::wavelets::RightSYMHExtentionWorklet::RightSYMHExtentionWorklet
VTKM_EXEC_CONT RightSYMHExtentionWorklet(vtkm::Id sigInl)
Definition: WaveletTransforms.h:3348
vtkm::worklet::wavelets::Differencer::ControlSignature
void(FieldIn, FieldIn, FieldOut) ControlSignature
Definition: WaveletTransforms.h:3177
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::IndexTranslator3CubesLeftRight
IndexTranslator3CubesLeftRight(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, vtkm::Id startx_2, vtkm::Id starty_2, vtkm::Id startz_2, vtkm::Id pretendx_2, vtkm::Id pretendy_2, vtkm::Id pretendz_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3)
Definition: WaveletTransforms.h:258
vtkm::worklet::wavelets::RightASYMWExtentionWorklet::operator()
VTKM_EXEC_CONT void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3438
vtkm::worklet::wavelets::CopyWorklet::CopyWorklet
VTKM_EXEC_CONT CopyWorklet(vtkm::Id idx)
Definition: WaveletTransforms.h:3211
vtkm::worklet::wavelets::InverseTransform2D::ControlSignature
void(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, FieldOut) ControlSignature
Definition: WaveletTransforms.h:2579
vtkm::worklet::wavelets::ForwardTransform::xhstart
vtkm::Id xhstart
Definition: WaveletTransforms.h:2942
vtkm::worklet::wavelets::InverseTransform2D::filterLen
const vtkm::Id filterLen
Definition: WaveletTransforms.h:2866
vtkm::worklet::wavelets::ThresholdWorklet::ExecutionSignature
void(_1) ExecutionSignature
Definition: WaveletTransforms.h:3123
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimZ4
const vtkm::Id dimZ4
Definition: WaveletTransforms.h:826
vtkm::worklet::wavelets::ExtensionWorklet3D::Sig3Dto1D
VTKM_EXEC_CONT vtkm::Id Sig3Dto1D(vtkm::Id x, vtkm::Id y, vtkm::Id z) const
Definition: WaveletTransforms.h:101
vtkm::worklet::wavelets::IndexTranslator6Matrices::xa
const vtkm::Id xa
Definition: WaveletTransforms.h:2142
vtkm::worklet::wavelets::IndexTranslator6Matrices::y1
const vtkm::Id y1
Definition: WaveletTransforms.h:2142
vtkm::worklet::wavelets::ForwardTransform3DLeftRight::operator()
VTKM_EXEC_CONT void operator()(const InPortalType1 &inPortal1, const InPortalType2 &inPortal2, const InPortalType3 &inPortal3, const FilterPortalType &lowFilter, const FilterPortalType &highFilter, OutputPortalType &coeffOut, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:935
vtkm::worklet::wavelets::FRONT
@ FRONT
Definition: WaveletTransforms.h:40
vtkm::worklet::wavelets::ExtensionWorklet3D::extDimY
const vtkm::Id extDimY
Definition: WaveletTransforms.h:234
vtkm::worklet::wavelets::ForwardTransform::detailLen
const vtkm::Id detailLen
Definition: WaveletTransforms.h:2940
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::startY5
const vtkm::Id startY5
Definition: WaveletTransforms.h:828
vtkm::worklet::WorkletMapField::FieldInOut
A control signature tag for input-output (in-place) fields.
Definition: WorkletMapField.h:71
vtkm::worklet::wavelets::IndexTranslator3Matrices::pretendDimX2
const vtkm::Id pretendDimX2
Definition: WaveletTransforms.h:2232
vtkm::worklet::wavelets::ExtensionWorklet2D::ExecutionSignature
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:2244
vtkm::worklet::wavelets::InverseTransformOdd::operator()
VTKM_EXEC void operator()(const InputPortalType &coeffs, const FilterPortalType &lowFilter, const FilterPortalType &highFilter, OutputPortalType &sigOut, vtkm::Id workIndex) const
Definition: WaveletTransforms.h:2977
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimX2
const vtkm::Id dimX2
Definition: WaveletTransforms.h:596
vtkm::worklet::wavelets::DWTMode
DWTMode
Definition: WaveletTransforms.h:26
vtkm::worklet::wavelets::ExtensionWorklet3D::ExecutionSignature
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:51
vtkm::worklet::wavelets::LeftSYMHExtentionWorklet
Definition: WaveletTransforms.h:3226
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimX1
const vtkm::Id dimX1
Definition: WaveletTransforms.h:596
vtkm::worklet::wavelets::IndexTranslator6Matrices::x5
vtkm::Id x5
Definition: WaveletTransforms.h:2143
vtkm::worklet::wavelets::RightSYMHExtentionWorklet::ControlSignature
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3342
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::dimX2
const vtkm::Id dimX2
Definition: WaveletTransforms.h:398
vtkm::worklet::wavelets::ExtensionWorklet2D::mode
const DWTMode mode
Definition: WaveletTransforms.h:2377
vtkm::worklet::wavelets::RightSYMWExtentionWorklet::sigInLen
vtkm::Id sigInLen
Definition: WaveletTransforms.h:3390
vtkm::worklet::wavelets::InverseTransform2D::ExecutionSignature
void(_1, _2, _3, _4, _5, _6, _7, _8, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:2580
vtkm::worklet::wavelets::IndexTranslator6Matrices::pretendX5
vtkm::Id pretendX5
Definition: WaveletTransforms.h:2143
vtkm::worklet::wavelets::InverseTransformEven::ControlSignature
void(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayOut) ControlSignature
Definition: WaveletTransforms.h:3041
vtkm::worklet::wavelets::IndexTranslator3Matrices::dimX1
const vtkm::Id dimX1
Definition: WaveletTransforms.h:2231
vtkm::worklet::wavelets::ForwardTransform2D::modeLR
bool modeLR
Definition: WaveletTransforms.h:2544
vtkm::worklet::wavelets::RightASYMWExtentionWorklet::ControlSignature
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3426
vtkm::worklet::wavelets::RightASYMWExtentionWorklet::RightASYMWExtentionWorklet
VTKM_EXEC_CONT RightASYMWExtentionWorklet(vtkm::Id sigInl)
Definition: WaveletTransforms.h:3432
vtkm::worklet::wavelets::RightASYMHExtentionWorklet
Definition: WaveletTransforms.h:3394
vtkm::worklet::wavelets::ForwardTransform3DFrontBack::ControlSignature
void(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayOut) ControlSignature
Definition: WaveletTransforms.h:1148
vtkm::worklet::wavelets::LeftSYMWExtentionWorklet
Definition: WaveletTransforms.h:3254
MAKEVAL
#define MAKEVAL(a)
Definition: WaveletTransforms.h:3057
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::dimZ3
const vtkm::Id dimZ3
Definition: WaveletTransforms.h:400
vtkm::worklet::wavelets::InverseTransform3DTopDown::cALenExtended
vtkm::Id cALenExtended
Definition: WaveletTransforms.h:1764
vtkm::worklet::wavelets::InverseTransform2D::InverseTransform2D
InverseTransform2D(vtkm::Id fil_len, vtkm::Id x_1, vtkm::Id y_1, vtkm::Id x_a, vtkm::Id y_a, vtkm::Id x_2, vtkm::Id y_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id x_d, vtkm::Id y_d, vtkm::Id x_4, vtkm::Id y_4, vtkm::Id x_5, vtkm::Id y_5, vtkm::Id startX5, vtkm::Id startY5, bool mode_lr)
Definition: WaveletTransforms.h:2584
vtkm::worklet::wavelets::LeftSYMWExtentionWorklet::LeftSYMWExtentionWorklet
VTKM_EXEC_CONT LeftSYMWExtentionWorklet(vtkm::Id len)
Definition: WaveletTransforms.h:3264
vtkm::worklet::wavelets::ExtensionWorklet2D::extDimX
const vtkm::Id extDimX
Definition: WaveletTransforms.h:2375
vtkm::worklet::wavelets::IndexTranslator3Matrices::dimX2
const vtkm::Id dimX2
Definition: WaveletTransforms.h:2232
vtkm::worklet::wavelets::ThresholdWorklet
Definition: WaveletTransforms.h:3119
vtkm::worklet::wavelets::RectangleCopyTo::GetLogicalDimOfInputRect
VTKM_EXEC_CONT void GetLogicalDimOfInputRect(const vtkm::Id &idx, vtkm::Id &x, vtkm::Id &y) const
Definition: WaveletTransforms.h:3612
vtkm::worklet::wavelets::ForwardTransform3DLeftRight::ExecutionSignature
void(_1, _2, _3, _4, _5, _6, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:843
vtkm::worklet::wavelets::ThresholdWorklet::neg_threshold
vtkm::Float64 neg_threshold
Definition: WaveletTransforms.h:3145
vtkm::worklet::wavelets::AssignZero2DWorklet::zeroY
vtkm::Id zeroY
Definition: WaveletTransforms.h:3520
vtkm::worklet::wavelets::InverseTransform3DLeftRight::outDimY
vtkm::Id outDimY
Definition: WaveletTransforms.h:1531
vtkm::worklet::wavelets::LeftASYMWExtentionWorklet::operator()
VTKM_EXEC_CONT void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3326
vtkm::worklet::wavelets::IndexTranslator6Matrices::x4
const vtkm::Id x4
Definition: WaveletTransforms.h:2142
vtkm::worklet::wavelets::ForwardTransform2D::Output2Dto1D
VTKM_EXEC_CONT vtkm::Id Output2Dto1D(vtkm::Id x, vtkm::Id y) const
Definition: WaveletTransforms.h:2429
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::dimX1
const vtkm::Id dimX1
Definition: WaveletTransforms.h:323
vtkm::worklet::wavelets::IndexTranslator6Matrices::y2
const vtkm::Id y2
Definition: WaveletTransforms.h:2142
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimY2
const vtkm::Id dimY2
Definition: WaveletTransforms.h:712
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::dimY2
const vtkm::Id dimY2
Definition: WaveletTransforms.h:324
vtkm::worklet::wavelets::RightSYMHExtentionWorklet
Definition: WaveletTransforms.h:3338
vtkm::worklet::wavelets::InverseTransform3DFrontBack::outDimX
vtkm::Id outDimX
Definition: WaveletTransforms.h:1994
vtkm::worklet::wavelets::CubeCopyTo::inDimY
const vtkm::Id inDimY
Definition: WaveletTransforms.h:3697
vtkm::worklet::wavelets::LeftASYMHExtentionWorklet::addLen
vtkm::Id addLen
Definition: WaveletTransforms.h:3306
vtkm::worklet::wavelets::CubeCopyTo::outDimY
const vtkm::Id outDimY
Definition: WaveletTransforms.h:3698
vtkm::worklet::wavelets::ThresholdWorklet::ThresholdWorklet
ThresholdWorklet(vtkm::Float64 t)
Definition: WaveletTransforms.h:3127
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimZ3
const vtkm::Id dimZ3
Definition: WaveletTransforms.h:597
vtkm::worklet::wavelets::ForwardTransform3DFrontBack::approxLen
const vtkm::Id approxLen
Definition: WaveletTransforms.h:1285
vtkm::worklet::wavelets::InverseTransformOdd::ControlSignature
void(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayOut) ControlSignature
Definition: WaveletTransforms.h:2959
vtkm::worklet::wavelets::InverseTransformEven::cALenExtended
const vtkm::Id cALenExtended
Definition: WaveletTransforms.h:3114
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimZa
const vtkm::Id dimZa
Definition: WaveletTransforms.h:827
vtkm::worklet::wavelets::InverseTransform2D::modeLR
const bool modeLR
Definition: WaveletTransforms.h:2870
vtkm::worklet::wavelets::RIGHT
@ RIGHT
Definition: WaveletTransforms.h:37
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::dimX1
const vtkm::Id dimX1
Definition: WaveletTransforms.h:469
vtkm::worklet::wavelets::RectangleCopyTo::outYLen
vtkm::Id outYLen
Definition: WaveletTransforms.h:3634
vtkm::worklet::wavelets::ForwardTransform
Definition: WaveletTransforms.h:2874
vtkm::worklet::wavelets::AssignZero3DWorklet::GetLogicalDim
VTKM_EXEC_CONT void GetLogicalDim(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z) const
Definition: WaveletTransforms.h:3552
vtkm::worklet::wavelets::InverseTransform2D::outputDimX
vtkm::Id outputDimX
Definition: WaveletTransforms.h:2867
vtkm::worklet::wavelets::BOTTOM
@ BOTTOM
Definition: WaveletTransforms.h:39
vtkm::worklet::wavelets::InverseTransform2D::Output1Dto2D
VTKM_EXEC_CONT void Output1Dto2D(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y) const
Definition: WaveletTransforms.h:2637
vtkm::worklet::wavelets::ExtensionWorklet3D::sigDimY
const vtkm::Id sigDimY
Definition: WaveletTransforms.h:234
vtkm::worklet::wavelets::RectangleCopyTo::inYLen
vtkm::Id inYLen
Definition: WaveletTransforms.h:3633
vtkm::worklet::wavelets::ForwardTransform3DFrontBack::ExecutionSignature
void(_1, _2, _3, _4, _5, _6, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:1149
vtkm::worklet::wavelets::IndexTranslator3Matrices::dimY3
const vtkm::Id dimY3
Definition: WaveletTransforms.h:2233
vtkm::worklet::wavelets::AssignZeroWorklet::ControlSignature
void(WholeArrayInOut) ControlSignature
Definition: WaveletTransforms.h:3453
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimZ4
const vtkm::Id dimZ4
Definition: WaveletTransforms.h:713
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimX1
const vtkm::Id dimX1
Definition: WaveletTransforms.h:825
vtkm::worklet::wavelets::CubeCopyTo::outDimZ
const vtkm::Id outDimZ
Definition: WaveletTransforms.h:3698
vtkm::worklet::wavelets::InverseTransformOdd::cALenExtended
const vtkm::Id cALenExtended
Definition: WaveletTransforms.h:3031
vtkm::worklet::wavelets::ExtensionWorklet3D
Definition: WaveletTransforms.h:46
vtkm::worklet::wavelets::ExtensionWorklet2D::sigStartY
const vtkm::Id sigStartY
Definition: WaveletTransforms.h:2376
vtkm::worklet::wavelets::ExtensionWorklet2D::ControlSignature
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:2243
vtkm::worklet::wavelets::ForwardTransform3DTopDown::ForwardTransform3DTopDown
ForwardTransform3DTopDown(vtkm::Id filter_len, vtkm::Id approx_len, bool odd_low, vtkm::Id dimX1, vtkm::Id dimY1, vtkm::Id dimZ1, vtkm::Id dimX2, vtkm::Id dimY2, vtkm::Id dimZ2, vtkm::Id startX2, vtkm::Id startY2, vtkm::Id startZ2, vtkm::Id pretendX2, vtkm::Id pretendY2, vtkm::Id pretendZ2, vtkm::Id dimX3, vtkm::Id dimY3, vtkm::Id dimZ3)
Definition: WaveletTransforms.h:999
vtkm::worklet::wavelets::IndexTranslator3Matrices::IndexTranslator3Matrices
IndexTranslator3Matrices(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id x_2, vtkm::Id y_2, vtkm::Id startx_2, vtkm::Id starty_2, vtkm::Id pretendx_2, vtkm::Id pretendy_2, vtkm::Id x_3, vtkm::Id y_3, bool mode)
Definition: WaveletTransforms.h:2160
vtkm::worklet::wavelets::CopyWorklet::ExecutionSignature
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3206
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::startX5
const vtkm::Id startX5
Definition: WaveletTransforms.h:599
vtkm::worklet::wavelets::ForwardTransform2D::approxLen
const vtkm::Id approxLen
Definition: WaveletTransforms.h:2540
vtkm::worklet::wavelets::SquaredDeviation::ExecutionSignature
_2(_1) ExecutionSignature
Definition: WaveletTransforms.h:3152
vtkm::worklet::wavelets::ForwardTransform3DTopDown::Output1Dto3D
VTKM_EXEC_CONT void Output1Dto3D(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z) const
Definition: WaveletTransforms.h:1043
vtkm::worklet::wavelets::ExtensionWorklet2D::sigDimX
const vtkm::Id sigDimX
Definition: WaveletTransforms.h:2375
vtkm::worklet::wavelets::RightASYMWExtentionWorklet::sigInLen
vtkm::Id sigInLen
Definition: WaveletTransforms.h:3446
vtkm::worklet::wavelets::RightASYMWExtentionWorklet
Definition: WaveletTransforms.h:3422
vtkm::worklet::wavelets::InverseTransform3DFrontBack::Output1Dto3D
VTKM_EXEC_CONT void Output1Dto3D(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z) const
Definition: WaveletTransforms.h:1843
vtkm::worklet::wavelets::InverseTransform3DTopDown::ExecutionSignature
void(_1, _2, _3, _4, _5, _6, _7, _8, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:1548
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimZa
const vtkm::Id dimZa
Definition: WaveletTransforms.h:714
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::IndexTranslator6CubesLeftRight
IndexTranslator6CubesLeftRight(vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, vtkm::Id x_5, vtkm::Id y_5, vtkm::Id z_5, vtkm::Id start_x5, vtkm::Id start_y5, vtkm::Id start_z5)
Definition: WaveletTransforms.h:489
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimYd
const vtkm::Id dimYd
Definition: WaveletTransforms.h:598
vtkm::worklet::wavelets::InverseTransform2D::translator
const IndexTranslator6Matrices translator
Definition: WaveletTransforms.h:2869
vtkm::worklet::wavelets::ForwardTransform3DTopDown::lstart
vtkm::Id lstart
Definition: WaveletTransforms.h:1137
vtkm::worklet::wavelets::RightSYMWExtentionWorklet::RightSYMWExtentionWorklet
VTKM_EXEC_CONT RightSYMWExtentionWorklet(vtkm::Id sigInl)
Definition: WaveletTransforms.h:3376
vtkm::worklet::wavelets::LeftSYMWExtentionWorklet::ExecutionSignature
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3259
vtkm::worklet::wavelets::RightASYMHExtentionWorklet::ControlSignature
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3398
vtkm::Float64
double Float64
Definition: Types.h:155
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimZ2
const vtkm::Id dimZ2
Definition: WaveletTransforms.h:825
vtkm::worklet::wavelets::ExtensionDirection
ExtensionDirection
Definition: WaveletTransforms.h:34
vtkm::worklet::wavelets::InverseTransform3DFrontBack::ExecutionSignature
void(_1, _2, _3, _4, _5, _6, _7, _8, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:1779
vtkm::worklet::wavelets::SquareWorklet::ExecutionSignature
_2(_1) ExecutionSignature
Definition: WaveletTransforms.h:3192
vtkm::worklet::wavelets::ForwardTransform3DTopDown::Output3Dto1D
VTKM_EXEC_CONT vtkm::Id Output3Dto1D(vtkm::Id x, vtkm::Id y, vtkm::Id z) const
Definition: WaveletTransforms.h:1050
vtkm::worklet::wavelets::ExtensionWorklet3D::sigStartZ
const vtkm::Id sigStartZ
Definition: WaveletTransforms.h:235
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimY2
const vtkm::Id dimY2
Definition: WaveletTransforms.h:825
vtkm::worklet::wavelets::ExtensionWorklet3D::ControlSignature
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:50
vtkm::worklet::wavelets::InverseTransform2D::outputDimY
vtkm::Id outputDimY
Definition: WaveletTransforms.h:2867
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::Translate3Dto1D
VTKM_EXEC_CONT void Translate3Dto1D(vtkm::Id inX, vtkm::Id inY, vtkm::Id inZ, vtkm::Id &cube, vtkm::Id &idx) const
Definition: WaveletTransforms.h:550
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown
Definition: WaveletTransforms.h:602
vtkm::worklet::wavelets::IndexTranslator6Matrices::ya
const vtkm::Id ya
Definition: WaveletTransforms.h:2142
vtkm::worklet::wavelets::CubeCopyTo::outStartZ
const vtkm::Id outStartZ
Definition: WaveletTransforms.h:3699
vtkm::worklet::wavelets::ExtensionWorklet2D::Ext1Dto2D
VTKM_EXEC_CONT void Ext1Dto2D(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y) const
Definition: WaveletTransforms.h:2277
vtkm::worklet::wavelets::AssignZeroWorklet::zeroIdx
vtkm::Id zeroIdx
Definition: WaveletTransforms.h:3473
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimZ5
const vtkm::Id dimZ5
Definition: WaveletTransforms.h:828
vtkm::worklet::wavelets::IndexTranslator6Matrices::xd
const vtkm::Id xd
Definition: WaveletTransforms.h:2142
vtkm::worklet::wavelets::ExtensionWorklet2D::sigStartX
const vtkm::Id sigStartX
Definition: WaveletTransforms.h:2376
vtkm::worklet::wavelets::LeftASYMHExtentionWorklet::LeftASYMHExtentionWorklet
VTKM_EXEC_CONT LeftASYMHExtentionWorklet(vtkm::Id len)
Definition: WaveletTransforms.h:3292
vtkm::worklet::wavelets::RightSYMWExtentionWorklet::ControlSignature
void(WholeArrayOut, WholeArrayIn) ControlSignature
Definition: WaveletTransforms.h:3370
vtkm::worklet::wavelets::InverseTransform3DTopDown::Output1Dto3D
VTKM_EXEC_CONT void Output1Dto3D(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z) const
Definition: WaveletTransforms.h:1610
vtkm::worklet::wavelets::RectangleCopyTo::operator()
VTKM_EXEC void operator()(const ValueInType &valueIn, PortalOutType &arrayOut, const vtkm::Id &workIdx) const
Definition: WaveletTransforms.h:3622
vtkm::worklet::wavelets::ForwardTransform3DLeftRight::GetVal
VTKM_EXEC_CONT VAL GetVal(const InPortalType1 &portal1, const InPortalType2 &portal2, const InPortalType3 &portal3, vtkm::Id inCube, vtkm::Id inIdx) const
Definition: WaveletTransforms.h:906
vtkm::worklet::wavelets::InverseTransform3DTopDown::outDimX
vtkm::Id outDimX
Definition: WaveletTransforms.h:1761
vtkm::worklet::wavelets::InverseTransformOdd::cALen2
const vtkm::Id cALen2
Definition: WaveletTransforms.h:3030
vtkm::worklet::wavelets::ForwardTransform3DFrontBack::outDimY
const vtkm::Id outDimY
Definition: WaveletTransforms.h:1287
vtkm::worklet::wavelets::ForwardTransform3DLeftRight::Output3Dto1D
VTKM_EXEC_CONT vtkm::Id Output3Dto1D(vtkm::Id x, vtkm::Id y, vtkm::Id z) const
Definition: WaveletTransforms.h:897
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::dimY3
const vtkm::Id dimY3
Definition: WaveletTransforms.h:472
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimZ2
const vtkm::Id dimZ2
Definition: WaveletTransforms.h:712
vtkm::worklet::wavelets::ForwardTransform2D::outDimX
const vtkm::Id outDimX
Definition: WaveletTransforms.h:2541
vtkm::worklet::wavelets::RectangleCopyTo::outYStart
vtkm::Id outYStart
Definition: WaveletTransforms.h:3635
vtkm::worklet::wavelets::ForwardTransform2D::hstart
vtkm::Id hstart
Definition: WaveletTransforms.h:2546
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimY4
const vtkm::Id dimY4
Definition: WaveletTransforms.h:826
vtkm::worklet::wavelets::SquaredDeviation
Definition: WaveletTransforms.h:3148
vtkm::worklet::wavelets::InverseTransform3DFrontBack::operator()
VTKM_EXEC void operator()(const InPortalType1 &portal1, const InPortalType2 &portal2, const InPortalType3 &portal3, const InPortalType4 &portal4, const InPortalType5 &portal5, const FilterPortalType &lowFilter, const FilterPortalType &highFilter, OutputValueType &coeffOut, const vtkm::Id &workIdx) const
Definition: WaveletTransforms.h:1899
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimY3
const vtkm::Id dimY3
Definition: WaveletTransforms.h:826
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::dimX2
const vtkm::Id dimX2
Definition: WaveletTransforms.h:324
vtkm::worklet::wavelets::InverseTransform3DFrontBack::ControlSignature
void(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, FieldOut) ControlSignature
Definition: WaveletTransforms.h:1778
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::dimZd
const vtkm::Id dimZd
Definition: WaveletTransforms.h:827
vtkm::worklet::wavelets::LeftASYMHExtentionWorklet
Definition: WaveletTransforms.h:3282
vtkm::worklet::wavelets::CubeCopyTo::outDimX
const vtkm::Id outDimX
Definition: WaveletTransforms.h:3698
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimX3
const vtkm::Id dimX3
Definition: WaveletTransforms.h:713
vtkm::worklet::wavelets::SquaredDeviation::mean
vtkm::Float64 mean
Definition: WaveletTransforms.h:3171
vtkm::worklet::wavelets::InverseTransform3DLeftRight::Output1Dto3D
VTKM_EXEC_CONT void Output1Dto3D(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y, vtkm::Id &z) const
Definition: WaveletTransforms.h:1379
vtkm::worklet::wavelets::ForwardTransform2D::Output1Dto2D
VTKM_EXEC_CONT void Output1Dto2D(vtkm::Id idx, vtkm::Id &x, vtkm::Id &y) const
Definition: WaveletTransforms.h:2423
vtkm::worklet::wavelets::ForwardTransform3DTopDown::operator()
VTKM_EXEC_CONT void operator()(const InPortalType1 &inPortal1, const InPortalType2 &inPortal2, const InPortalType3 &inPortal3, const FilterPortalType &lowFilter, const FilterPortalType &highFilter, OutputPortalType &coeffOut, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:1088
vtkm::worklet::wavelets::TOP
@ TOP
Definition: WaveletTransforms.h:38
vtkm::worklet::wavelets::IndexTranslator3CubesLeftRight::pretendDimX2
const vtkm::Id pretendDimX2
Definition: WaveletTransforms.h:325
vtkm::worklet::wavelets::LeftASYMHExtentionWorklet::operator()
VTKM_EXEC_CONT void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3298
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::startX2
const vtkm::Id startX2
Definition: WaveletTransforms.h:399
vtkm::worklet::wavelets::InverseTransformEven::operator()
VTKM_EXEC void operator()(const InputPortalType &coeffs, const FilterPortalType &lowFilter, const FilterPortalType &highFilter, OutputPortalType &sigOut, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3059
vtkm::worklet::wavelets::CubeCopyTo::ExecutionSignature
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3644
vtkm::worklet::wavelets::LeftASYMWExtentionWorklet::addLen
vtkm::Id addLen
Definition: WaveletTransforms.h:3334
vtkm::worklet::wavelets::ForwardTransform3DTopDown::filterLen
const vtkm::Id filterLen
Definition: WaveletTransforms.h:1132
vtkm::worklet::wavelets::InverseTransform3DLeftRight::filterLen
const vtkm::Id filterLen
Definition: WaveletTransforms.h:1529
vtkm::worklet::wavelets::InverseTransform2D::operator()
VTKM_EXEC void operator()(const InPortalType1 &portal1, const InPortalType2 &portal2, const InPortalType3 &portal3, const InPortalType4 &portal4, const InPortalTypecAcD &portalcAcD, const FilterPortalType &lowFilter, const FilterPortalType &highFilter, OutputValueType &coeffOut, const vtkm::Id &workIdx) const
Definition: WaveletTransforms.h:2692
vtkm::worklet::wavelets::InverseTransform3DTopDown::translator
const IndexTranslator6CubesTopDown translator
Definition: WaveletTransforms.h:1765
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::startY2
const vtkm::Id startY2
Definition: WaveletTransforms.h:399
vtkm::worklet::wavelets::InverseTransform3DTopDown::InverseTransform3DTopDown
InverseTransform3DTopDown(vtkm::Id fil_len, vtkm::Id x_1, vtkm::Id y_1, vtkm::Id z_1, vtkm::Id x_2, vtkm::Id y_2, vtkm::Id z_2, vtkm::Id x_3, vtkm::Id y_3, vtkm::Id z_3, vtkm::Id x_4, vtkm::Id y_4, vtkm::Id z_4, vtkm::Id x_a, vtkm::Id y_a, vtkm::Id z_a, vtkm::Id x_d, vtkm::Id y_d, vtkm::Id z_d, vtkm::Id x_5, vtkm::Id y_5, vtkm::Id z_5, vtkm::Id startX5, vtkm::Id startY5, vtkm::Id startZ5)
Definition: WaveletTransforms.h:1552
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimZ1
const vtkm::Id dimZ1
Definition: WaveletTransforms.h:596
vtkm::worklet::wavelets::RightASYMHExtentionWorklet::RightASYMHExtentionWorklet
VTKM_EXEC_CONT RightASYMHExtentionWorklet(vtkm::Id sigInl)
Definition: WaveletTransforms.h:3404
vtkm::worklet::wavelets::InverseTransform2D
Definition: WaveletTransforms.h:2569
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::dimX2
const vtkm::Id dimX2
Definition: WaveletTransforms.h:470
vtkm::worklet::wavelets::IndexTranslator6CubesFrontBack::startX5
const vtkm::Id startX5
Definition: WaveletTransforms.h:828
vtkm::worklet::wavelets::InverseTransform3DFrontBack::translator
const IndexTranslator6CubesFrontBack translator
Definition: WaveletTransforms.h:1998
vtkm::worklet::wavelets::CopyWorklet
Definition: WaveletTransforms.h:3202
vtkm::worklet::wavelets::ForwardTransform3DLeftRight::lstart
vtkm::Id lstart
Definition: WaveletTransforms.h:984
vtkm::worklet::wavelets::CubeCopyTo::Get1DIdxOfOutputCube
VTKM_EXEC_CONT vtkm::Id Get1DIdxOfOutputCube(vtkm::Id x, vtkm::Id y, vtkm::Id z) const
Definition: WaveletTransforms.h:3680
vtkm::worklet::wavelets::ExtensionWorklet2D::extDimY
const vtkm::Id extDimY
Definition: WaveletTransforms.h:2375
vtkm::worklet::wavelets::RightSYMWExtentionWorklet::operator()
VTKM_EXEC void operator()(PortalOutType &portalOut, const PortalInType &portalIn, const vtkm::Id &workIndex) const
Definition: WaveletTransforms.h:3382
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::pretendDimZ2
const vtkm::Id pretendDimZ2
Definition: WaveletTransforms.h:399
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::dimX3
const vtkm::Id dimX3
Definition: WaveletTransforms.h:400
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimZa
const vtkm::Id dimZa
Definition: WaveletTransforms.h:598
vtkm::worklet::wavelets::RightASYMWExtentionWorklet::ExecutionSignature
void(_1, _2, WorkIndex) ExecutionSignature
Definition: WaveletTransforms.h:3427
vtkm::worklet::wavelets::ExtensionWorklet3D::sigPretendDimX
const vtkm::Id sigPretendDimX
Definition: WaveletTransforms.h:236
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::dimY1
const vtkm::Id dimY1
Definition: WaveletTransforms.h:469
vtkm::worklet::wavelets::ThresholdWorklet::operator()
VTKM_EXEC void operator()(ValueType &coeffVal) const
Definition: WaveletTransforms.h:3135
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::pretendDimX2
const vtkm::Id pretendDimX2
Definition: WaveletTransforms.h:471
vtkm::worklet::wavelets::CubeCopyTo::outStartX
const vtkm::Id outStartX
Definition: WaveletTransforms.h:3699
vtkm::worklet::wavelets::IndexTranslator6CubesLeftRight::dimZd
const vtkm::Id dimZd
Definition: WaveletTransforms.h:598
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimY3
const vtkm::Id dimY3
Definition: WaveletTransforms.h:713
vtkm::worklet::wavelets::InverseTransform3DFrontBack::filterLen
const vtkm::Id filterLen
Definition: WaveletTransforms.h:1993
vtkm::worklet::WorkletMapField
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38
vtkm::worklet::wavelets::IndexTranslator6Matrices::y5
vtkm::Id y5
Definition: WaveletTransforms.h:2143
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::dimY1
const vtkm::Id dimY1
Definition: WaveletTransforms.h:397
vtkm::worklet::wavelets::IndexTranslator6CubesTopDown::dimY1
const vtkm::Id dimY1
Definition: WaveletTransforms.h:712
vtkm::worklet::wavelets::RightASYMHExtentionWorklet::sigInLen
vtkm::Id sigInLen
Definition: WaveletTransforms.h:3418
vtkm::worklet::wavelets::ExtensionWorklet2D::sigDimY
const vtkm::Id sigDimY
Definition: WaveletTransforms.h:2375
vtkm::exec::arg::WorkIndex
The ExecutionSignature tag to use to get the work index.
Definition: WorkIndex.h:39
vtkm::worklet::wavelets::InverseTransformEven::filterLen
const vtkm::Id filterLen
Definition: WaveletTransforms.h:3111
vtkm::worklet::wavelets::ExtensionWorklet2D::padZero
const bool padZero
Definition: WaveletTransforms.h:2379
vtkm::worklet::wavelets::InverseTransform3DTopDown::outDimY
vtkm::Id outDimY
Definition: WaveletTransforms.h:1762
vtkm::worklet::wavelets::IndexTranslator6Matrices::x3
const vtkm::Id x3
Definition: WaveletTransforms.h:2142
vtkm::worklet::wavelets::IndexTranslator6Matrices::Translate2Dto1D
VTKM_EXEC_CONT void Translate2Dto1D(vtkm::Id inX, vtkm::Id inY, vtkm::Id &mat, vtkm::Id &idx) const
Definition: WaveletTransforms.h:2068
vtkm::worklet::wavelets::IndexTranslator3CubesTopDown::startZ2
const vtkm::Id startZ2
Definition: WaveletTransforms.h:399
vtkm::worklet::wavelets::ExtensionWorklet3D::extDimX
const vtkm::Id extDimX
Definition: WaveletTransforms.h:234
vtkm::worklet::wavelets::ForwardTransform::oddhigh
bool oddhigh
Definition: WaveletTransforms.h:2941
vtkm::worklet::wavelets::ForwardTransform3DFrontBack::ForwardTransform3DFrontBack
ForwardTransform3DFrontBack(vtkm::Id filter_len, vtkm::Id approx_len, bool odd_low, vtkm::Id dimX1, vtkm::Id dimY1, vtkm::Id dimZ1, vtkm::Id dimX2, vtkm::Id dimY2, vtkm::Id dimZ2, vtkm::Id startX2, vtkm::Id startY2, vtkm::Id startZ2, vtkm::Id pretendX2, vtkm::Id pretendY2, vtkm::Id pretendZ2, vtkm::Id dimX3, vtkm::Id dimY3, vtkm::Id dimZ3)
Definition: WaveletTransforms.h:1152
vtkm::worklet::wavelets::ExtensionWorklet3D::sigStartX
const vtkm::Id sigStartX
Definition: WaveletTransforms.h:235
vtkm::worklet::wavelets::IndexTranslator3CubesFrontBack::pretendDimZ2
const vtkm::Id pretendDimZ2
Definition: WaveletTransforms.h:471
vtkm::worklet::wavelets::ExtensionWorklet3D::sigDimZ
const vtkm::Id sigDimZ
Definition: WaveletTransforms.h:234