Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkConnectomicsNetworkMapper3D.h
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 
18 #ifndef ConnectomicsNetworkMapper3D_H_HEADER_INCLUDED
19 #define ConnectomicsNetworkMapper3D_H_HEADER_INCLUDED
20 
21 // VTK includes
22 
23 #include <vtkSmartPointer.h>
24 #include "vtkPropAssembly.h"
25 
26 // MITK includes
27 // base class
28 #include "mitkVtkMapper.h"
29 
30 // data type
31 
33 
34 #include <vtkActor.h>
35 
36 #include <vtkPolyData.h>
37 #include <vtkSphereSource.h>
38 #include <vtkCellArray.h>
39 #include <vtkCellData.h>
40 #include <vtkDoubleArray.h>
41 #include <vtkPoints.h>
42 #include <vtkPolyLine.h>
43 #include <vtkLineSource.h>
44 #include <vtkProperty.h>
45 
46 #include <vtkTubeFilter.h>
47 #include <vtkPolyDataMapper.h>
48 
49 #include <vtkRenderWindow.h>
50 #include <vtkRenderer.h>
51 #include <vtkRenderWindowInteractor.h>
52 
53 #include <vtkInteractorStyleTrackballCamera.h>
54 #include <vtkInteractorStyleTrackball.h>
55 
56 #include <vtkRegularPolygonSource.h>
57 #include "mitkTextOverlay2D.h"
58 #include "mitkTextOverlay3D.h"
59 #include <vtkPolyDataMapper2D.h>
60 #include <vtkActor2D.h>
61 #include <vtkProperty2D.h>
62 #include <mitkOverlayManager.h>
64 #include "mitkVtkInteractorStyle.h"
65 
66 #include <vector>
67 #include <iostream>
68 #include <string>
69 
70 #include <MitkConnectomicsExports.h>
71 
72 namespace mitk {
73 
79  class MITKCONNECTOMICS_EXPORT ConnectomicsNetworkMapper3D : public VtkMapper
80  {
81  public:
82 
84  itkFactorylessNewMacro(Self)
85  itkCloneMacro(Self)
86 
87  virtual vtkProp *GetVtkProp(mitk::BaseRenderer *renderer) override; //looks like deprecated.. should be replaced bz GetViewProp()
88  static void SetDefaultProperties(DataNode* node, BaseRenderer* renderer = nullptr, bool overwrite = false );
89 
90  static void SetVtkMapperImmediateModeRendering(vtkMapper* mapper);
91 
92  virtual void GenerateDataForRenderer(mitk::BaseRenderer* renderer) override;
93 
94  virtual const mitk::ConnectomicsNetwork* GetInput();
95 
96  protected:
97 
99  virtual ~ConnectomicsNetworkMapper3D();
100 
101  void UpdateVtkObjects();
102 
103  vtkPropAssembly *m_NetworkAssembly;
104 
108  bool PropertiesChanged();
109 
110  // Create vectors for customizing color and radius and return maximum
111  double FillNodeParameterVector( std::vector< double > * parameterVector, std::string parameterName );
112  double FillEdgeParameterVector( std::vector< double > * parameterVector, std::string parameterName );
113 
114  void FillNodeFilterBoolVector( std::vector< bool > * boolVector, std::string parameterName );
115  void FillEdgeFilterBoolVector( std::vector< bool > * boolVector, std::string parameterName );
116 
117  // Property storing members
119  std::string m_ChosenEdgeFilter;
122  std::string m_ChosenNodeFilter;
129  std::string m_ChosenNodeLabel;
135  std::string m_NodeColorParameter;
137  std::string m_EdgeColorParameter;
138 
139  // Balloons
140  std::string m_BalloonText;
141  std::string m_BalloonNodeStats;
143  std::string m_AllNodeLabels;
144 
146  };
147 
148 } // namespace mitk
149 
150 #endif /* ConnectomicsNetworkMapper3D_H_HEADER_INCLUDED */
itk::SmartPointer< Self > Pointer
mitk::FreeSurferParcellationTranslator::Pointer m_Translator
Organizes the rendering process.
DataCollection - Class to facilitate loading/accessing structured data.
Base class of all Vtk Mappers in order to display primitives by exploiting Vtk functionality.
Definition: mitkVtkMapper.h:53
Base class of all mappers, Vtk as well as OpenGL mappers.
Definition: mitkMapper.h:54
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
Connectomics Network Class.
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66