Group analysis with SPHARM-PDM

Interesting questions form Panos about group analysis with SPHARM-PDM tool:


I am trying to compare regional differences in hippocampal structure between three groups (2 diseased groups, and one healthy control group), and I’m having some trouble with the pipeline.

I have volumetric binary files of the hippocampus for each subject (within each group). I used the Shape Analysis Module in SlicerSALT to process each one of those files, and the result was three subdirectories: Step1_SegPostProcess, Step2_GenParaMesh, and Step3_ParaToSPHARMMesh in my subject directory.

What would be the next step in order to statistically compare the regional differences between the three groups? Does SPHARM-PDM do the statistical analysis, or is there another software I should download? Also, do I need to create average volumes before I do any sort of statistical analysis or is the software itself going to take care of that?


For now, in order to statistically compare the regional differences between two models, you can apply the module ModelToModelDistance (available as a module of 3DSilcer): it will compute a distance map between two models with the option corresponding_point_to_point (which will compute the distance euclidean for each corresponding point of your two models). You can then visualize the distance map in ShapePopulationViewer (available in SlicerSALT and 3DSlicer) by displaying the attribute PointToPointVector.

If you want to compare the average group models to each other, you should create an average model of each of your group by using ShapeVariationAnalyzer (available as a module in 3DSlicer) before to apply ModelToModelDistance. The real purpose of this module is not really to compute mean of a population of models but it contains this option. First step is to create a CSV file by using the first tab of the module “Creation of CSV file” and then create your average models by using the tab “Compute of mean group”.

5 Likes

Hi Laura,
Thank you for your response! I used the ShapeVariationAnalyzer module in SlicerSalt, and after exporting a csv file with the paths for each vtk file (of each subject in each group) and their corresponding group, I tried to compute the mean of each group.

Specifically:

  1. Under “Computation of mean groups” and “Selection of groups,” I selected the CSV file from the first step,
  2. Pressed “Compute mean group,”
  3. Selected the path for the exported csv file, and pressed “Export”

However, the CSV file (with the mean shapes) that is created is basically an empty file, and I get an error in the terminal saying:
— Compute the mean of all the group —
Traceback (most recent call last):
File “./ShapeVariationAnalyzer-master/ShapeVariationAnalyzer/ShapeVariationAnalyzer.py”, line 850, in onComputeMeanGroup
self.logic.computeMean(group, listvtk)
File “./ShapeVariationAnalyzer-master/ShapeVariationAnalyzer/ShapeVariationAnalyzer.py”, line 1866, in computeMean
computeMean = slicer.modules.computemean
AttributeError: ‘module’ object has no attribute ‘computemean’

Do you happen to know what might be causing this issue? Should I download another module (i.e. MeshMath) to compute the mean group?
Thank you in advance once again for your time and help!

Hi Panos,

Are you using ShapeVariationAnalyzer in the packaged version of SlicerSALT?
The packages available here.

Thanks,
Bea

Hi Bea,

Thank you for sending me the packaged version! I was actually not using the packaged version of SlicerSALT, just an older version where I had downloaded the ShapeVariationAnalyzer as an additional module.

However, I’m still running on an issue. When I add the paths of the three groups and try to export the csv, the software crashes. I even tried manually creating the csv file (using the older version of SlicerSALT) and loading it to the packaged software for preview, but it still crashed.

The error that comes up in the terminal is:
“Cannot mix incompatible Qt library (version 0x40805) with this library (version 0x40807).”

I’ve seen this issue occur to others but I couldn’t find a solution online. (I’m using Centos 7.)
Do you know if there is a workaround to fix that issue?

Thanks again for your time and help,
Panos

Yes, this is what I thought. I believe we need to contact the developers of the extension to see what is happening.

@juanprietob, Panos seems to be having problems using ShapeVariationAnalyzer in SlicerSALT.
SlicerSALT uses the Slicer tag acf259a ([1] from three months ago) as basis. Do we need to update our Slicer tag to make it work with this extension?

Thank you!
Bea

[1] (HEAD) BUG: Removed memory leaks using GetNodesByClass from Python (3 months ago)

Also, @pfotiad, have you tried to use ShapeVariationAnalyzer with the most recent Slicer nightly version?

Thank you!
Bea

Hi Bea,

I just downloaded it to try it out! It unfortunately gives me the same incompatibility error as before, with the only difference being that now it says:
"Cannot mix incompatible Qt library (version 0x40805) with this library (version 0x40806)“
instead of
"Cannot mix incompatible Qt library (version 0x40805) with this library (version 0x40807)”

Best,
Panos

Can you do Procrustes analysis on objects with SPHARM? Or do you know if there is a different module that can do Procrustes analysis? Finally, can you also build statistical shape models with SPHARM?

Hi Steven,

You can do procrustes analysis using SPHARM. You just have to use the regTemplate option in SPHARM-PDM. There is more information on how to do that in our detailed tutorial.

Thanks!
Bea

Hi bea,

You mean this option below picture?
“Registration Template Options”

Thank you in advance!
Sujiimage

Yes, that is the option that i meant.
Sorry for the delay in replying.,

Hi @bpaniagua ,

Thank you for your response.

But do you have other way to compute mean group template in 3D Slicer?

Cause I cannot access the ShapeVariationAnalyzer in the latest version of 3D Slicer…

Best,
Suji

1 Like