@@ -22,27 +22,27 @@ class FiszTransform
2222 // dimension of the nearest power of two,
2323 // if the data size is not of power two;
2424 // ext is an array of 6 elements (extension information of 6 directions)
25- void dataExtension (to_array <DATATYPE, true > &data, int ext[], type_border BORDERTYPE=I_MIRROR);
25+ void dataExtension (convert_to_array <DATATYPE, true > &data, int ext[], type_border BORDERTYPE=I_MIRROR);
2626 // extract the original data in using the extension information
27- void dataExtraction (to_array <DATATYPE, true > &data, int ext[]);
27+ void dataExtraction (convert_to_array <DATATYPE, true > &data, int ext[]);
2828
2929 // Fisz transform 1D / 2D / 3D
3030 // the data size MUST be power of two,
3131 // otherwise, a DataSizeException will be thrown out
32- void fisz1D (to_array <DATATYPE, true > &data);
33- void fisz2D (to_array <DATATYPE, true > &data);
34- void fisz3D (to_array <DATATYPE, true > &data);
32+ void fisz1D (convert_to_array <DATATYPE, true > &data);
33+ void fisz2D (convert_to_array <DATATYPE, true > &data);
34+ void fisz3D (convert_to_array <DATATYPE, true > &data);
3535
3636 // Inverse Fisz transform 1D / 2D / 3D
3737 // data size MUST be power of two.
3838 // otherwise, a DataSizeException will be thrown out
39- void ifisz1D (to_array <DATATYPE, true > &data);
40- void ifisz2D (to_array <DATATYPE, true > &data);
41- void ifisz3D (to_array <DATATYPE, true > &data);
39+ void ifisz1D (convert_to_array <DATATYPE, true > &data);
40+ void ifisz2D (convert_to_array <DATATYPE, true > &data);
41+ void ifisz3D (convert_to_array <DATATYPE, true > &data);
4242};
4343
4444template <class DATATYPE >
45- void FiszTransform<DATATYPE>::dataExtension (to_array <DATATYPE, true > &data, int ext[], type_border BORDERTYPE)
45+ void FiszTransform<DATATYPE>::dataExtension (convert_to_array <DATATYPE, true > &data, int ext[], type_border BORDERTYPE)
4646{
4747 int lext = 0 , rext = 0 , uext = 0 , dext = 0 , bext = 0 , fext = 0 ;
4848 int dim = data.naxis ();
@@ -54,7 +54,7 @@ void FiszTransform<DATATYPE>::dataExtension (to_array<DATATYPE, true> &data, int
5454 lext = (newlen - len1) / 2 ;
5555 rext = (newlen - len1) - lext;
5656
57- to_array <DATATYPE, true > *temp = new to_array <DATATYPE, true >(newlen);
57+ convert_to_array <DATATYPE, true > *temp = new convert_to_array <DATATYPE, true >(newlen);
5858 for (int x=0 ; x<newlen; x++)
5959 (*temp)(x) = data (x-lext, BORDERTYPE);
6060 data = *temp;
@@ -72,7 +72,7 @@ void FiszTransform<DATATYPE>::dataExtension (to_array<DATATYPE, true> &data, int
7272 lext = (newlen1 - len1) / 2 ; rext = (newlen1 - len1) - lext;
7373 uext = (newlen2 - len2) / 2 ; dext = (newlen2 - len2) - uext;
7474
75- to_array <DATATYPE, true > *temp = new to_array <DATATYPE, true >(newlen1, newlen2);
75+ convert_to_array <DATATYPE, true > *temp = new convert_to_array <DATATYPE, true >(newlen1, newlen2);
7676 for (int y=0 ; y<newlen2; y++)
7777 for (int x=0 ; x<newlen1; x++)
7878 (*temp)(x, y) = data (x-lext, y-uext, BORDERTYPE);
@@ -92,7 +92,7 @@ void FiszTransform<DATATYPE>::dataExtension (to_array<DATATYPE, true> &data, int
9292 uext = (newlen2 - len2) / 2 ; dext = (newlen2 - len2) - uext;
9393 bext = (newlen3 - len3) / 2 ; fext = (newlen3 - len3) - fext;
9494
95- to_array <DATATYPE, true > *temp = new to_array <DATATYPE, true >(newlen1, newlen2, newlen3);
95+ convert_to_array <DATATYPE, true > *temp = new convert_to_array <DATATYPE, true >(newlen1, newlen2, newlen3);
9696 for (int z=0 ; z<newlen3; z++)
9797 for (int y=0 ; y<newlen2; y++)
9898 for (int x=0 ; x<newlen1; x++)
@@ -106,7 +106,7 @@ void FiszTransform<DATATYPE>::dataExtension (to_array<DATATYPE, true> &data, int
106106}
107107
108108template <class DATATYPE >
109- void FiszTransform<DATATYPE>::dataExtraction (to_array <DATATYPE, true > &data, int ext[])
109+ void FiszTransform<DATATYPE>::dataExtraction (convert_to_array <DATATYPE, true > &data, int ext[])
110110{
111111 int dim = data.naxis ();
112112 int lext = ext[0 ], rext = ext[1 ], uext = ext[2 ];
@@ -115,7 +115,7 @@ void FiszTransform<DATATYPE>::dataExtraction (to_array<DATATYPE, true> &data, in
115115 if ((dim == 1 ) && ((lext != 0 ) || (rext != 0 )))
116116 {
117117 int finallen = data.nx () - lext - rext;
118- to_array <DATATYPE,true > *tdata = new to_array <DATATYPE, true >(finallen);
118+ convert_to_array <DATATYPE,true > *tdata = new convert_to_array <DATATYPE, true >(finallen);
119119 for (int x=0 ; x<finallen; x++) (*tdata)(x) = data (lext+x);
120120 data = (*tdata);
121121 if (tdata != NULL ) { delete tdata; tdata = NULL ; }
@@ -125,7 +125,7 @@ void FiszTransform<DATATYPE>::dataExtraction (to_array<DATATYPE, true> &data, in
125125 {
126126 int finallen1 = data.nx () - lext - rext;
127127 int finallen2 = data.ny () - uext - dext;
128- to_array <DATATYPE,true > *tdata = new to_array <DATATYPE, true >(finallen1, finallen2);
128+ convert_to_array <DATATYPE,true > *tdata = new convert_to_array <DATATYPE, true >(finallen1, finallen2);
129129 for (int x=0 ; x<finallen1; x++)
130130 for (int y=0 ; y<finallen2; y++)
131131 (*tdata)(x, y) = data (lext+x, uext+y);
@@ -139,7 +139,7 @@ void FiszTransform<DATATYPE>::dataExtraction (to_array<DATATYPE, true> &data, in
139139 int finallen1 = data.nx () - lext - rext;
140140 int finallen2 = data.ny () - uext - dext;
141141 int finallen3 = data.nz () - bext - fext;
142- to_array <DATATYPE,true > *tdata = new to_array <DATATYPE, true >(finallen1, finallen2, finallen3);
142+ convert_to_array <DATATYPE,true > *tdata = new convert_to_array <DATATYPE, true >(finallen1, finallen2, finallen3);
143143 for (int x=0 ; x<finallen1; x++)
144144 for (int y=0 ; y<finallen2; y++)
145145 for (int z=0 ; z<finallen3; z++)
@@ -150,14 +150,14 @@ void FiszTransform<DATATYPE>::dataExtraction (to_array<DATATYPE, true> &data, in
150150}
151151
152152template <class DATATYPE >
153- void FiszTransform<DATATYPE>::fisz1D (to_array <DATATYPE, true > &data)
153+ void FiszTransform<DATATYPE>::fisz1D (convert_to_array <DATATYPE, true > &data)
154154{
155155 double ca, cd;
156156 int len = data.nx ();
157157 if (len <= 1 ) return ;
158158 else if (!is_power_of_2 (len))
159159 throw DataSizeException (len, " data size not of power of two" );
160- to_array <DATATYPE, true > *temp = new to_array <DATATYPE, true >(len);
160+ convert_to_array <DATATYPE, true > *temp = new convert_to_array <DATATYPE, true >(len);
161161
162162 // decomposition by Haar transform and modification of detail coefficients
163163 while (len > 1 )
@@ -193,14 +193,14 @@ void FiszTransform<DATATYPE>::fisz1D (to_array<DATATYPE, true> &data)
193193}
194194
195195template <class DATATYPE >
196- void FiszTransform<DATATYPE>::ifisz1D (to_array <DATATYPE, true > &data)
196+ void FiszTransform<DATATYPE>::ifisz1D (convert_to_array <DATATYPE, true > &data)
197197{
198198 double ca, cd;
199199 int len = data.nx ();
200200 if (len <= 1 ) return ;
201201 else if (!is_power_of_2 (len))
202202 throw DataSizeException (len, " data size not of power of two" );
203- to_array <DATATYPE, true > *temp = new to_array <DATATYPE, true >(len);
203+ convert_to_array <DATATYPE, true > *temp = new convert_to_array <DATATYPE, true >(len);
204204
205205 // decomposition by Haar transform
206206 while (len > 1 )
@@ -232,7 +232,7 @@ void FiszTransform<DATATYPE>::ifisz1D (to_array<DATATYPE, true> &data)
232232}
233233
234234template <class DATATYPE >
235- void FiszTransform<DATATYPE>::fisz2D (to_array <DATATYPE, true > &data)
235+ void FiszTransform<DATATYPE>::fisz2D (convert_to_array <DATATYPE, true > &data)
236236{
237237 double ca, dh, dv, dd;
238238 int s, offsetx, offsety;
@@ -242,7 +242,7 @@ void FiszTransform<DATATYPE>::fisz2D (to_array<DATATYPE, true> &data)
242242 throw DataSizeException (len1, " data size not of power of two" );
243243 else if (!is_power_of_2 (len2))
244244 throw DataSizeException (len2, " data size not of power of two" );
245- to_array <DATATYPE, true > *temp = new to_array <DATATYPE, true >(len1, len2);
245+ convert_to_array <DATATYPE, true > *temp = new convert_to_array <DATATYPE, true >(len1, len2);
246246
247247 // decomposition by Haar transform and modification of detail coefficients
248248 while ((len1 > 1 ) && (len2 > 1 ))
@@ -318,7 +318,7 @@ void FiszTransform<DATATYPE>::fisz2D (to_array<DATATYPE, true> &data)
318318}
319319
320320template <class DATATYPE >
321- void FiszTransform<DATATYPE>::ifisz2D (to_array <DATATYPE, true > &data)
321+ void FiszTransform<DATATYPE>::ifisz2D (convert_to_array <DATATYPE, true > &data)
322322{
323323 double ca, dh, dv, dd;
324324 int s, offsetx, offsety;
@@ -328,7 +328,7 @@ void FiszTransform<DATATYPE>::ifisz2D (to_array<DATATYPE, true> &data)
328328 throw DataSizeException (len1, " data size not of power of two" );
329329 else if (!is_power_of_2 (len2))
330330 throw DataSizeException (len2, " data size not of power of two" );
331- to_array <DATATYPE, true > *temp = new to_array <DATATYPE, true >(len1, len2);
331+ convert_to_array <DATATYPE, true > *temp = new convert_to_array <DATATYPE, true >(len1, len2);
332332
333333 // decomposition by Haar transform
334334 while ((len1 > 1 ) && (len2 > 1 ))
@@ -396,7 +396,7 @@ void FiszTransform<DATATYPE>::ifisz2D (to_array<DATATYPE, true> &data)
396396}
397397
398398template <class DATATYPE >
399- void FiszTransform<DATATYPE>::fisz3D (to_array <DATATYPE, true > &data)
399+ void FiszTransform<DATATYPE>::fisz3D (convert_to_array <DATATYPE, true > &data)
400400{
401401 int len1 = data.nx (), len2 = data.ny (), len3 = data.nz ();
402402 int len = MIN (MIN (len1, len2), len3);
@@ -409,7 +409,7 @@ void FiszTransform<DATATYPE>::fisz3D (to_array<DATATYPE, true> &data)
409409 throw DataSizeException (len3, " data size not of power of two" );
410410
411411 int s = iilog2 (len);
412- to_array <DATATYPE, true > *coef = new to_array <DATATYPE, true >[7 *s + 1 ];
412+ convert_to_array <DATATYPE, true > *coef = new convert_to_array <DATATYPE, true >[7 *s + 1 ];
413413
414414 dblarray dfilterh (2 ), dfilterg (2 ), rfilterh (2 ), rfilterg (2 );
415415 dfilterh (0 ) = .5 ; dfilterh (1 ) = .5 ; dfilterg (0 ) = -.5 ; dfilterg (1 ) = .5 ;
@@ -449,7 +449,7 @@ void FiszTransform<DATATYPE>::fisz3D (to_array<DATATYPE, true> &data)
449449}
450450
451451template <class DATATYPE >
452- void FiszTransform<DATATYPE>::ifisz3D (to_array <DATATYPE, true > &data)
452+ void FiszTransform<DATATYPE>::ifisz3D (convert_to_array <DATATYPE, true > &data)
453453{
454454 int len1 = data.nx (), len2 = data.ny (), len3 = data.nz ();
455455 int len = MIN (MIN (len1, len2), len3);
@@ -462,7 +462,7 @@ void FiszTransform<DATATYPE>::ifisz3D (to_array<DATATYPE, true> &data)
462462 throw DataSizeException (len3, " data size not of power of two" );
463463
464464 int s = iilog2 (len);
465- to_array <DATATYPE, true > *coef = new to_array <DATATYPE, true >[7 *s + 1 ];
465+ convert_to_array <DATATYPE, true > *coef = new convert_to_array <DATATYPE, true >[7 *s + 1 ];
466466
467467 dblarray dfilterh (2 ), dfilterg (2 ), rfilterh (2 ), rfilterg (2 );
468468 dfilterh (0 ) = .5 ; dfilterh (1 ) = .5 ; dfilterg (0 ) = -.5 ; dfilterg (1 ) = .5 ;
0 commit comments