Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkFreeSurferParcellationWidget.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
18 
20  QWidget( parent ),
21  m_Handler( new QmitkFreeSurferParcellationHandler() )
22 {
23  this->m_View.setupUi( this );
24  this->connect( this->m_Handler, SIGNAL(clicked(QString)), this, SLOT(OnHandlerClicked(QString)) );
25  this->connect( this->m_Handler, SIGNAL(changed(QString)), this, SLOT(OnHandlerHovered(QString)) );
26 }
27 
29 {
30  if( m_Handler )
31  {
32  this->disconnect( this->m_Handler, SIGNAL(clicked(QString)), this, SLOT(OnHandlerClicked(QString)) );
33  this->disconnect( this->m_Handler, SIGNAL(changed(QString)), this, SLOT(OnHandlerHovered(QString)) );
34  delete m_Handler;
35  m_Handler = NULL;
36  }
37 }
38 
40 {
41  this->m_View.clickedLabel->setText( name );
42  emit this->Clicked( name );
43 }
44 
46 {
47  this->m_View.hoveredLabel->setText( name + " hovered" );
48  emit this->Hovered( name );
49 }
This handler returns either the pixelvalue or anatomical label of the current position of the crossha...
void Hovered(const QString &)
Emitted when anatomical region is hovered.
void Clicked(const QString &)
Emitted when anatomical region is clicked.