本文整理汇总了C++中LayerMRI::GetActiveFrame方法的典型用法代码示例。如果您正苦于以下问题:C++ LayerMRI::GetActiveFrame方法的具体用法?C++ LayerMRI::GetActiveFrame怎么用?C++ LayerMRI::GetActiveFrame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LayerMRI
的用法示例。
在下文中一共展示了LayerMRI::GetActiveFrame方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnFrameChanged
void WindowTimeCourse::OnFrameChanged(int frame)
{
LayerMRI* layer = qobject_cast<LayerMRI*>(MainWindow::GetMainWindow()->GetActiveLayer("MRI"));
if (layer && frame != layer->GetActiveFrame() && frame < layer->GetNumberOfFrames())
{
layer->SetActiveFrame(frame);
}
}
示例2: UpdateData
void WindowTimeCourse::UpdateData()
{
LayerMRI* layer = qobject_cast<LayerMRI*>(MainWindow::GetMainWindow()->GetActiveLayer("MRI"));
if (layer && layer->GetNumberOfFrames() > 1)
{
double ras[3];
int n[3];
MainWindow::GetMainWindow()->GetLayerCollection("MRI")->GetSlicePosition(ras);
layer->RemapPositionToRealRAS(ras, ras);
layer->RASToOriginalIndex(ras, n);
QList<double> data;
for (int i = 0; i < layer->GetNumberOfFrames(); i++)
data << layer->GetVoxelValueByOriginalIndex(n[0], n[1], n[2], i);
FSVolume* vol = layer->GetSourceVolume();
ui->widgetPlot->SetTimeCourseData(data, vol->GetMinValue(), vol->GetMaxValue(), layer->GetTR());
ui->widgetPlot->SetCurrentFrame(layer->GetActiveFrame());
}
}
示例3: OnEditContourValue
void ToolWindowEdit::OnEditContourValue( wxCommandEvent& event )
{
double value;
if ( m_editContourValue->GetValue().ToDouble( &value ) && value > 0 )
{
BrushProperty* bp = MainWindow::GetMainWindowPointer()->GetBrushProperty();
LayerMRI* mri = (LayerMRI*)bp->GetReferenceLayer();
for ( int i = 0; i < 3; i++ )
{
RenderView2D* view = ( RenderView2D* )MainWindow::GetMainWindowPointer()->GetRenderView( i );
Contour2D* c2d = view->GetContour2D();
if ( c2d->GetInputImage() )
c2d->SetContourValue( value );
else if ( mri )
{
c2d->SetInput( mri->GetSliceImageData( view->GetViewPlane() ), value, mri->GetSlicePosition()[i], mri->GetActiveFrame() );
c2d->SetVisible( true );
}
}
UpdateTools();
}
}