How do I compute the memory consumption of a 3D image volume ?
For a given volume, the memory consumption in bytes is the number of voxels (x by y by z) times the size of a single voxel (in bytes). To compute the size in megabytes, divide this number by 1024 to get kilobytes (KB), and divide again by 1024 to get megabytes (MB). Consider, for example, CT data, which is typically 16 bits (2 bytes/voxel). A common volume resolution could be 512 x 512 x 600. So the amount of (contiguous) memory required for this CT data volume would be: Be careful not to confuse the size of the data on disk with the size of the data in memory. Many file formats, e.g., TIFF and JPEG, are compressed file formats. When decompressed, a data set could be orders of magnitude larger in memory than it is on disk. So please use the above method when computing the amount of memory required, not the size of the data set on disk.