aboutsummaryrefslogtreecommitdiff
path: root/ports/itk/rtk/already_defined.patch
blob: 60b75e3eb961270ff3b67baec33b4797fdfab727 (plain)
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
diff --git a/include/rtkProjectionGeometry.h b/include/rtkProjectionGeometry.h
index e5831611f..73ed2b74f 100644
--- a/include/rtkProjectionGeometry.h
+++ b/include/rtkProjectionGeometry.h
@@ -23,6 +23,7 @@
 
 #include <vector>
 
+#include "RTKExport.h"
 #include "rtkMacro.h"
 
 namespace rtk
@@ -67,25 +68,18 @@ public:
    * with the i-th matrix provides the physical coordinate on
    * the i-th projection.
    */
-  const std::vector<MatrixType> &
-  GetMatrices() const
-  {
-    return this->m_Matrices;
-  }
+  itkGetConstReferenceMacro(Matrices,std::vector<MatrixType>)
 
   /** Get the i-th projection matrix. */
   MatrixType
-  GetMatrix(const unsigned int i) const
-  {
-    return this->m_Matrices[i];
-  }
+  GetMatrix(const unsigned int i) const;
 
   /** Empty the geometry object. */
   virtual void
   Clear();
 
 protected:
-  ProjectionGeometry() = default;
+  ProjectionGeometry();
   ~ProjectionGeometry() override = default;
 
   void
@@ -93,11 +87,7 @@ protected:
 
   /** Add projection matrix */
   virtual void
-  AddMatrix(const MatrixType & m)
-  {
-    this->m_Matrices.push_back(m);
-    this->Modified();
-  }
+  AddMatrix(const MatrixType & m);
 
 private:
   /** Projection matrices */
@@ -105,6 +95,9 @@ private:
 };
 } // namespace rtk
 
-#include "rtkProjectionGeometry.hxx"
+#ifndef ITK_MANUAL_INSTANTIATION
+#   include "rtkProjectionGeometry.hxx"
+#endif
+
 
 #endif // rtkProjectionGeometry_h
diff --git a/include/rtkProjectionGeometry.hxx b/include/rtkProjectionGeometry.hxx
index 192265812..97dfe8c3a 100644
--- a/include/rtkProjectionGeometry.hxx
+++ b/include/rtkProjectionGeometry.hxx
@@ -23,6 +23,8 @@
 
 namespace rtk
 {
+template <unsigned int TDimension>
+ProjectionGeometry<TDimension>::ProjectionGeometry() = default;
 
 template <unsigned int TDimension>
 void
@@ -43,6 +45,21 @@ ProjectionGeometry<TDimension>::Clear()
   this->Modified();
 }
 
+template <unsigned int TDimension>
+typename ProjectionGeometry<TDimension>::MatrixType
+ProjectionGeometry<TDimension>::GetMatrix(const unsigned int i) const
+{
+  return this->m_Matrices[i];
+}
+
+template <unsigned int TDimension>
+void
+ProjectionGeometry<TDimension>::AddMatrix(const typename ProjectionGeometry<TDimension>::MatrixType & m)
+{
+  this->m_Matrices.push_back(m);
+  this->Modified();
+}
+
 } // namespace rtk
 
 #endif // rtkProjectionGeometry_hxx