Normalisation or scaling with SPHARM

Hi,

I would like to normalise all of my SPHARM-PDM output subjects (subjectID_pp_surf_SPHARM_procalign.vtk) by a scale factor before running any sort of statistical analysis. I am going to use a separate tool for the statistical analysis, so I would just need the scaled SPHARM-PDM output for now. Could you let me know how I can do this, please?

Regards,
Khalid

@styner Do you have the answer to this? Or could you point me to the right person?

Hi Khalid
I am not sure I fully understand what you are trying to do. Do you want to simply scale the size of the mesh by a given factor (which is simply multiplying all coordinates by the scale factor), or do you want to scale the mesh to have a particular size? In case of the former, you can use MeshMath with option scaleMesh
Martin

Hi Martin,

So, I need to normalize all of the subjects (subjectID_pp_surf_SPHARM_procalign.vtk) by their intra-cranial volume (scale factor). Then I would like to calculate the signed normal distance from the mean shape followed by statistical analysis (with a separate tool). Which one of the two would be appropriate for this?

Regards,
Khalid

This is scaling with a known scaling factor (in your case 1 / ICV^(1./3) ) , so use MeshMath. As you can see from this formula, if you use a volume measure to scale meshes, you need to take the cubic root (as scaling affects coordinates in mm)

Martin

Hi Martin,

The scale factor in your SPHARM-PDM framework paper suggests this formula:
Scale Factor = Mean(ICV) ∕ (ICV_subject)^⅓

Is this what you are saying in the previous reply? Also, is there a recommendation for number of places after decimal?

Regards,
Khalid

Slightly different:
(Mean(ICV) ∕ ICV_subject)^⅓

Hi Martin,

Thank you for taking the time in answering all the questions!

I see that once scaled, the subjects are no longer spatially aligned as they were in the subject_pp_surf_SPHARM_procalign.vtk files. How can I realign them again for the accurate distance calculation?

Regards,
Khalid

The change in alignment happens, as the data is rigid-procrustes aligned (procrustes without scale) in image space (i.e. in the average location in image space, here the average hippocampus location). As you scale the size, this also changes the location in space.

In order for this not to happen, you could use an alignment to origin of coordinate system when the center of gravity/0th moment is (0,0,0).

Of course, you can do the rescaling in the image space, you just need to redo the alignment. As always there are multiple ways to do so, but I usually use MeshMath.

MeshMath RefMesh.vtk -alignMesh mesh1.vtk mesh2.vtk mesh3.vtk …

This does rigid procrustes, unless you also specify -scalingOn and then it does full procrustes.
As reference mesh, you can use the average Mesh from before you did the rescaling. If you do not have that, you can compute an average Mesh with MeshMath and -avgMesh option. Btw, if you run MeshMath without any command line options, then it will give you an usage/help outout.

Martin

Hi @Styner,

I wanted to asked you about the following two commands. How is the second command’s output different from that of the first one in terms of alignment? I know that the first one gives procrustes alignment and the second one gives a realignment but not sure if they are the same.

Command 1:
ParaToSPHARMMeshCLP --NoParaAlign --paraOut --spharmDegree 15 --subdivLevel 10 --regTemplate template_pp_surf_SPHARM.vtk --regTemplateFileOn Step2_GenParaMesh/subject1_pp_para.vtk Step2_GenParaMesh/subject1_pp_surf.vtk Step3_ParaToSPHARMMesh/subject1_pp_surf

Command 2:
MeshMath RefMesh.vtk -alignMesh mesh1.vtk mesh2.vtk mesh3.vtk …

Regards,
Khalid Saifullah