MNE-CPP  beta 1.0
view3d.cpp
Go to the documentation of this file.
1 //=============================================================================================================
40 //*************************************************************************************************************
41 //=============================================================================================================
42 // INCLUDES
43 //=============================================================================================================
44 
45 #include "view3d.h"
46 
47 
48 //*************************************************************************************************************
49 //=============================================================================================================
50 // FORWARD DECLARATIONS
51 // View3D constructor
52 //=============================================================================================================
53 
54 View3D::View3D(int surface_type)
55 {
56  //Resizing the created QMdiSubwindow to fit the minimun size of the container used later
57  this->resize(256,256);
58  //QGridLayout is used so the container constantly resizes to the size of the QMdiSubwindow
59  m_view3d_gridlayout = new QGridLayout(this);
60 
61  //*************************************************************************************************************
62  //=============================================================================================================
63  // Loading a FreeSurfer example from BrainView class
64  //=============================================================================================================
65 
66  switch(surface_type){
67  case 1:
68  //
69  // pial
70  //
71  m_BrainView = new BrainView("sample", 2, "pial", "./MNE-sample-data/subjects");
72  break;
73  case 2:
74  //
75  // inflated
76  //
77  m_BrainView = new BrainView("sample", 2, "inflated", "./MNE-sample-data/subjects");
78  break;
79  case 3:
80  //
81  // orig
82  //
83  m_BrainView = new BrainView("sample", 2, "orig", "./MNE-sample-data/subjects");
84  break;
85  case 4:
86  //
87  // white
88  //
89  m_BrainView = new BrainView("sample", 2, "white", "./MNE-sample-data/subjects");
90  break;
91  }
92  //A container is created to contain the QWindow that comes from BrainView, then a minimum size is set
93  m_view3d_container = QWidget::createWindowContainer(m_BrainView);
94  m_view3d_container->setMinimumSize(256,256);
95  //m_view3d_container->setMaximumSize(256,256);
96  m_view3d_container->setFocusPolicy(Qt::TabFocus);
97  //The loaded surfaces, as a QWindow is added to the created container
98  m_view3d_gridlayout->addWidget(m_view3d_container);
99 }
100 //*************************************************************************************************************
101 //=============================================================================================================
102 // View3D destructor
103 //=============================================================================================================
104 
105 View3D::~View3D()
106 {
107 
108 }
109 
FreeSurfer surface visualisation.
Definition: brainview.h:106