<div dir="ltr">Dear Matt,<div><br></div><div>thank you very much for your reply.</div><div><br></div><div>I have done some experiments with ITK FEM registration and, following your advice, I have solved the crashing issue. Nevertheless I have still some questions. </div><div><br>In fact, I am interested in developing a small piece of code using itk FEM module such that:</div><div>1) takes an image as an input;</div><div>2) defines a grid on the image;</div><div>3) applies some forces on the boundary;</div><div>4) deforms the image accordingly.</div><div><br></div><div> Since ITK has a FEM module I was trying to use it. So, I have started reading <a href="http://www.itk.org/Doxygen/html/classitk_1_1fem_1_1Solver.html">itk::fem::Solver</a> documentation which states:<br></div><div><dl class="" style="font-stretch:normal;font-size:12px;line-height:22px;font-family:'Lucida Grande',Verdana,Geneva,Arial,sans-serif;padding:0px;margin-left:0px;color:rgb(0,0,0)"><dd style="margin-bottom:6px">The standard way to setup a FE problem in ITK is to use the following approach.</dd></dl><div class="" style="font-stretch:normal;font-size:12px;line-height:22px;font-family:'Lucida Grande',Verdana,Geneva,Arial,sans-serif;padding:0px;margin:0px;border:1px solid rgb(196,207,229);color:rgb(0,0,0);background-color:rgb(251,252,253)"><div class="" style="font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;margin:0px">*       <span class="" style="color:rgb(0,128,0)">typedef</span> <a class="" href="http://www.itk.org/Doxygen/html/classitk_1_1fem_1_1FEMObject.html" style="color:rgb(70,101,162);text-decoration:none">itk::fem::FEMObject<3></a>    <a class="" href="http://www.itk.org/Doxygen/html/classitk_1_1fem_1_1Solver.html#aa7503c1b694280d0f47bdfb3abc98ebc" style="color:rgb(70,101,162);text-decoration:none">FEMObjectType</a>;</div><div class="" style="font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;margin:0px">*       FEMObjectObjectType::Pointer fem = FEMObjectObjectType::New();</div><div class="" style="font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;margin:0px">*       ...</div><div class="" style="font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;margin:0px">*       <span class="" style="color:rgb(0,128,0)">typedef</span> <a class="" href="http://www.itk.org/Doxygen/html/classitk_1_1fem_1_1Solver.html" style="color:rgb(70,101,162);text-decoration:none">itk::fem::Solver<3></a>    FEMSolverType;</div><div class="" style="font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;margin:0px">*       FEMSolverType::Pointer solver = FEMSolverType::New();</div><div class="" style="font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;margin:0px">*</div><div class="" style="font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;margin:0px">*       solver->SetInput( fem );</div><div class="" style="font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;margin:0px">*       solver->Update( );</div><div class="" style="font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;margin:0px">*       FEMSolverType::Pointer defem = solver->GetOutput( );</div><div class="" style="font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;margin:0px">*   ...</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">Unfortunately, apart fro the typo (defem should be FEMObjectType), this is rather succinct. Do you know some places in which to look for doing something like what I have described? </div><div class="gmail_quote"><br></div><div class="gmail_quote">Best regards and thank you for your work,</div><div class="gmail_quote"><br></div><div class="gmail_quote">Luigi</div></div></div>