Hi Xi,<br><br>Instead of:<br><br>vnl_vector<double> ImageSizeTempArray = reader->GetOutput()->GetLargestPossibleRegion().GetSize();<br><br><br><br>You should use:<br><br>ImageType::SizeType ImageSizeTempArray = reader->GetOutput()->GetLargestPossibleRegion().GetSize();<br>
<br><br> Regards,<br><br><br> Luis<br><br><br>----------------------------------------<br><div class="gmail_quote">On Mon, Sep 27, 2010 at 4:54 AM, Xi Liang <span dir="ltr"><<a href="mailto:liangxi1986317@hotmail.com">liangxi1986317@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Dear all,<div><br></div><div>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.</div>
<div><br></div><div><div><span style="white-space: pre-wrap;">        </span>vnl_vector<double> TempArray = bsplineTransform->GetParameters();</div><div><span style="white-space: pre-wrap;">        </span>vnl_vector<double> ImageSizeTempArray = reader->GetOutput()->GetLargestPossibleRegion().GetSize();</div>
</div><div><br></div><div>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:</div><div><br></div><div><div>1>..\CreateImageSetBspline.cxx(260) : error C2440: 'initializing' : cannot convert from 'const itk::Size<VDimension>' to 'vnl_vector<T>'</div>
<div>1> with</div><div>1> [</div><div>1> VDimension=3</div><div>1> ]</div><div>1> and</div><div>1> [</div><div>1> T=double</div><div>1> ]</div>
<div>1> No constructor could take the source type, or constructor overload resolution was ambiguous</div></div><div><br></div><div><br></div><div>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)</div>
<div><br></div><div>Kind regards,</div><div><br></div><div>Xo</div><div><br></div><br></blockquote></div>