当前位置: 首页>>代码示例>>C++>>正文


C++ LayerSurface::GetProperties方法代码示例

本文整理汇总了C++中LayerSurface::GetProperties方法的典型用法代码示例。如果您正苦于以下问题:C++ LayerSurface::GetProperties方法的具体用法?C++ LayerSurface::GetProperties怎么用?C++ LayerSurface::GetProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LayerSurface的用法示例。


在下文中一共展示了LayerSurface::GetProperties方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnTextOpacity

void PanelSurface::OnTextOpacity( wxCommandEvent& event )
{
  double dvalue;
  if ( m_textOpacity->GetValue().ToDouble( &dvalue ) )
  {
    LayerSurface* layer = ( LayerSurface* )( void* )m_listBoxLayers->GetClientData( m_listBoxLayers->GetSelection() );
    if ( layer && layer->GetProperties()->GetOpacity() != dvalue )
    {
      layer->GetProperties()->SetOpacity( dvalue );
    }
  }
}
开发者ID:CBoensel,项目名称:freesurfer,代码行数:12,代码来源:PanelSurface.cpp

示例2: OnCheckHideInfo

void PanelSurface::OnCheckHideInfo( wxCommandEvent& event )
{
  LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer();
  if ( surf )
  {
    surf->GetProperties()->SetShowInfo( !event.IsChecked() );
  }  
}
开发者ID:CBoensel,项目名称:freesurfer,代码行数:8,代码来源:PanelSurface.cpp

示例3: OnChoiceMeshColorMap

void PanelSurface::OnChoiceMeshColorMap( wxCommandEvent& event )
{
  LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer();
  if ( surf )
  {
    surf->GetProperties()->SetMeshColorMap( event.GetSelection() );
  }  
}
开发者ID:CBoensel,项目名称:freesurfer,代码行数:8,代码来源:PanelSurface.cpp

示例4: OnSpinVectorPointSize

void PanelSurface::OnSpinVectorPointSize( wxSpinEvent& event )
{
  LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer();
  if ( surf )
  {
    surf->GetProperties()->SetVectorPointSize( event.GetInt() );
  }
}
开发者ID:CBoensel,项目名称:freesurfer,代码行数:8,代码来源:PanelSurface.cpp

示例5: OnSliderOpacity

void PanelSurface::OnSliderOpacity( wxScrollEvent& event )
{
  if ( m_listBoxLayers->GetSelection() != wxNOT_FOUND )
  {
    LayerSurface* layer = ( LayerSurface* )( void* )m_listBoxLayers->GetClientData( m_listBoxLayers->GetSelection() );
    if ( layer )
      layer->GetProperties()->SetOpacity( event.GetPosition() / 100.0 );
  }
}
开发者ID:CBoensel,项目名称:freesurfer,代码行数:9,代码来源:PanelSurface.cpp

示例6: OnVectorColorChanged

void PanelSurface::OnVectorColorChanged( wxColourPickerEvent& event )
{
  LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer();
  if ( surf )
  {
    wxColour c = event.GetColour();
    surf->GetProperties()->SetVectorColor( c.Red()/255.0, c.Green()/255.0, c.Blue()/255.0 );
  }
}
开发者ID:CBoensel,项目名称:freesurfer,代码行数:9,代码来源:PanelSurface.cpp

示例7: OnSliderMidPoint

void PanelSurface::OnSliderMidPoint( wxScrollEvent& event )
{
  LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer();
  if ( surf )
  {
    double range[2];
    surf->GetCurvatureRange( range );
    surf->GetProperties()->SetThresholdMidPoint( (double)m_sliderMidPoint->GetValue() / 100.0 * ( range[1] - range[0] ) + range[0] );
  }
}
开发者ID:CBoensel,项目名称:freesurfer,代码行数:10,代码来源:PanelSurface.cpp

示例8: OnSliderSlope

