<div class="gmail_quote">On Fri, Jun 15, 2012 at 11:15 AM, Mr Francesco Grussu <span dir="ltr"><<a href="mailto:francesco.grussu@eecs.qmul.ac.uk" target="_blank">francesco.grussu@eecs.qmul.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br>
could anybody suggest how to get the number of elements along the three<br>
directions of a 3D image?<br></blockquote><div><br></div><div>If I understood your question correctly, I think you're looking for:</div><div><br></div><div>ImageType::SizeType imageSize = image->GetLargestPossibleRegion().GetSize();</div>
<div><br></div><div>for(unsigned int i = 0; i < imageSize.GetSizeDimension(); ++i)</div><div> cout << imageSize[i] << " "; </div><div><br></div></div>