Package: itksnap / 3.4.0-2

02_vtk_6.3.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
--- a/GUI/Qt/View/GenericView3D.cxx
+++ b/GUI/Qt/View/GenericView3D.cxx
@@ -23,7 +23,7 @@
 {
 public:
   static CursorPlacementInteractorStyle* New();
-  vtkTypeRevisionMacro(CursorPlacementInteractorStyle, vtkInteractorStyleTrackballCamera)
+  vtkTypeMacro(CursorPlacementInteractorStyle, vtkInteractorStyleTrackballCamera)
 
   irisGetSetMacro(Model, Generic3DModel *)
 
@@ -46,7 +46,7 @@
 {
 public:
   static SpraycanInteractorStyle* New();
-  vtkTypeRevisionMacro(SpraycanInteractorStyle, vtkInteractorStyleTrackballCamera)
+  vtkTypeMacro(SpraycanInteractorStyle, vtkInteractorStyleTrackballCamera)
 
   irisGetSetMacro(Model, Generic3DModel *)
 
@@ -99,7 +99,7 @@
 {
 public:
   static ScalpelInteractorStyle* New();
-  vtkTypeRevisionMacro(ScalpelInteractorStyle, vtkInteractorStyleTrackballCamera)
+  vtkTypeMacro(ScalpelInteractorStyle, vtkInteractorStyleTrackballCamera)
 
   irisGetSetMacro(Model, Generic3DModel *)
 
@@ -189,13 +189,10 @@
 
 
 
-vtkCxxRevisionMacro(CursorPlacementInteractorStyle, "$Revision: 1.1 $")
 vtkStandardNewMacro(CursorPlacementInteractorStyle)
 
-vtkCxxRevisionMacro(SpraycanInteractorStyle, "$Revision: 1.1 $")
 vtkStandardNewMacro(SpraycanInteractorStyle)
 
-vtkCxxRevisionMacro(ScalpelInteractorStyle, "$Revision: 1.1 $")
 vtkStandardNewMacro(ScalpelInteractorStyle)
 
 
--- a/GUI/Renderer/IntensityCurveVTKRenderer.cxx
+++ b/GUI/Renderer/IntensityCurveVTKRenderer.cxx
@@ -326,12 +326,11 @@
   {
     this->MouseMoved = false;
 
-    if (mouse.Button == vtkContextMouseEvent::LEFT_BUTTON)
+    if (mouse.GetButton() == vtkContextMouseEvent::LEFT_BUTTON)
       {
-      double pos[2];
-      pos[0] = mouse.Pos[0];
-      pos[1] = mouse.Pos[1];
-      vtkIdType pointUnderMouse = this->FindPoint(pos);
+      vtkVector2f pos = mouse.GetPos();
+      double p[2] = {pos[0], pos[1]}; 
+      vtkIdType pointUnderMouse = this->FindPoint(p);
       this->SetCurrentPoint(pointUnderMouse);
       return true;
       }
--- a/GUI/Renderer/Window3DPicker.cxx
+++ b/GUI/Renderer/Window3DPicker.cxx
@@ -114,6 +114,5 @@
   m_Model = NULL;
 }
 
-vtkCxxRevisionMacro(Window3DPicker, "$Revision: 1.1 $")
 vtkStandardNewMacro(Window3DPicker)
 
--- a/GUI/Renderer/Window3DPicker.h
+++ b/GUI/Renderer/Window3DPicker.h
@@ -11,7 +11,7 @@
 public:
   static Window3DPicker *New();
 
-  vtkTypeRevisionMacro(Window3DPicker, vtkPicker)
+  vtkTypeMacro(Window3DPicker, vtkPicker)
 
   irisGetSetMacro(Model, Generic3DModel *)
 
--- a/Logic/LevelSet/SnakeParametersPreviewPipeline.cxx
+++ b/Logic/LevelSet/SnakeParametersPreviewPipeline.cxx
@@ -221,9 +221,9 @@
       m_CurrentCurve.reserve(pd->GetNumberOfCells() * 2);
       for(int i=0;i<pd->GetNumberOfCells();i++)
         {
-        vtkFloatingPointType *pt1 = pd->GetPoint(pd->GetCell(i)->GetPointId(0));
+        double *pt1 = pd->GetPoint(pd->GetCell(i)->GetPointId(0));
         m_CurrentCurve.push_back(Vector2d(pt1[0] + 0.5,pt1[1] + 0.5));
-        vtkFloatingPointType *pt2 = pd->GetPoint(pd->GetCell(i)->GetPointId(1));
+        double *pt2 = pd->GetPoint(pd->GetCell(i)->GetPointId(1));
         m_CurrentCurve.push_back(Vector2d(pt2[0] + 0.5,pt2[1] + 0.5));
         }
       }
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -886,7 +886,6 @@
   vtkRenderingCore
   vtkRenderingFreeType
   vtkRenderingFreeTypeFontConfig
-  vtkRenderingFreeTypeOpenGL
   vtkRenderingOpenGL
   vtkRenderingMatplotlib
   vtkRenderingVolume
@@ -904,6 +903,10 @@
   vtkIOMPIParallel
 )
 
+IF ((VTK_MAJOR_VERSION EQUAL 6) AND (VTK_MINOR_VERSION LESS 3))
+  SET(SNAP_VTK_LIBS "${SNAP_VTK_LIBS}" vtkRenderingFreeTypeOpenGL)
+ENDIF()
+
 # System libraries
 SET(SNAP_SYSTEM_LIBS
   ${OPENGL_LIBRARIES}