13 #ifndef mitkVectorDeprecated_h
14 #define mitkVectorDeprecated_h
17 #include <vnl/vnl_quaternion.h>
203 template <
class Tin,
class Tout>
211 template <
class Tin,
class Tout>
219 template <
class Tin,
class Tout>
220 inline void vnl2vtk(
const vnl_vector<Tin> &in, Tout *out)
223 for (i = 0; i < in.size(); ++i)
224 out[i] = (Tout)(in[i]);
227 template <
class Tin,
class Tout>
228 inline void vtk2vnl(
const Tin *in, vnl_vector<Tout> &out)
231 for (i = 0; i < out.size(); ++i)
232 out[i] = (Tout)(in[i]);
235 template <
class Tin,
class Tout,
unsigned int n>
236 inline void vnl2vtk(
const vnl_vector_fixed<Tin, n> &in, Tout *out)
239 for (i = 0; i < in.size(); ++i)
240 out[i] = (Tout)(in[i]);
243 template <
class Tin,
class Tout,
unsigned int n>
244 inline void vtk2vnl(
const Tin *in, vnl_vector_fixed<Tout, n> &out)
247 for (i = 0; i < out.size(); ++i)
248 out[i] = (Tout)(in[i]);
251 template <
typename U,
typename V,
unsigned int NRows,
unsigned int NColumns>
252 inline void TransferMatrix(
const itk::Matrix<U, NRows, NColumns> &in, itk::Matrix<V, NRows, NColumns> &out)
254 for (
unsigned int i = 0; i < in.RowDimensions; ++i)
255 for (
unsigned int j = 0; j < in.ColumnDimensions; ++j)
256 out[i][j] = in[i][j];
259 #define mitkSetConstReferenceMacro(name, type) \
260 virtual void Set##name(const type &_arg) \
262 itkDebugMacro("setting " << #name " to " << _arg); \
263 if (this->m_##name != _arg) \
265 this->m_##name = _arg; \
270 #define mitkSetVectorMacro(name, type) mitkSetConstReferenceMacro(name, type)
272 #define mitkGetVectorMacro(name, type) itkGetConstReferenceMacro(name, type)