本文整理汇总了C++中SimpleTimer::elapsed_min方法的典型用法代码示例。如果您正苦于以下问题:C++ SimpleTimer::elapsed_min方法的具体用法?C++ SimpleTimer::elapsed_min怎么用?C++ SimpleTimer::elapsed_min使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleTimer
的用法示例。
在下文中一共展示了SimpleTimer::elapsed_min方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
int
main(int ac, char* av[])
{
SimpleTimer timer;
IoParams params;
try
{
params.parse(ac,av);
}
catch (const std::exception& e)
{
std::cerr << " Exception caught while parsing cmd-line: "
<< e.what() << "\n Type --help for command info! " << std::endl;
exit(1);
}
std::cout << " using bounding box "
<< (params.useBoundingBox?"yes":"no") << std::endl;
// load fixed
MRI* mriFixed = MRIread( getChar( params.strFixed ) );
if ( !mriFixed )
{
std::cerr << " failed reading fixed volumes\n";
exit(1);
}
// load moving
MRI* mriMoving = MRIread( getChar( params.strMoving ) );
if ( !mriMoving )
{
std::cerr << " failed reading moving volume\n";
exit(1);
}
// load morph
boost::shared_ptr<gmp::VolumeMorph> pmorph(new gmp::VolumeMorph);
try
{
pmorph->load( params.strMorph.c_str(), params.zlibBuffer );
}
catch (const char* msg)
{
std::cerr << " Failed loading morph: \n"
<< msg << std::endl;
exit(1);
}
pmorph->m_template = mriFixed;
initOctree2(*pmorph);
// set the interpolation
if ( params.strInterp.empty() )
pmorph->m_interpolationType = SAMPLE_TRILINEAR;
else if (strcmp(params.strInterp.c_str(), "linear")==0)
pmorph->m_interpolationType = SAMPLE_TRILINEAR;
else if (strcmp(params.strInterp.c_str(), "nearest")==0)
pmorph->m_interpolationType = SAMPLE_NEAREST;
else pmorph->m_interpolationType = SAMPLE_TRILINEAR;
if (params.doTest)
{
std::cout << " Writing out some tests.\n";
SimpleTimer t1;
VOL_GEOM vgLike;
initVolGeom(&vgLike);
getVolGeom(pmorph->m_template, &vgLike);
MRI* mriOut = pmorph->apply_transforms(mriMoving,
true,
&vgLike);
std::cout << " morph completed in " << t1.elapsed_min() << " minutes\n";
MRIwrite(mriOut, "tmpout1.mgz");
MRIfree(&mriOut);
}
// produce the GCAM
GCA_MORPH* gcam = pmorph->exportGcam(mriMoving,
params.useBoundingBox,
params.threshold);
GCAMwrite( gcam,
const_cast<char*>
(params.strGcam.c_str()));
// test the presence of the gc structures -- LZ: WHAT DOES THAT DO???
GCAMnormalizeIntensities(gcam, mriFixed);
if ( params.doTest && (!params.useBoundingBox || 1) )
{
std::cout << " applying morph\n"
<< " width = " << gcam->width << std::endl;
MRI* mriOut = GCAMmorphToAtlas(mriMoving,
gcam,
mriFixed,
0,
pmorph->m_interpolationType);
std::cout << " AFTER MORPH\n";
std::cout << " out MRI params = "
<< " width = " << mriOut->width
<< " height = " << mriOut->height
<< " depth = " << mriOut->depth
//.........这里部分代码省略.........