How to save the volume pixel data in display area?

Yes, if you have different dots per inch in the x and y directions you would expect to see a distortion like that. You can set both dpi values to match what your matlab code expects.

Thanks Steve,
I set the XY resolution 300 x 300 which is according to my volume information in Slicer
image
image
image

But when I load one slice into MATLAB,the 2D image seemingly is compressed.

image
image

The dimension should be 300x300 right?

The output resolution in dpi is not related to the resolution of your input volume, since Slicer is volume rendering in patient space. So you want to specify the output resolution in terms of the physical size of your subject and the expectations of the matlab code. HTH.

Thanks Steve,
I have tried several times and set the XY resolution by 510 and got the 2D slice image dimension 300x300 in MATLAB.So it is confused to me,what’s the relationship between the output image and the printer parameters setting?
Another quesion,If I do some volume rendering and silce with the same parameters setting,the output image size is different from the raw volume without any rendering.
Can you describe the reason in detail? Thank you very much!