Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkMlbstTrainingDataWidget.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 
17 //Qmitk headers
19 
22 #include <mitkNodePredicateAnd.h>
23 #include <mitkNodePredicateNot.h>
24 #include <mitkNodePredicateOr.h>
25 #include <mitkNodePredicateIsDWI.h>
26 #include <mitkFiberBundle.h>
27 
28 const std::string QmitkMlbstTrainingDataWidget::VIEW_ID = "org.mitk.views.DotModelParametersWidget";
29 
31  : QWidget(parent)
32 {
33  m_Controls = nullptr;
34  this->CreateQtPartControl(this);
35 }
36 
38 {
39 }
40 
42 {
43  if (!m_Controls)
44  {
45  // create GUI widgets
46  m_Controls = new Ui::QmitkMlbstTrainingDataWidgetControls;
47  m_Controls->setupUi(parent);
48 
50 
52 
53  m_Controls->image->SetPredicate(isDiffusionImage);
54  m_Controls->fibers->SetPredicate(isFib);
55 
57  mitk::NodePredicateNot::Pointer noDiffusionImage = mitk::NodePredicateNot::New(isDiffusionImage);
58  mitk::NodePredicateAnd::Pointer finalPredicate = mitk::NodePredicateAnd::New(isMitkImage, noDiffusionImage);
60  finalPredicate = mitk::NodePredicateAnd::New(finalPredicate, isBinaryPredicate);
61 
62  m_Controls->mask->SetPredicate(finalPredicate);
63  m_Controls->whiteMatter->SetPredicate(finalPredicate);
64  }
65 }
static Pointer New()
virtual void CreateQtPartControl(QWidget *parent)
QmitkMlbstTrainingDataWidget(QWidget *parent=nullptr, Qt::WindowFlags f=nullptr)
static Pointer New()
static Pointer New(const mitk::NodePredicateBase *_arg)
static Pointer New(const char *_arg)
Ui::QmitkMlbstTrainingDataWidgetControls * m_Controls
static Pointer New()