open-discussion > shapeworks.py
Showing 1-6 of 6 posts
Display:
Results per page:
Jul 15, 2014  04:07 PM | Marco P
shapeworks.py
Dear Beatriz,

I'm using your Rodent Thickness pipeline to estimate the cortical thickness in a sample of mice. Following the pipeline, I entered all necessary information in the GUI and measureThicknessFilter, ImageMath, SegPostProcessCLP, GenParaMeshCLP and ParaToSPHARMMeshCLP worked fine to me.
I encountered one problem when I used shapeworks.py. could you help me to solve it, please?

Thank you for your collaboration.

Marco

run: '/usr/bin/python' '/RodentThickness_package_v1.1_with_vtk_and_python/pythonscript/shapeworks.py' '/Rodent_Thickness/test8/Processing/2.shapeworks/inputimage.txt' '/Rodent_Thickness/test8/Processing/2.shapeworks/inputsurfacemodels.txt' '-c' '/Rodent_Thickness/test8/Processing/2.shapeworks/outputCorrespondence.txt' '-w' '/Rodent_Thickness/test8/Processing/2.shapeworks/outputWarped.txt' '--workingDir' '/Rodent_Thickness/test8/Processing/2.shapeworks' '--pathShapeWorksRun' '/RodentThickness_package_v1.1_with_vtk_and_python/Application/ShapeWorksRun' '--pathShapeWorksGroom' '/RodentThickness_package_v1.1_with_vtk_and_python/Application/ShapeWorksGroom' '--pathImageMath' '/RodentThickness_package_v1.1_with_vtk_and_python/Application/ImageMath' '--pathBinaryToDistanceMap' '/RodentThickness_package_v1.1_with_vtk_and_python/Application/BinaryToDistanceMap'
Status: Finish: Execution time 600ms
Error: terminate called after throwing an instance of 'itk::ImageFileReaderException'
Error: what(): /NIRAL/work/mjacquem/CorticalSlicer/ITKv4-install/include/ITK-4.4/itkImageFileReader.hxx:143:
Error: Could not create IO object for file 000.DT.nrrd
Error: The file doesn't exist.
Error: Filename = 000.DT.nrrd
Error: Aborted (core dumped)
Error: sh: 1: ImageStat: not found
Error: Traceback (most recent call last):
Error: File "/RodentThickness_package_v1.1_with_vtk_and_python/pythonscript/shapeworks.py", line 232, in
Error: main(opts, args)
Error: File "/RodentThickness_package_v1.1_with_vtk_and_python/pythonscript/shapeworks.py", line 190, in main
Error: vtk2lpts(inputImages,inputSurfaces, inputPoints)
Error: File "/RodentThickness_package_v1.1_with_vtk_and_python/pythonscript/shapeworks.py", line 48, in vtk2lpts
Error: pixsize=voxelSize(fim)
Error: File "/RodentThickness_package_v1.1_with_vtk_and_python/pythonscript/shapeworks.py", line 124, in voxelSize
Error: spacing = [ float(i) for i in pixdims[0].split(" ")[1:] ]
Error: IndexError: list index out of range
| Running Failed...
Jul 16, 2014  07:07 PM | Joohwi Lee
RE: shapeworks.py
Hello, the error has occurred because ImageStat is not installed.

I will check the repository and include the tool if it isn't there.

Thanks!
Jul 21, 2014  10:07 AM | Marco P
RE: shapeworks.py
Hi Joohwi, could you let us know about ImageStat? Thanks. Marco
Jul 31, 2015  12:07 PM | Marco P
RE: shapeworks.py
Hi Joohwi, I'm still trying to use rodent thickness. do you have any news about ImageStat? Thanks a lot! Marco
Jul 31, 2015  01:07 PM | Beatriz Paniagua
RE: shapeworks.py
Hello Marco,

You can find ImageStat in the project called niral_utilities:
https://github.com/NIRALUser/niral_utili...
If you are a developer, you can compile it from the source code that is in the repository I sent you. If not, we could send you an executable. In the latter case, could you let us know if you are using linux, Windows or Mac.

Thank you,
Francois
Aug 4, 2015  09:08 AM | Marco P
RE: shapeworks.py
Hi Francois,
Hi Beatriz,

thanks a lot for the ImageStat. Recently, I have encountered another problem with shapeworks.py.