void PanelSurface::OnSliderSlope( wxScrollEvent& event )
{
  LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer();
  if ( surf )
  {
    double fMin = 0;
    double fMax = 100;
    surf->GetProperties()->SetThresholdSlope( (double)m_sliderSlope->GetValue() / 100.0 * ( fMax - fMin ) + fMin );
  }
}
开发者ID:CBoensel,项目名称:freesurfer,代码行数:10,代码来源:PanelSurface.cpp

示例9: OnChoiceCurvatureMap

void PanelSurface::OnChoiceCurvatureMap( wxCommandEvent& event )
{
  LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer();
  if ( surf )
  {
    if ( event.GetSelection() < 3 )
      surf->GetProperties()->SetCurvatureMap( event.GetSelection() );
    else
    {
      // load new curvature maps
      MainWindow::GetMainWindowPointer()->LoadSurfaceCurvature();
    }
    UpdateUI();
  }
}
开发者ID:CBoensel,项目名称:freesurfer,代码行数:15,代码来源:PanelSurface.cpp

示例10: OnTextPosition

void PanelSurface::OnTextPosition( wxCommandEvent& event )
{
  wxArrayString sa = MyUtils::SplitString( m_textPosition->GetValue(), _(",") );
  if ( sa.Count() < 3 )
    sa = MyUtils::SplitString( m_textPosition->GetValue(), _(" ") );
  
  double pos[3];
  if ( sa.Count() < 3 || !sa[0].ToDouble( pos ) || !sa[1].ToDouble( pos+1 ) || !sa[2].ToDouble( pos+2 ) )
  {
    cerr << "Please enter 3 numbers." << endl;
    return;
  }
      
  LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer();
  if ( surf )
  {
    surf->GetProperties()->SetPosition( pos );
    UpdateUI();
  }  
}
开发者ID:CBoensel,项目名称:freesurfer,代码行数:20,代码来源:PanelSurface.cpp

示例11: DoUpdateUI

