help > How to get pixel dimensions in a saved image.
Showing 1-2 of 2 posts
Results per page:
Sep 22, 2020  04:09 PM | Alex Al-Saffar
How to get pixel dimensions in a saved image.
I'm setting a certain persepective with `azimuthelevation` command then saving the snapshot with `savebmp`, my question is: how can I put my hands on the pixel size for this saved image? I really need to measure distances and I cannot do that without pixel size in each direction. Thanks.
Sep 22, 2020  04:09 PM | Chris Rorden
RE: How to get pixel dimensions in a saved image.
Converting screenshot pixels to millimeters depends on camera distance and bitmap size.

The easiest way to do this for renderings is to use the mosaic view. While other views attempt to use the full resolution of your window, the. mosaics use the resolution of your image. The mosaic view. ignores the camera distance(), with renderings in the same scale as slice images.

The Scripting/Templates/mosaic2 shows a nice example of generating renderings. If you use bmpzoom(1) with a 2x2x2mm image the resulting bitmaps will have pixels with 2mm resolution. A bmpzoom(2) for the same image would yield pixels with 1mm resolution. For anisotropic images, data is. stretched to match the best resolution, for example a 2x2x1mm image will be resampled as 1mm, so such an image with a bmpzoom(2) will yield 0.5mm pixels.