本文整理汇总了C++中LayerSurface::HasCurvature方法的典型用法代码示例。如果您正苦于以下问题:C++ LayerSurface::HasCurvature方法的具体用法?C++ LayerSurface::HasCurvature怎么用?C++ LayerSurface::HasCurvature使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LayerSurface
的用法示例。
在下文中一共展示了LayerSurface::HasCurvature方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateAll
//.........这里部分代码省略.........
{
labelStrg = ((LayerPLabel*)layer)->GetLabelName(m_dRAS);
}
else
{
labelStrg = layer->GetLabelName( dvalue );
}
if (!labelStrg.isEmpty())
{
strg += " " + labelStrg;
}
item->setText(1, strg);
map.clear();
map["Type"] = "MRI";
map["EditableText"] = editable;
map["Object"] = QVariant::fromValue((QObject*)layer);
item->setData(1, Qt::UserRole, map);
}
}
for (int i = 0; i < lc_surf->GetNumberOfLayers(); i++)
{
LayerSurface* surf = (LayerSurface*)lc_surf->GetLayer(i);
if ( surf->GetProperty()->GetShowInfo() )
{
QTreeWidgetItem* item = new QTreeWidgetItem(this);
item->setText(0, surf->GetName());
double sf_pos[3];
surf->GetSurfaceRASAtTarget( m_dRAS, sf_pos );
QString editable = QString("%1, %2, %3")
.arg(sf_pos[0], 0, 'f', 2)
.arg(sf_pos[1], 0, 'f', 2)
.arg(sf_pos[2], 0, 'f', 2);
item->setText(1, QString("SurfaceRAS\t[%1]").arg(editable));
map.clear();
map["Type"] = "SurfaceRAS";
map["EditableText"] = editable;
map["Object"] = QVariant::fromValue((QObject*)surf);
item->setData(1, Qt::UserRole, map);
int nVertex = surf->GetVertexIndexAtTarget( m_dRAS, NULL );
if ( nVertex >= 0 )
{
surf->GetSurfaceRASAtVertex( nVertex, sf_pos );
QTreeWidgetItem* item = new QTreeWidgetItem(this);
item->setText(1, QString("Vertex \t%1 [%2, %3, %4]")
.arg(nVertex)
.arg(sf_pos[0], 0, 'f', 2)
.arg(sf_pos[1], 0, 'f', 2)
.arg(sf_pos[2], 0, 'f', 2));
map.clear();
map["Type"] = "SurfaceVertex";
map["EditableText"] = QString::number(nVertex);
map["Object"] = QVariant::fromValue((QObject*)surf);
item->setData(1, Qt::UserRole, map);
double vec[3];
surf->GetNormalAtVertex( nVertex, vec );
item = new QTreeWidgetItem(this);
item->setText(1, QString("Normal \t[%1, %2, %3]")
.arg(vec[0], 0, 'f', 2)
.arg(vec[1], 0, 'f', 2)
.arg(vec[2], 0, 'f', 2));
if ( surf->GetActiveVector() >= 0 )
{
surf->GetVectorAtVertex( nVertex, vec );
item = new QTreeWidgetItem(this);
item->setText(1, QString("Vector \t[%1, %2, %3]")
.arg(vec[0], 0, 'f', 2)
.arg(vec[1], 0, 'f', 2)
.arg(vec[2], 0, 'f', 2));
}
if ( surf->HasCurvature() )
{
item = new QTreeWidgetItem(this);
item->setText(1, QString("Curvature \t%1").arg(surf->GetCurvatureValue(nVertex)));
}
int nOverlays = surf->GetNumberOfOverlays();
for ( int i = 0; i < nOverlays; i++ )
{
SurfaceOverlay* overlay = surf->GetOverlay( i );
item = new QTreeWidgetItem(this);
item->setText(1, QString("%1 \t%2").arg(overlay->GetName()).arg(overlay->GetDataAtVertex( nVertex )));
}
int nAnnotations = surf->GetNumberOfAnnotations();
for ( int i = 0; i < nAnnotations; i++ )
{
SurfaceAnnotation* annot = surf->GetAnnotation( i );
item = new QTreeWidgetItem(this);
item->setText(1, QString("%1 \t%2").arg(annot->GetName()).arg(annot->GetAnnotationNameAtVertex( nVertex )));
}
}
}
}
}