Medical Imaging Interaction Toolkit  2018.4.99-4c24e3cb
Medical Imaging Interaction Toolkit
Step8.cpp
/*============================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.
Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.
============================================================================*/
#include "Step8.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
//##Documentation
//## @brief As Step6, but with QmitkStdMultiWidget as widget
Step8::Step8(int argc, char *argv[], QWidget *parent) : Step6(argc, argv, parent)
{
}
{
//*************************************************************************
// Part I: Create windows and pass the tree to it
//*************************************************************************
// Create toplevel widget with vertical layout
QVBoxLayout *vlayout = new QVBoxLayout(this);
vlayout->setMargin(0);
vlayout->setSpacing(2);
// Create viewParent widget with horizontal layout
QWidget *viewParent = new QWidget(this);
vlayout->addWidget(viewParent);
QHBoxLayout *hlayout = new QHBoxLayout(viewParent);
hlayout->setMargin(0);
//*************************************************************************
// Part Ia: create and initialize QmitkStdMultiWidget
//*************************************************************************
QmitkStdMultiWidget *multiWidget = new QmitkStdMultiWidget(viewParent);
hlayout->addWidget(multiWidget);
// Tell the multiWidget which DataStorage to render
// Initialize views as axial, sagittal, coronar (from
// top-left to bottom)
auto geo = m_DataStorage->ComputeBoundingGeometry3D(m_DataStorage->GetAll());
// Initialize bottom-right view as 3D view
// Add the displayed views to the DataStorage to see their positions in 2D and 3D
multiWidget->AddDisplayPlaneSubTree();
multiWidget->AddPlanesToDataStorage();
multiWidget->SetWidgetPlanesVisibility(true);
//*************************************************************************
// Part II: Setup standard interaction with the mouse
//*************************************************************************
}