[Insight-users] Print out the size of an image
Xi Liang
liangxi1986317 at hotmail.com
Mon Sep 27 04:54:25 EDT 2010
Dear all,
I would like to print out the size, origin, direction of an image and the
parameters from bsplineTransform without bracket or comma. I want the
parameters separated by space. I use the following code and it only works
for the transformation parameter.
vnl_vector<double> TempArray = bsplineTransform->GetParameters();
vnl_vector<double> ImageSizeTempArray =
reader->GetOutput()->GetLargestPossibleRegion().GetSize();
The code in the first line gives me perfect format with parameters separated
by space. However the second line give me the following error message:
1>..\CreateImageSetBspline.cxx(260) : error C2440: 'initializing' : cannot
convert from 'const itk::Size<VDimension>' to 'vnl_vector<T>'
1> with
1> [
1> VDimension=3
1> ]
1> and
1> [
1> T=double
1> ]
1> No constructor could take the source type, or constructor overload
resolution was ambiguous
Is there someone know the second line does not work? How can I print the
size of an image such that parameters are separated by space? (Instead of
using loop to print out all elements)
Kind regards,
Xo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100927/3c739c8b/attachment.htm>
More information about the Insight-users
mailing list