help > Error using SPHARM module in Slicer CLI
Showing 1-3 of 3 posts
Display:
Results per page:
Nov 2, 2014  08:11 PM | Vincent Koppelmans
Error using SPHARM module in Slicer CLI
Hi all,

I have binary segmentations of the third ventricle of multiple subjects collected over multiple time points. I am trying to get SPHARM to run, but I receive some errors. 

I am using the SPHARM module in Slicer v. 4.3.1 r22599 running on Mac OSX 10.9.5

This is the syntax I used:

#!/bin/bash
# 3D Slcier Shape Analysis Module on 2 subjects
# Module: Automatic SPHARM Shape Analysis in 3D Slicer
# Environment
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/Applications/Slicer.app/Contents/lib/Slicer-4.3
export PATH=${PATH}:/Applications/Slicer.app/Contents/MacOS
export PATH=${PATH}:/Applications/Slicer.app/Contents/lib/Slicer-4.3/cli-modules
export PATH=${PATH}:/Applications/Slicer.app/Contents/Extensions-22599/SPHARM-PDM/lib/Slicer-4.3/cli-modules
export PATH=${PATH}:/Applications/Slicer.app/Contents/Extensions-22599/SPHARM-PDM/lib/Slicer-4.3/ExternalBin
export LC_NUMERIC=en_GB.UTF-8
DIR=/Volumes/Data/tmp/Shape/
mkdir -p ${DIR}/output
ShapeAnalysisModule \
--RescaleSegPostProcess \
--sx 0.5 \
--sy 0.5 \
--sz 0.5 \
--label 1 \
--NumberofIterations 1000 \
--SubdivLevelValue 10 \
--SPHARMDegreeValue 15 \
--thetaIterationValue 100 \
--phiIterationValue 100 \
--columVolumeFile 0 \
--varX 10 \
--varY 10 \
--varZ 10 \
--regTemplate None \
--flipTemplate None \
--paraOutTemplate \
--noFlip \
--HorizontalGridPara 5 \
--VerticalGridPara 5 \
--UseProcalign \
--startRegularization 10 \
--endRegularization 0.01 \
--optimizationIt 200 \
--RelativeWeight 1 \
${DIR}/data.csv \
${DIR}/output \
&> ${DIR}/output/log.txt
exit

I have attached my log file. The errors seem to occur during ParaToSPHARMMeshCLP. Does anybody know how I could fix this?

Best,

Vincent
Attachment: log.txt
Nov 4, 2014  12:11 PM | Beatriz Paniagua
RE: Error using SPHARM module in Slicer CLI
Hi Vincent,



Thanks for your message. I apologize for my delay in replying.
There are several lines of action that we suggest, given the information you provided.

1) With regard to SegPostProcess parameters: The third ventricle is a rather skinny surface, and when you resample to 0.5 iso it might not be well represented. Have you tried to go to a lower resolution?

2) With regard to GenParaMesh, it seems to fail in the first sample (GenParaMesh is usually the most time consuming step and this case took only a second, according to your log file), have you looked at the segmentation obtained from segpostprocess in this case? Also, What are the Euler numbers for this two samples?



Could you please let us know if you can visualize the segpostprocess results and Euler files?
Maybe we can continue troubleshooting.



Thank you!
Beatriz
Dec 3, 2014  02:12 PM | Vincent Koppelmans
RE: Error using SPHARM module in Slicer CLI
Dear Beatriz,

Thank you very much for your reply. 

1) I have tried running SegPostProcess with different parameters. I set sx, sy, and sz to 2, 1, 0.5, 0.1, and 0.01. However, this did not change the outcome. Still, the first binary image did not process, whereas the second binary image processed fine (I think). I was unable to display the "_pp_surfSPHARMMedialMesh.vtk" of the first binary image, regardless of the sx/sy/sz parameters. I was able to display the "_pp_surfSPHARMMedialMesh.vtk" of the second binary image, although the vtk files were all the same (same checksum) regardless of the sx/sy/sz parameters. In addition to the screenshot of "_pp_surfSPHARMMedialMesh.vtk" I have enclosed some images that show the two initial binary images in 3D to give you an idea about the raw data.

2) For the failed GenParaMesh there was no Eurler number text file. For the volume that did proces the number in the Euler text file was 2.

You mentioned I should check the output of segpostprocess. I have displayed most files in the ../Mesh/SPHARM directory and the ones in the Template directory. Except for the "_pp_surfSPHARMMedialMesh.vtk" files in ../Mesh/SPHARM are there any other files of particular interest?

Thanks again for your help.

Best,

Vincent
Attachment: ScreenShots.zip