[Insight-users] 3D deformable registration

Rao Jianguo rao . jianguo at hgu . mrc . ac . uk
Fri, 21 Nov 2003 08:42:09 +0000


Hi Luis,

Many thanks for your message.

Here is the param.file I used.

I have tried to locate
where the thing might go wrong. For example, I have
checked the ReadConfigFile() and can figure out why.
As I have used the style of param.file for 2D deformable
registration and it works fine. The ReadConfigFile() shows
that The same structure for 3D should be fine.  I hope you
can help.

========================
% Configuration file #1 for DeformableRegistration1.cxx
%
% This example demonstrates the setup of a basic registration
% problem that doest NOT use multi-resolution strategies. As a
% result, only on evalue 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.e6 % Elasticity (E)
 1.e4 % Density x capacity (RhoC)
 1      % Image enery scaling (gamma) - sets gradient step size
 4 % NumberOfIntegrationPoints
 4 % WidthOfMetricRegion
 40 % 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.e2    % TimeStep
%0.5 % Landmark variance
0.5 % Landmark variance
0 % Employ regridding / enforce diffeomorphism ( >=1 -> true)
%-------------------------------------
% Information about the image inputs
%-------------------------------------
44 % Nx (image x dimension)
34 % Ny (image y dimension)
57 % Nz (image z dimension - not used if 2D)
R3D.mha       % ReferenceFileName
tT3D.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 WriteDisplacementFields to 1.
%----------------------------------
0 % UseLandmards? - read the file name below if this is true
- % LandmarkFileName
./RatLung_result % ResultsFileName (prefix only)
1 % WriteDisplacementField?
./RatLung_disp  % DisplacementsFileName (prefix only)
0 % ReadMeshFile?
-   % MeshFileName
END
===========================

Thanks again.

Jianguo

Luis Ibanez wrote:

> Hi Jianguo,
>
> Your paramter file doesn't seem to fit the
> expected format.
>
> The filenames of your images are not being
> found but the (simple) parser that gathers
> the information from the input file.
>
> Please post the file to the list.
>
> Thanks
>
>    Luis
>
> --------------------
> Rao Jianguo wrote:
> > Dear All,
> >
> > I am trying  to do a 3D to 3D deformable registration.
> >
> > I used the DeformableRegistration1.cxx as an example and
> > simply changes all the 2D types to 3D.  Compile it, no problem.
> >
> > I also use the param.file for  DeformableRegistration1.
> > Change the two file names for 3D metaimage file name
> > and change the dimension to the specific 3D one.
> >
> > When I run the application.  I got the  the following error message:
> >
> > ===================
> > Reading config file...param.file
> > Example configured. E 0 rho 0
> >  reading moving
> >  reading fixed
> > Exception caught during reference file reading
> >
> > itk::ImageFileReaderException (0x813f628)
> > Location: "Unknown"
> > File: /workingDir/ITK/sourceDir/Insight/Code/IO/itkImageFileReader.txx
> > Line: 91
> > Description: FileName must be specified
> > ===================
> >
> > I suspect that from 2D to 3D the param.file should be different. But I
> > do not have an
> > example to follow. Anyone can help?
> >
> > Thanks
> >
> > Cheers,
> >
> > Jianguo
> >
> >
> >
> > --
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users