template<class ArrayT>
Definition at line 105 of file mainTalk.cpp. References gUniform, Impala::Core::Array::PrintData(), Impala::Core::Array::Set(), and TalkUniqueImage(). 00106 { 00107 int width; 00108 int height; 00109 double val; 00110 if (dims == 1) 00111 { 00112 if (dir == 1) 00113 { 00114 width = 5; 00115 height = 1; 00116 val = 1.0 / 5; 00117 } 00118 else 00119 { 00120 width = 3; 00121 height = 1; 00122 val = 1.0 / 3; 00123 } 00124 } 00125 if (dims == 2) 00126 { 00127 width = 5; 00128 height = 3; 00129 val = 1.0 / (5*3); 00130 } 00131 ArrayT* ker = 0; 00132 double* kerData; 00133 if (gUniform) 00134 { 00135 int nPix = width * height; 00136 kerData = new double[nPix]; 00137 for (int i=0 ; i<nPix ; i++) 00138 kerData[i] = val; 00139 } 00140 else 00141 { 00142 kerData = TalkUniqueImage(width, height, 1.1, 1.1); 00143 } 00144 Array2dScalarReal64* kerDouble = 00145 MakeFromData<Array2dScalarReal64>(kerData, width, height, 0, 0); 00146 Set(ker, kerDouble); 00147 std::cout << std::endl << comment << std::endl; 00148 PrintData(ker, false); 00149 delete kerData; 00150 return ker; 00151 }
Here is the call graph for this function:
|