<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hello.<br><br>I don't know if is the best option, but you can do something like this:<br><br><br>ImageType::SizeType size=image->GetLargestPossibleRegion().GetSize();<br>ImageType::IndexType index;<br>int i=0;<br>int numVox=size[0]*size[1]*size[2];<br>PixelType* img=new PixelType[numVox];<br>for(index[2]=0;index[2]<size[2];index[2]++) {<br> for(index[1]=0;index[1]<size[1];index[1]++) {<br> for(index[0]=0;index[0]<size[0];index[0]++) {<br> img[i++]=image->GetPixel(index);<br> }<br> }<br>}<br><br><br></div></div><br>
</body></html>