本文整理汇总了C++中KSpace::sKCoord方法的典型用法代码示例。如果您正苦于以下问题:C++ KSpace::sKCoord方法的具体用法?C++ KSpace::sKCoord怎么用?C++ KSpace::sKCoord使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KSpace
的用法示例。
在下文中一共展示了KSpace::sKCoord方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: adev_output
//.........这里部分代码省略.........
adev_output << estimator.h()
<< " " << adev_stat.mean() // L1
<< " " << sqrt( adev_stat.unbiasedVariance()
+ adev_stat.mean()*adev_stat.mean() ) // L2
<< " " << adev_stat.max() // Loo
<< " " << adev_stat.mean() // E[X] (=L1)
<< " " << adev_stat.unbiasedVariance() // Var[X]
<< " " << adev_stat.min() // Min[X]
<< " " << adev_stat.max() // Max[X]
<< " " << adev_stat.samples() // Nb[X]
<< std::endl;
adev_output.close();
trace.endBlock();
}
if ( vm[ "export" ].as<string>() != "None" )
{
trace.beginBlock( "Exporting cell geometry." );
std::ostringstream export_sstr;
export_sstr << fname << "-" << nameEstimator << "-cells-"
<< estimator.h() << ".txt";
std::ofstream export_output( export_sstr.str().c_str() );
export_output << "# ImaGene viewer (viewSetOfSurfels) file format for displaying cells." << std::endl;
bool adev = vm[ "export" ].as<string>() == "AngleDeviation";
unsigned int i = 0;
range = CountedPtr<VisitorRange>( new VisitorRange( new Visitor( surface, *(surface.begin()) )) );
for ( VisitorConstIterator it = range->begin(), itE = range->end(); it != itE; ++it, ++i )
{
Quantity n_est = n_estimations[ i ];
Quantity n_true_est = n_true_estimations[ i ];
Scalar angle_error = acos( n_est.dot( n_true_est ) )*180.0 / 3.14159625;
Surfel s = *it;
export_output
<< "CellN"
<< " " << min( 1023, max( 512+K.sKCoord( s, 0 ), 0 ) )
<< " " << min( 1023, max( 512+K.sKCoord( s, 1 ), 0 ) )
<< " " << min( 1023, max( 512+K.sKCoord( s, 2 ), 0 ) )
<< " " << K.sSign( s );
Color c = grad( 0 );
if ( adev ) c = grad( max( 0.0, min( angle_error, 40.0 ) ) );
export_output << " " << ((double) c.red() / 255.0 )
<< " " << ((double) c.green() / 255.0 )
<< " " << ((double) c.blue() / 255.0 );
export_output << " " << n_est[ 0 ] << " " << n_est[ 1 ]
<< " " << n_est[ 2 ] << std::endl;
}
export_output.close();
trace.endBlock();
}
if ( vm.count( "normals" ) )
{
trace.beginBlock( "Exporting cells normals." );
std::ostringstream export_sstr;
export_sstr << fname << "-" << nameEstimator << "-normals-"
<< estimator.h() << ".txt";
std::ofstream export_output( export_sstr.str().c_str() );
export_output << "# kx ky kz sign n_est[0] n_est[1] n_est[2] n_true[0] n_true[1] n_true[2]" << std::endl;
unsigned int i = 0;
range = CountedPtr<VisitorRange>( new VisitorRange( new Visitor( surface, *(surface.begin()) )) );
for ( VisitorConstIterator it = range->begin(), itE = range->end(); it != itE; ++it, ++i )
{
Quantity n_est = n_estimations[ i ];
Quantity n_true_est = n_true_estimations[ i ];
Surfel s = *it;
export_output
<< K.sKCoord( s, 0 ) << " " << K.sKCoord( s, 1 ) << " " << K.sKCoord( s, 2 )
<< " " << K.sSign( s )