[Insight-users] using adaptive grids in FEM based deformable
registration
jx x
joshjx at yahoo.com
Sun Jan 16 23:09:20 EST 2005
Dear Tessa,
Maybe some problem happened when I send you last
email. Sorry to send it again.
I have tried to use adaptive grid in the example of
DeformableRegistration1.
As you told me, I modified the parameter file as
follows:
1 % ReadMesh file
lung-mesh.fem % meshfile name
As for FEM input file, I add entries of node,
materials, element. Leave load entry empty.
When I run this example, a runtime error happened.
I attach the parameter file, FEM input file, screen
capture of error and picture of adaptive grid. Maybe
you can find something wrong.
The image of lung is 128X128, adaptive grid is 64X64.
Is there any trouble in it? Is anything wrong when I
define the element type or materials properties?
Thanks very much.
Josh
--- "Sundaram, Tessa" <Tessa.Sundaram at uphs.upenn.edu>
wrote:
> Dear Josh,
>
> 1. You do not need additional changes to the main
> parameter file other than
> those you mention.
>
> 2. There are a number of sample ITK FEM input files
> in
> Insight/Testing/Data/Input/FEM. They are not for
> anatomy-specific examples,
> but will hopefully give you an idea of the file
> format. Note that you do
> not need to specify loads in the input file for your
> registration, because
> this is automatically done at runtime.
>
> 3. If you want to use landmarks, you will have to
> include <LoadLandmark>
> entries in the input file. For now, you will not
> need this though.
>
> Please let me know if you have further questions.
> Thanks,
>
> -ts
>
> -----Original Message-----
> From: jx x [mailto:joshjx at yahoo.com]
> Sent: Thursday, January 13, 2005 11:01 PM
> To: Insight-users at itk.org
> Subject: [Insight-users] using adaptive grids in FEM
> based deformable
> registration
>
>
> Hello,
>
> I am trying to use adaptive grids in FEM based
> deformable registration. For example, if I want to
> use
> adaptive grids in the example of
> DeformableRegistration1.cxx, what I need to do?
>
> I read the paper of "non-rigid registration method"
> which is the material presented at itk tutorials on
> itk website. I still have questions about it.
>
> 1. As for the parameter file, we set:
> 1 % ReadMesh file
> lung-mesh.fem % meshfile name
> Do we need to make other changes in the parameter
> file?
>
> 2. After I create the anatomy-specific meshes, I
> have
> to convert it to FEM input file format. Where can I
> find an example for this kind of input file?
>
> 3. Up to now, I still use exist element type, and I
> do
> not consider landmark problem yet. Then what else I
> need to do except 1. and 2.?
>
> 4. Where can I learn more about the ITK FEM library?
>
>
>
> Thanks very much!
>
> Sincerely,
>
> Josh
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - now with 250MB free storage. Learn
> more.
> http://info.mail.yahoo.com/mail_250
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250
-------------- next part --------------
D:\itkuser\binary\Debug>df1 para.txt
Reading config file...para.txt
Example configured. E 10000 rho 10000
reading moving d:\itk1.6\Examples\Data\RatLungSlice1.mha
reading fixed d:\itk1.6\Examples\Data\RatLungSlice2.mha
beginning level 0
scaling 1
scaling 1
ElementsPerDim 32 32
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
D:\itkuser\binary\Debug>
-------------- next part --------------
<Node>
0
2 0.000000000000000E+000 0.000000000000000E+000
<Node>
1
2 1.829327638659606 0.000000000000000E+000
<Node>
2
2 3.688523702410295 0.000000000000000E+000
% ... node from 3 to 4092 be deleted since the file is too big
<Node>
4093
2 123.006760467731600 127.000000000000000
<Node>
4094
2 124.975758889018500 127.000000000000000
<Node>
4095
2 127.000000000000000 127.000000000000000
<END>
<MaterialLinearElasticity>
0
E : 10000.0
A : 1.0
I : 1.0
nu : 0
h : 1.0
RhoC : 10000.0
END:
<END>
<Element2DC0LinearQuadrilateralStress>
0
1
2
66
65
0
<Element2DC0LinearQuadrilateralStress>
1
2
3
67
66
0
% ... element from 2 to 3966 be deleted since the file is too big
<Element2DC0LinearQuadrilateralStress>
3967
4030
4031
4095
4094
0
<Element2DC0LinearQuadrilateralStress>
3968
4031
4032
4096
4095
0
<END>
<END>
-------------- next part --------------
% Configuration file #1 for DeformableRegistration1.cxx
%
% This example demonstrates the setup of a basic registration
% problem that does NOT use multi-resolution strategies. As a
% result, only one value for the parameters between
% (# of pixels per element) and (maximum iterations) is necessary.
% If you were using multi-resolution, you would have to specify
% values for those parameters at each level of the pyramid.
%
% Note: the paths in the parameters assume you have the traditional
% ITK file hierarchy as shown below:
%
% ITK/Insight/Examples/Registration/DeformableRegistration1.cxx
% ITK/Insight/Examples/Data/RatLungSlice*
% ITK/Insight-Bin/bin/DeformableRegistration1
%
% ---------------------------------------------------------
% Parameters for the single- or multi-resolution techniques
% ---------------------------------------------------------
1 % Number of levels in the multi-res pyramid (1 = single-res)
1 % Highest level to use in the pyramid
1 1 % Scaling at lowest level of pyramid
4 % Number of pixels per element
1.e4 % Elasticity (E)
1.e4 % Density x capacity (RhoC)
1 % Image energy scaling (gamma) - sets gradient step size
2 % NumberOfIntegrationPoints
1 % WidthOfMetricRegion
20 % MaximumIterations
% -------------------------------
% Parameters for the registration
% -------------------------------
0 0.99 % Similarity metric (0=mean sq, 1 = ncc, 2=pattern int, 3=MI, 5=demons)
1.0 % Alpha
0 % DescentDirection (1 = max, 0 = min)
0 % DoLineSearch (0=never, 1=always, 2=if needed)
1.e1 % TimeStep
0.5 % Landmark variance
0 % Employ regridding / enforce diffeomorphism ( >= 1 -> true)
% ----------------------------------
% Information about the image inputs
% ----------------------------------
128 % Nx (image x dimension)
128 % Ny (image y dimension)
0 % Nz (image z dimension - not used if 2D)
d:\itk1.6\Examples\Data\RatLungSlice1.mha % ReferenceFileName
d:\itk1.6\Examples\Data\RatLungSlice2.mha % TargetFileName
% -------------------------------------------------------------------
% The actions below depend on the values of the flags preceding them.
% For example, to write out the displacement fields, you have to set
% the value of WriteDisplacementField to 1.
% -------------------------------------------------------------------
0 % UseLandmarks? - read the file name below if this is true
- % LandmarkFileName
./RatLung_result % ResultsFileName (prefix only)
1 % WriteDisplacementField?
./RatLung_disp % DisplacementsFileName (prefix only)
1 % ReadMeshFile?
d:\itkuser\binary\Debug\lung.fem % MeshFileName
END
More information about the Insight-users
mailing list