void PanelSurface::DoUpdateUI()
{
  if ( !IsShown() )
    return;
  
  bool bHasSurface = ( m_listBoxLayers->GetSelection() != wxNOT_FOUND );
  wxWindowList children = XRCCTRL( *this, "ID_SCROLL_WINDOW", wxScrolledWindow )->GetChildren();
  wxWindowList::iterator it = children.begin(), end = children.end();
  for (; it != end; it++)
  {
    if ( !(*it)->IsKindOf(CLASSINFO(wxToolBar) ) && *it != m_listBoxLayers )
      (*it)->Enable( bHasSurface );
  }

  LayerSurface* layer = NULL;
  FSSurface* surf = NULL;
  if ( bHasSurface )
  {
    LayerCollection* lc = MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" );
    for ( int i = 0; i < (int)m_listBoxLayers->GetCount() && i < lc->GetNumberOfLayers(); i++ )
      m_listBoxLayers->Check( i, lc->GetLayer( i )->IsVisible() );
    layer = ( LayerSurface* )( void* )m_listBoxLayers->GetClientData( m_listBoxLayers->GetSelection() );
    if ( layer )
    {
      m_sliderOpacity->SetValue( (int)( layer->GetProperties()->GetOpacity() * 100 ) );
      UpdateTextValue( m_textOpacity, layer->GetProperties()->GetOpacity() );
      double* rgb = layer->GetProperties()->GetBinaryColor();
      m_colorPicker->SetColour( wxColour( (int)(rgb[0]*255), (int)(rgb[1]*255), (int)(rgb[2]*255) ) );
      rgb = layer->GetProperties()->GetEdgeColor();
      m_colorPickerEdge->SetColour( wxColour( (int)(rgb[0]*255), (int)(rgb[1]*255), (int)(rgb[2]*255) ) );
      rgb = layer->GetProperties()->GetVectorColor();
      m_colorPickerVector->SetColour( wxColour( (int)(rgb[0]*255), (int)(rgb[1]*255), (int)(rgb[2]*255) ) );
      m_textFileName->ChangeValue( wxString::FromAscii( layer->GetFileName() ) );
      m_textFileName->SetInsertionPointEnd();
      m_textFileName->ShowPosition( m_textFileName->GetLastPosition() );
      m_spinEdgeThickness->SetValue( layer->GetProperties()->GetEdgeThickness() );
      m_spinVectorPointSize->SetValue( layer->GetProperties()->GetVectorPointSize() );

      m_choiceCurvatureMap->SetSelection( layer->GetProperties()->GetCurvatureMap() );

      UpdateTextValue( m_textMidPoint,  layer->GetProperties()->GetThresholdMidPoint()  );
      UpdateTextValue( m_textSlope,   layer->GetProperties()->GetThresholdSlope()  );
      double range[2];
      layer->GetCurvatureRange( range );
      m_sliderMidPoint->SetValue( (int) ( ( layer->GetProperties()->GetThresholdMidPoint() - range[0] ) / ( range[1] - range[0] ) * 100 ) );
      m_sliderSlope->SetValue( (int) ( layer->GetProperties()->GetThresholdSlope() ) );

      surf = layer->GetSourceSurface();     
       
      m_choiceRenderMode->SetSelection( layer->GetProperties()->GetSurfaceRenderMode() );
      m_choiceMeshColorMap->SetSelection( layer->GetProperties()->GetMeshColorMap() );
      m_checkShowVertices->SetValue( layer->GetProperties()->GetShowVertices() );
      rgb = layer->GetProperties()->GetVertexColor();
      m_colorPickerVertex->SetColour( wxColour( (int)(rgb[0]*255), (int)(rgb[1]*255), (int)(rgb[2]*255) ) );     
      m_spinVertexPointSize->SetValue( layer->GetProperties()->GetVertexPointSize() );
      
      double* dPos = layer->GetProperties()->GetPosition();
      wxString value_strg = ( (wxString)_("") << dPos [0] << _(" ") << dPos[1] << _(" ") << dPos[2] );
      m_textPosition->ChangeValue( value_strg );
      
      m_checkHideInfo->SetValue( !layer->GetProperties()->GetShowInfo() );
    }

    lc->SetActiveLayer( ( Layer* )m_listBoxLayers->GetClientData( m_listBoxLayers->GetSelection() ) );
  }

  m_choiceVector->Clear();
  m_choiceVector->Append( _("Off") );
  if ( surf )
  {
    for ( int i = 0; i < surf->GetNumberOfVectorSets(); i++ )
    {
      m_choiceVector->Append( wxString::FromAscii( surf->GetVectorSetName( i ) ) );
    }
  }
  m_choiceVector->Append( _("Load vector data...") );
  m_choiceVector->SetSelection( surf ? 1 + surf->GetActiveVector() : 0 );
  
  // update overlay controls
  m_choiceOverlay->Clear();
  m_choiceOverlay->Append( _("Off") );
  if ( layer )
  {
    for ( int i = 0; i < layer->GetNumberOfOverlays(); i++ )
    {
      m_choiceOverlay->Append( wxString::FromAscii( layer->GetOverlay( i )->GetName() ) );
    }
  }
  m_choiceOverlay->Append( _("Load from file...") );
  m_choiceOverlay->SetSelection( layer ? 1 + layer->GetActiveOverlayIndex() : 0 );
  
  m_btnOverlayConfiguration->Show( layer && layer->GetActiveOverlayIndex() >= 0 );
  
  // update annotation controls
  m_choiceAnnotation->Clear();
  m_choiceAnnotation->Append( _("Off") );
  if ( layer )
  {
    for ( int i = 0; i < layer->GetNumberOfAnnotations(); i++ )
    {
//.........这里部分代码省略.........
开发者ID:CBoensel,项目名称:freesurfer,代码行数:101,代码来源:PanelSurface.cpp


注:本文中的LayerSurface::GetProperties方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。