本文整理汇总了C++中QVector::fromStdVector方法的典型用法代码示例。如果您正苦于以下问题:C++ QVector::fromStdVector方法的具体用法?C++ QVector::fromStdVector怎么用?C++ QVector::fromStdVector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QVector
的用法示例。
在下文中一共展示了QVector::fromStdVector方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getDWT
/********************************************//**
\brief Discrete Wavelet Transform including Daubechies and Biorthogonal
\param array : input array (1D)
\param filter : name of the filter to use (from TransformationType enum)
\param dir : direction (1:forward, -1:backward)
\param transformedArray : resulting transformed array
\param stop : flag indicating if we need to stop the process or not
\param origLength : original Length useful when dir is -1 to cut result
\return boolean true if the execution is finished,
false if the process has been stopped during the execution
***********************************************/
bool FWT::getDWT(const QVector<float>& array,
const TransformationType filter,
const int dir,
QVector<float>& transformedArray,
bool* stop,
const int origLength)
{
std::vector<float> result;
if(filter == DB4_TRANSFORMATION || filter == DB6_TRANSFORMATION || filter == DB8_TRANSFORMATION)
{
if(dir == 1) return fastWaveletTransf(array.toStdVector(), filter, result, stop);
else return iFastWaveletTransf(array.toStdVector(), filter, origLength, result, stop);
}
else if(filter == BIOR_5_3_TRANSFORMATION || filter == BIOR_9_7_TRANSFORMATION)
{
return perform_wavelet_transform(array.toStdVector(), filter, dir, origLength, result, stop);
}
transformedArray.fromStdVector(result);
return true;
}