[Insight-users] 3D deformable registration
Luis Ibanez
luis.ibanez at kitware.com
Sat Jun 5 22:41:14 EDT 2004
Hi George,
Thanks for your detailed message.
After playing with the parameters of the FEM-based deformable
registration we found an apropriate combination.
Please fin attached the modified .cxx file, and the modified
parameters file. The last part of your .cxx was not making
any real contribution, it has been removed now.
The produced deformation fileds is now in the range of 1 pixel,
and the registered image looks pretty close to the fixed image.
You will find useful to look at the vector fields superimposed
to the fidex and moving images. For that purpose you can use
ParaView:
http://www.paraview.org
Regards,
Luis
-----------------------------------
>Hi Luis,
>
>I am still having problems trying to use FEM deformable registration
>framework to register 2D MRI images.
>
>I changed a bit the code in the ITK example so that the images are
>rescaled to 0-65534 instead of 0-255 (lines 231-232 in my code):
>
> const double desiredMinimum = 0.0;
> const double desiredMaximum = 65534.0; //255.0;//65534.0;
>
>I will really appreciate if you have time to check my code. I put the
>images I am working on at:
>http://www.geocities.com/itk_fem/fixedSlice13mha.bin
>http://www.geocities.com/itk_fem/movingSlice13mha.bin
>
>Please note they are ".mha" files so you should chage their names to:
>fixedSlice13.mha and movingSlice13.mha once you download them.
>
>I put the code (a .cxx file) at:
>http://www.geocities.com/itk_fem/DeformableRegistration1New.txt
>
>and the parameters file at:
>
>http://www.geocities.com/itk_fem/FiniteElementRegistrationParameters1.txt
>
>The first problem is that the resulted image is almost exactly the same
>as the fixed image. All the details of the moving image that are not in
>the fixed image are lost.
>
>The second problem is given by the deformation field. I tried to use it
>to warp the image myself but the amplitude of the deformation field is
>very small as you can see by looking at the resulting
>RegistSlice13_dispy(x)vec images. As a result, the warped image is very
>little different from the moving image. I increased the amplitude of the
>deformation field by 500 times and the result was a registered image
>that was somehow closer the fixed image, although misallignement was
>still visible. My expectation was that by using the deformation field
>and a WarpImageFilter I would get the same result as using the
>itk::fem::FEMRegistrationFilter. Is there any explanation why the
>results are different?
>
>Thank you.
>
>George
>
>
>
>
>
-------------- next part --------------
PROJECT( DeformableRegistration )
#
# Find the binary directory where ITK is available
#
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
MESSAGE(FATAL_ERROR
"Cannot build InsightApplications without ITK. Please set ITK_DIR.")
ENDIF(ITK_FOUND)
ADD_EXECUTABLE(DeformableRegistration DeformableRegistration1New.cxx)
TARGET_LINK_LIBRARIES( DeformableRegistration ITKIO ITKBasicFilters ITKCommon ITKFEM ITKNumerics ITKStatistics )
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DeformableRegistration1New.cxx
Type: text/x-c++src
Size: 12855 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20040605/f44eb72a/DeformableRegistration1New.cxx
-------------- 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
50 % 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
% ----------------------------------
64 % Nx (image x dimension)
64 % Ny (image y dimension)
0 % Nz (image z dimension - not used if 2D)
fixedSlice13.mha % ReferenceFileName
movingSlice13.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
RegistSlice13 % ResultsFileName (prefix only)
1 % WriteDisplacementField?
RegistSlice13_disp % DisplacementsFileName (prefix only)
0 % ReadMeshFile?
- % MeshFileName
END
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RegistSlice1310.mha
Type: application/octet-stream
Size: 4265 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20040605/f44eb72a/RegistSlice1310.obj
More information about the Insight-users
mailing list