Get ROI size in pixels

Dear lassoan

Could you teach me how to determine the ROI size by number of pixels, not millimeter?
My goal is to set both L-R and P-A ranges into 100 pixels, and make a cropped volume with x and y lengths = 100 pixels.

Spacing of a volume may be anisotropic (different voxel size in different directions) and even be different in different parts of the volume (if a warping transform is applied to the volume). Therefore, the only thing that you can easily and reliably compute is correspondence between physical (RAS) coordinates and voxel coordinates (IJK) as shown in this example.