Hammersmith atlas uses the MNI152 template, but array sizes are different?

I’m trying to quantify the location of tumors on MRI images. I have the tumor’s segmentations, so the plan is to non-linearly register the patient’s images to a template (masking the tumor), and then use an atlas that segments the brain into reasonable volumes. Perhaps lobes, but a more fine-grained division could be better.

Two questions:

  1. The Hammersmith atlas could fit the bill. However, while the documentation says that it’s based on the MNI152 template, none of the MNI templates I’ve found have the same image size (Hammersmith atlas is 157x189x156, MNI is 193x229x193). What can I do to make them “fit” in voxel space? Essentially, I want to end up with two numpy arrays that I can stack. Can I somehow use the affines…? Opening both in ITK-SNAP does seem to line them up.

  2. Is there another atlas better suited for the task? It should cover the whole brain (not just gray matter like many do).

Thanks!

Hi @lidialuq ,

  1. The MNI specified here is the template size from SPM which is different from the MNI template. If you want to know more about those subtleties, you may read here. You can verify that the TPM provided by SPM12 (/spm12/tpm/TPM.nii) has the same bounding box as the Hammersmith atlas, i.e 181 x 217 x 181 mmm^3.

  2. You can look here for cortical parcellations or here for subcortical atlases to get other ideas for atlases.

Thanks for the links @jsein, it was an intereseting read about mni “rooms”. There’s never a one and only standard for anything in neuroimaging :smiling_face_with_tear:

I’m still confused about the Hammersmith atlas though. TPM.nii is 121x145x121 (HS is 157x189x156) so it doesn’t fit either. If I understand correctly, the HS atlas should follow MNI ICBM 152 non-linear IV which is also used in SPM. But alas, the array size is still different from HS. I tried padding the atlas by taking into account the difference in the offset of the affines, which does make them overlap. It seems strange to have to take this extra step though, and I’m probably missing something, but I guess it’s a fair workaround otherwise.

Hi @lidialuq ,

I don’t understand the dimensions you are speaking about. In the file I downloaded from the website cited in your first post, for the file Hammers_mith_atlas_n30r83_SPM5.nii.gz, I got the following information with fslinfo:

data_type	UINT8
dim1		181
dim2		217
dim3		181
dim4		1
datatype	2
pixdim1		1.000000
pixdim2		1.000000
pixdim3		1.000000
pixdim4		0.000000
cal_max		0.000000
cal_min		0.000000
file_type	NIFTI-1+

The TPM from SPM12 is at 1.5mm resolution, so indeed the array size of the file spm12/tpm/TPM.nii is different:

data_type	FLOAT32
dim1		121
dim2		145
dim3		121
dim4		6
datatype	16
pixdim1		1.500000
pixdim2		1.500000
pixdim3		1.500000
pixdim4		0.000000
cal_max		0.000000
cal_min		0.000000

But if you look at an atlas distributed through SPM12 at 1mm resolution, you get the same image dimension as Hammers_mith_atlas_n30r83_SPM5.nii.gz. For example, with spm12/atlas/AAL3v1_1mm.nii, fslinfo gives:

data_type	UINT8
dim1		181
dim2		217
dim3		181
dim4		1
datatype	2
pixdim1		1.000000
pixdim2		1.000000
pixdim3		1.000000
pixdim4		0.000000
cal_max		0.000000
cal_min		0.000000
file_type	NIFTI-1+

which is exactly the same size as Hammers_mith_atlas_n30r83_SPM5.nii.gz!

Do you agree?

You’re right, I gave the wrong link on my first post. The Hammersmith you link to does have the same bounding box as the SPM12 template, but it’s the old Hammersmith atlas with fewer parcelations.
I wanted to use the new Hammersmith atlas - Adult maximum probability atlas prepared with SPM12, where Hammers_mith-n30r95-MaxProbMap-full-MNI152-SPM12.nii.gz has dimensions

dim[0]     4
dim[1]     157
dim[2]     189
dim[3]     156

which doesn’t match any of the MNI templates I’ve found on SPM12 (at least not on their repo). But taking into account the offset when padding the atlas works, so I have a workaround.