本文整理汇总了C++中LayerSurface::RepositionSurface方法的典型用法代码示例。如果您正苦于以下问题:C++ LayerSurface::RepositionSurface方法的具体用法?C++ LayerSurface::RepositionSurface怎么用?C++ LayerSurface::RepositionSurface使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LayerSurface
的用法示例。
在下文中一共展示了LayerSurface::RepositionSurface方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnApply
void DialogRepositionSurface::OnApply()
{
LayerSurface* surf = (LayerSurface*)MainWindow::GetMainWindow()->GetActiveLayer("Surface");
LayerMRI* mri = (LayerMRI*)MainWindow::GetMainWindow()->GetActiveLayer("MRI");
QString msg;
if ( !surf )
msg = "No active surface found.";
else if ( !mri && ui->tabWidget->currentIndex() == 0)
msg = "No active volume found.";
if (!msg.isEmpty())
{
QMessageBox::warning(this, "Error", msg);
return;
}
if (ValidateAll())
{
ui->pushButtonApply->setDisabled(true);
if (ui->tabWidget->currentIndex() == 0)
{
if (ui->comboBoxTarget->currentIndex() == 0)
{
surf->RepositionSurface(mri, GetVertex(),
GetIntensity(),
GetNeighborSize(),
GetSigma(),
GetFlags());
}
else
{
double pos[3];
GetCoordinate(pos);
surf->RepositionSurface( mri, GetVertex(),
pos,
GetNeighborSize(),
GetSigma(),
GetFlags());
}
}
else if (ui->tabWidget->currentIndex() == 1)
{
double pos[3];
GetCoordinate(pos);
surf->RepositionVertex(GetVertex(), pos);
}
else
{
surf->RepositionSmoothSurface(GetVertex(), GetNeighborSize(), GetSmoothingSteps());
}
UpdateUI();
ui->pushButtonApply->setDisabled(false);
QTimer::singleShot(0, MainWindow::GetMainWindow(), SIGNAL(SlicePositionChanged()));
}
}
示例2: OnApply
void DialogRepositionSurface::OnApply( wxCommandEvent& event )
{
LayerSurface* surf = (LayerSurface*)MainWindow::GetMainWindowPointer()->GetActiveLayer( "Surface" );
LayerMRI* mri = (LayerMRI*)MainWindow::GetMainWindowPointer()->GetActiveLayer( "MRI" );
wxString msg;
if ( !surf )
msg = _("No active surface found.");
else if ( !mri )
msg = _("No active volume found." );
if ( !msg.IsEmpty() )
{
wxMessageDialog dlg( this, msg, _("Error"), wxOK );
dlg.ShowModal();
return;
}
if ( ValidateAll() )
{
if ( m_choiceTarget->GetCurrentSelection() == 0 )
{
surf->RepositionSurface( mri, GetVertex(),
GetIntensity(),
GetNeighborSize(),
GetSigma() );
}
else
{
double pos[3];
GetCoordinate( pos );
surf->RepositionSurface( mri, GetVertex(),
pos,
GetNeighborSize(),
GetSigma() );
}
UpdateUI();
}
}