[Insight-users] embarassingly basic question

Rupert Brooks rupert.brooks at gmail.com
Wed Apr 25 15:44:36 EDT 2012


Hi,

Its when I show ITK to other people that I end up with embarassingly
simple questions that I ought to know the answer to.

When declaring an itk::Point (or vector, etc, anything based on
FixedArray) there is no constructor that assigns values that i know
of.  So one always ends up doing something like
itk::Point<double, 3> p;
p[0]=1.1;
p[1]=2.2;
p[2]=3.3;

or

const double[3] dummy={1.1,2.2,3.3};
const itk::Point<double, 3>=dummy;  // at least this way we can get a
const itk::Point

It was pointed out to me that this is quite verbose.  A certain ideal
would be, eg

const itk::Point<double,3> p(1.1,2.2,3.3);

Is there a better way?  Was this a design choice, or an inevitable
consequence of variadic constructors not being possible in C++?

Thanks,
Rupert

--------------------------------------------------------------
Rupert Brooks
rupert.brooks at gmail.com


More information about the Insight-users mailing list