Error when run the itk examples

32 views
Skip to first unread message

Ibrahim A

unread,
May 17, 2017, 1:03:49 PM5/17/17
to statismo
Dear all,
After a lot of debugging, I managed to build statismo from the source and build the itk and vtk examples (Ubuntu 16, itk 4.10, vtk 7) . I have now this error when I run the ITK shell script: 

Building low-rank Gaussian process deformation model... [done]
itkLowRankGaussianProcessImageToImageRegistration:~/sw/statismo-0.81/src/Examples/ITK/lowRankGaussianProcessImageToImageRegistration.cpp:236: typename TStatisticalModelType::Pointer constrainModel(typename TStatisticalModelType::Pointer, std::__cxx11::string, std::__cxx11::string, double) [with TRepresenter = itk::VectorImageRepresenter<float, 2u, 2u>; TImage = itk::Image<itk::Vector<float, 2u>, 2u>; TStatisticalModelType = itk::StatisticalModel<itk::VectorImageRepresenter<float, 2u, 2u> >; unsigned int VImageDimension = 2u; typename TStatisticalModelType::Pointer = itk::SmartPointer<itk::StatisticalModel<itk::VectorImageRepresenter<float, 2u, 2u> > >; std::__cxx11::string = std::__cxx11::basic_string<char>]: Assertion `referencePointVector.size()!=targetPointVector.size()' failed.
Aborted (core dumped)

Another question: regarding building the shape model, how can I get B-Splines control points for a shape from a binary image contains the segmented object?  
Have a nice evening!
Ibraheem


Marcel Luethi

unread,
May 18, 2017, 12:04:14 AM5/18/17
to Ibrahim A, statismo
Hi Ibraheem,

I am sorry to hear that you had trouble compiling statismo.Did you use the super build or your own version of the libraries?

The runtime error you get indicates that you are different number of source and target landmarks.

Unfortunately I do not understand your last question. For building the model you do not need any b-spline control points. What you use as input is a set of surfaces which are in correspondence. These are obtained by registration of a reference shape to all the targets. On the Wiki page https://github.com/statismo/statismo/wiki/cli-femur-model-example you can find an example that illustrates the process using the statismo command line interface.

Best regards,

Marcel

--
You received this message because you are subscribed to the Google Groups "statismo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to statismo-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ibrahim A

unread,
May 18, 2017, 7:27:51 AM5/18/17
to Marcel Luethi, statismo
Hi Marcel,
many thanks for your quick response and concern. I used my own version of the libraries as there was a conflict. What should I do to solve this error?
The last question is about a work from Cremers et al [1]. I am trying to add the shape energy to the Diffusion Snakes functional. As I understood, instead of building a shape model from the images, they built a shape model from the B-Splines control points. Then, the added the shape energy term to the functional. It is an approach to image segmentation using variational methods.  
Have a nice day!
Ibraheem

Marcel Luethi

unread,
May 19, 2017, 2:50:14 AM5/19/17
to Ibrahim A, statismo
Hi Ibraheem,

If your goal is to reimplement this paper, statismo is not the right tool for you. It does work with very different mathematical concepts. However, if you simply want to use statismo to obtain a shape energy term, this is simple: Assume c=(c_1, ..., c_n) are the coefficients that describe an instance of your shape model (i.e. a contour or surface). Then the squared norm ||c||^2 can be interpreted as the "shape energy". You will find all the necessary methods in the class
https://github.com/statismo/statismo/blob/master/modules/core/include/StatisticalModel.h

Regarding the error you experience: Do you get this error when you run the file runITKExamples.sh?
If yes, you can simply ignore it. This shell script is a left-over from a previous version, which we forgot to remove. If compilation succeeded everything should be working properly.

Best regards,

Marcel


Ibrahim A

unread,
May 20, 2017, 3:52:22 AM5/20/17
to Marcel Luethi, statismo
Hi Marcel,
thanks for the info. Yes, I just want to generate the shape energy using Statismo to use it in the optimization process. Regarding the error. You are right, I used the shell script, I am trying now the Femur example and everything is ok so far. I noticed that some process utilizes the CPU (using all the available cores) and some not, this issue from statismo or from the external libraries?  
Have a nice day and a nice weekend!
Ibraheem 

On Sat, May 20, 2017 at 9:49 AM, Ibrahim A <ibr...@gmail.com> wrote:
Hi Marcel,
thanks for the info. Yes, I just want to generate the shape energy using Statismo to use it in the optimization process. Regarding the error. You are right, I used the shell script, I am trying now the Femur example and everything is ok so far. 
Have a nice day and a nice weekend!
Ibraheem 
Reply all
Reply to author
Forward
0 new messages