You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Michael Folkerts edited this page Jul 6, 2018
·
1 revision
How do I iterate through the raw voxel data of a 3D image?
Below is a simple Eclipse v11/v13 script code snippet that starts with the active 3D image dataset and iterates through the raw voxel data.
publicvoidExecute(ScriptContextcontext){Imageimage=context.Image;if(image==null){MessageBox.Show("Please load a 3D image.","VarianDeveloper");return;}int[,](,)voxelPlane=newint[image.XSize,image.YSize](image.XSize,-image.YSize);for(intz=0;z<image.ZSize;z++){image.GetVoxels(z,voxelPlane);for(inty=0;y<image.YSize;y++){for(intx=0;x<image.XSize;x++){intimageValue=voxelPlane[x,y](x,-y);}}}}