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?
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
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?
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)
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?
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.
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.
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.