本文整理汇总了C++中MultidimArray::copy方法的典型用法代码示例。如果您正苦于以下问题:C++ MultidimArray::copy方法的具体用法?C++ MultidimArray::copy怎么用?C++ MultidimArray::copy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MultidimArray
的用法示例。
在下文中一共展示了MultidimArray::copy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processInprocessInputPrepareSPTH
//.........这里部分代码省略.........
//String name = "[email protected]/Extracted/run_002/extra/BPV_1386.stk";
String name = "[email protected]/Extracted/run_001/extra/KLH_Dataset_I_Training_0028.stk";
//String name = "[email protected]/Extracted/run_001/DefaultFamily5";
std::cout << img.name() << std::endl;
if (img.name()==name2)
{
FileName fpName = "test_1.txt";
mI.write(fpName);
fpName = "test_2.txt";
nI.write(fpName);
fpName = "test_3.txt";
tempM.write(fpName);
fpName = "test_4.txt";
ROI.write(fpName);
//exit(1);
}
#endif
nI.binarize(0);
int im = labelImage2D(nI,nI,8);
compute_hist(nI, hist, 0, im, im+1);
size_t l;
int k,i,j;
hist.maxIndex(l,k,i,j);
A1D_ELEM(hist,j)=0;
hist.maxIndex(l,k,i,j);
nI.binarizeRange(j-1,j+1);
double x0=0,y0=0,majorAxis=0,minorAxis=0,ellipAng=0;
size_t area=0;
fitEllipse(nI,x0,y0,majorAxis,minorAxis,ellipAng,area);
A1D_ELEM(v2,0)=majorAxis/((img().xdim) );
A1D_ELEM(v2,1)=minorAxis/((img().xdim) );
A1D_ELEM(v2,2)= (fabs((img().xdim)/2-x0)+fabs((img().ydim)/2-y0))/((img().xdim)/2);
A1D_ELEM(v2,3)=area/( (double)((img().xdim)/2)*((img().ydim)/2) );
for (int n=0 ; n < numDescriptors2 ; n++)
{
if ( std::isnan(std::abs(A1D_ELEM(v2,n))))
A1D_ELEM(v2,n)=0;
}
tempPcaAnalyzer2.addVector(v2);
//mI.setXmippOrigin();
//auto_correlation_matrix(mI*ROI,autoCorr);
//auto_correlation_matrix(nI,autoCorr);
autoCorr.window(smallAutoCorr,-5,-5, 5, 5);
smallAutoCorr.copy(temp);
svdcmp(temp,U,D,V);
for (int n = 0; n < numDescriptors3; ++n)
A1D_ELEM(v3,n)=(float)VEC_ELEM(D,n); //A1D_ELEM(v3,n)=(float)VEC_ELEM(D,n)/VEC_ELEM(D,0);
tempPcaAnalyzer3.addVector(v3);
double minVal=0.;
double maxVal=0.;
mI.computeDoubleMinMax(minVal,maxVal);
compute_hist(mI, hist, minVal, maxVal, 100);
for (int n=0 ; n <= numDescriptors4-1 ; n++)
{
A1D_ELEM(v4,n)= (hist.percentil((n+1)*10));
}
tempPcaAnalyzer4.addVector(v4);
#ifdef DEBUG
if (img.name()==name1)
{
FileName fpName = "test.txt";
mI.write(fpName);
fpName = "test3.txt";
nI.write(fpName);
}
#endif
imgno++;
imgnoPCA++;
if (imgno % c == 0 && verbose>0)
progress_bar(imgno);
}
tempPcaAnalyzer0.evaluateZScore(2,20,trained);
tempPcaAnalyzer1.evaluateZScore(2,20,trained);
tempPcaAnalyzer2.evaluateZScore(2,20,trained);
tempPcaAnalyzer3.evaluateZScore(2,20,trained);
tempPcaAnalyzer4.evaluateZScore(2,20,trained);
pcaAnalyzer.push_back(tempPcaAnalyzer0);
pcaAnalyzer.push_back(tempPcaAnalyzer1);
pcaAnalyzer.push_back(tempPcaAnalyzer1);
pcaAnalyzer.push_back(tempPcaAnalyzer3);
pcaAnalyzer.push_back(tempPcaAnalyzer4);
}