Hi all,<br><br>I try to use the DeformableRegistration1 example with a mesh file. I have not modified the source code.<br>I tried with a very simple example: 4 nodes, 2 triangles and I got this error: &quot;A diagonal element is non positive.&quot; <br>
Below is the complete output, the mesh file and the configuration file.<br><br>Any help welcome!<br><br>Jean-Baptiste<br><br>Output:<br><br>fio024@arachnoid-sl ~/Registration Examples$ ./bin/DeformableRegistration1 config/DeformableRegistration1.cfg<br>
Reading config file...config/DeformableRegistration1.cfg<br>Example configured. E 10000 rho 10000<br> reading moving ./data/Black.png<br> reading fixed ./data/Grey.png<br>WARNING: In /home/fio024/InsightToolkit-3.12.0/Code/IO/itkAnalyzeImageIO.cxx, line 1345<br>
AnalyzeImageIO (0x967f518): ERROR: Analyze 7.5 File Format Only Allows RPI, PIR, and RIP Orientation <br><br>WARNING: In /home/fio024/InsightToolkit-3.12.0/Code/IO/itkAnalyzeImageIO.cxx, line 1345<br>AnalyzeImageIO (0x967d9a8): ERROR: Analyze 7.5 File Format Only Allows RPI, PIR, and RIP Orientation <br>
<br> beginning level 0<br> scaling 1<br> scaling 1<br> ElementsPerDim 32 32<br> applying loads <br> node 1<br> node 2<br> node 3<br> node 4<br> allocating deformation field <br> load sizes [128, 128]  image [128, 128]<br>
 load sizes [128, 128]  image [128, 128]<br> energy 195075<br>terminate called after throwing an instance of &#39;itk::fem::FEMExceptionItpackSolver&#39;<br>  what():  /home/fio024/InsightToolkit-3.12.0/Code/Numerics/FEM/itkFEMLinearSystemWrapperItpack.cxx:659:<br>
Error: A diagonal element is not positive<br>Aborted<br><br><br>Mesh file:<br><br>&lt;MaterialLinearElasticity&gt;<br>    0        % Global object number<br>    E : 100  % Young modulus<br>    A : 1    % Beam crossection area<br>
    I : 1    % Moment of inertia<br>    nu : 0.2 % Poisson&#39;s ratio<br>    h : 1    % Plate thickness<br>    RhoC : 1 % Density times capacity<br>    END:     % End of material <br>&lt;Node&gt;<br>    1<br>    2 25 25<br>
&lt;Node&gt;<br>    2<br>    2 25 51<br>&lt;Node&gt;<br>    6<br>    2 51 25<br>&lt;Node&gt;<br>    7<br>    2 51 51<br>&lt;Element2DC0LinearTriangularMembrane&gt;<br>    26<br>    1<br>    2<br>    7<br>    0<br>&lt;Element2DC0LinearTriangularMembrane&gt;<br>
    42<br>    1<br>    7<br>    6<br>    0<br><br><br>Config file:<br><br>% ---------------------------------------------------------<br>% Parameters for the single- or multi-resolution techniques<br>% ---------------------------------------------------------<br>
1       % Number of levels in the multi-res pyramid (1 = single-res)<br>1       % Highest level to use in the pyramid<br> 1 1            % Scaling at lowest level of pyramid<br> 4              % Number of pixels per element<br>
 1.e4           % Elasticity (E)<br> 1.e4           % Density x capacity (RhoC)<br> 1              % Image energy scaling (gamma) - sets gradient step size<br> 2              % NumberOfIntegrationPoints<br> 1              % WidthOfMetricRegion<br>
 20             % MaximumIterations<br>% -------------------------------<br>% Parameters for the registration<br>% -------------------------------<br>0 0.99 % Similarity metric (0=mean sq, 1 = ncc, 2=pattern int, 3=MI, 5=demons)<br>
1.0     % Alpha<br>0       % DescentDirection (1 = max, 0 = min)<br>0       % DoLineSearch (0=never, 1=always, 2=if needed)<br>1.e1    % TimeStep<br>0.5     % Landmark variance<br>0       % Employ regridding / enforce diffeomorphism ( &gt;= 1 -&gt; true)<br>
% ----------------------------------<br>% Information about the image inputs<br>% ----------------------------------<br>128     % Nx (image x dimension)<br>128     % Ny (image y dimension)<br>0       % Nz (image z dimension - not used if 2D)<br>
./data/Black.png % ReferenceFileName<br>./data/Grey.png % TargetFileName<br>% -------------------------------------------------------------------<br>% The actions below depend on the values of the flags preceding them.<br>
% For example, to write out the displacement fields, you have to set<br>% the value of WriteDisplacementField to 1.<br>% -------------------------------------------------------------------<br>0       % UseLandmarks? - read the file name below if this is true<br>
./config/AssociatedDummyLandmarkFile.txt       % LandmarkFileName<br>./output/MeshTest_                       % ResultsFileName (prefix only)<br>1       % WriteDisplacementField?<br>./output/MeshTest_disp_                         % DisplacementsFileName (prefix only)<br>
1       % ReadMeshFile?<br>./config/DummyMeshFile.fem                                      % MeshFileName<br>END<br><br><br>