I think it has something to do with itkImageFileReader.hxx. Colud you please help me to diagnose the problem?

thanks a lot for your support!

Marco

/usr/bin/python /home/imaging/tools/RodentThickness/RodentThickness_package_v1.1_with_vtk_and_python/pythonscript/shapeworks.py /MRI-G/experiments/ex-vivo/cortical_thickness/output_GUI2/Processing/2.shapeworks/inputimage.txt /MRI-G/experiments/ex-vivo/cortical_thickness/output_GUI2/Processing/2.shapeworks/inputsurfacemodels.txt -c /MRI-G/experiments/ex-vivo/cortical_thickness/output_GUI2/Processing/2.shapeworks/outputCorrespondence.txt -w /MRI-G/experiments/ex-vivo/cortical_thickness/output_GUI2/Processing/2.shapeworks/outputWarped.txt --workingDir /MRI-G/experiments/ex-vivo/cortical_thickness/output_GUI2/Processing/2.shapeworks --pathShapeWorksRun /home/imaging/tools/RodentThickness/RodentThickness_package_v1.1_with_vtk_and_python/Application/ShapeWorksRun --pathShapeWorksGroom /home/imaging/tools/RodentThickness/RodentThickness_package_v1.1_with_vtk_and_python/Application/ShapeWorksGroom --pathImageMath /home/imaging/tools/RodentThickness/RodentThickness_package_v1.1_with_vtk_and_python/Application/ImageMath --pathBinaryToDistanceMap /home/imaging/tools/RodentThickness/RodentThickness_package_v1.1_with_vtk_and_python/Application/BinaryToDistanceMap

Executing /home/imaging/tools/RodentThickness/RodentThickness_package_v1.1_with_vtk_and_python/Application/ImageMath /MRI-G/experiments/ex-vivo/cortical_thickness/output_GUI2/Processing/1.MeasurementandSPHARM/1.labelMapNCsegmentationSegPostProcess.nrrd -type short -changeSp 1.25,1.25,1.25 -outfile 000.DT.nrrd ...
SPACING: 1.25 | 1.25 | 1.25

Executing /home/imaging/tools/RodentThickness/RodentThickness_package_v1.1_with_vtk_and_python/Application/BinaryToDistanceMap --binaryInput 000.DT.nrrd --smoothing 1.25 --output 000.DT.nrrd ...
image read
distance map computed
smoothing: 1.25
smoothing completed

Converting /MRI-G/experiments/ex-vivo/cortical_thickness/output_GUI2/Processing/1.MeasurementandSPHARM/1.ip.SPHARM.vtk into 000.initial.lpts [1002 points] ...
ITK exception caught in main

itk::ImageFileReaderException (0x1bc6a00)
Location: "void itk::ImageFileReader::GenerateOutputInformation() [with TOutputImage = itk::Image, ConvertPixelTraits = itk::DefaultConvertPixelTraits]"
File: /home/imaging/tools/antsbin/ITKv4/Modules/IO/ImageBase/include/itkImageFileReader.hxx
Line: 143
Description: Could not create IO object for file /MRI-G/experiments/ex-vivo/cortical_thickness/output_GUI2/Processing/1.MeasurementandSPHARM/1.labelMapNCsegmentationSegPostProcess.nrrd
Tried to create one of the following:
You probably failed to set a file suffix, or
set the suffix to an unsupported type.
Traceback (most recent call last):
File "/home/imaging/tools/RodentThickness/RodentThickness_package_v1.1_with_vtk_and_python/pythonscript/shapeworks.py", line 232, in
main(opts, args)
File "/home/imaging/tools/RodentThickness/RodentThickness_package_v1.1_with_vtk_and_python/pythonscript/shapeworks.py", line 190, in main
vtk2lpts(inputImages,inputSurfaces, inputPoints)
File "/home/imaging/tools/RodentThickness/RodentThickness_package_v1.1_with_vtk_and_python/pythonscript/shapeworks.py", line 48, in vtk2lpts
pixsize=voxelSize(fim)
File "/home/imaging/tools/RodentThickness/RodentThickness_package_v1.1_with_vtk_and_python/pythonscript/shapeworks.py", line 124, in voxelSize
spacing = [ float(i) for i in pixdims[0].split(" ")[1:] ]
IndexError: list index out of range