ERROR: Metric data and labels DO NOT HAVE SAME DIMENSIONS

Dear SCT Team:
When using a binary mask (t2s_gmseg.nii.gz) to extract intensity values of gray matter from an image with a certain contrast (example.nii.gz), I encountered an error saying, “Metric data and labels DO NOT HAVE SAME DIMENSIONS.” If you have any solutions, please let me know.
The command I used is as follows:
sct_extract_metric -i example.nii.gz -f t2s_gmseg.nii.gz -method bin -o example_value.csv
And this is the data:
example.nii.zip (2.1 MB)
t2s_gmseg.nii.zip (1.1 KB)

Dear @ryu,

This is a great question! Thank you for asking it.

Typically, the mask (-m) should be derived from the same image you are trying to extract metrics from (-i). Using a mask from one image to extract metrics from another can produce unexpected results, especially if the two images have different resolutions (i.e. different slice thicknesses). This is why SCT has the requirement that the image dimensions should be the same.

We can better help you if you share what your goals are. For example, could you tell us what images you are trying to extract metrics from using the T2* GM seg, whether you are processing single subjects or full datasets, etc.?

Kind regards,
Joshua