Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MITKVECHELPER_H_HEADER_INCLUDED_C1EBD0AD
00020 #define MITKVECHELPER_H_HEADER_INCLUDED_C1EBD0AD
00021
00022 #include "mitkVector.h"
00023 #include "vecmath.h"
00024
00025 namespace mitk {
00026
00027
00028 template <class T>
00029 inline void vm2itk(const Point3<T>& p, Point3D& a)
00030 {
00031 a[0]=p.x;
00032 a[1]=p.y;
00033 a[2]=p.z;
00034 }
00035
00036 template <class T>
00037 inline void itk2vm(const Point3D& a, Point3<T> & p)
00038 {
00039 p.set(a[0], a[1], a[2]);
00040 }
00041
00042 template <class T>
00043 inline void vm2itk(const Vector3<T>& p, Vector3D& a)
00044 {
00045 a[0]=p.x;
00046 a[1]=p.y;
00047 a[2]=p.z;
00048 }
00049
00050 template <class T>
00051 inline void itk2vm(const Vector3D& a, Vector3<T> & p)
00052 {
00053 p.set(a[0], a[1], a[2]);
00054 }
00055
00056 template <class T>
00057 inline void vm2itk(const Vector3<T>& p, VnlVector& a)
00058 {
00059 a[0]=p.x;
00060 a[1]=p.y;
00061 a[2]=p.z;
00062 }
00063
00064 template <class T>
00065 inline void itk2vm(const VnlVector& a, Vector3<T> & p)
00066 {
00067 p.set(a[0], a[1], a[2]);
00068 }
00069
00070 template <class Tin, class Tout>
00071 inline void vtk2vm(const Tin a[3], Vector3<Tout> & p)
00072 {
00073 p.set(a[0], a[1], a[2]);
00074 }
00075
00076 template <class Tin, class Tout>
00077 inline void vm2vtk(const Vector3<Tin> & p, Tout a[3])
00078 {
00079 a[0]=p.x;
00080 a[1]=p.y;
00081 a[2]=p.z;
00082 }
00083
00084 template <class Tin, class Tout>
00085 inline void vtk2vm(const Tin a[3], Point3<Tout> & p)
00086 {
00087 p.set(a[0], a[1], a[2]);
00088 }
00089
00090 template <class Tin, class Tout>
00091 inline void vm2vtk(const Point3<Tin> & p, Tout a[3])
00092 {
00093 a[0]=p.x;
00094 a[1]=p.y;
00095 a[2]=p.z;
00096 }
00097
00098 }
00099
00100
00101 #endif