[Insight-users] 3D deformable registration

Rao Jianguo rao . jianguo at hgu . mrc . ac . uk
Fri, 21 Nov 2003 10:27:44 +0000


--------------BA6ACF0EFDF94F060BD52870
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

OK, I get it solved by myself. Of course Luis's suggestion has
moved me to the correct direction. I have addied another
1 at the  scaling at the lowest let of pyramid as it's 3D.

Cheers,

Jianguo



Rao Jianguo wrote:

> 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
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users

--
Jianguo Rao
MRC Human Genetics Unit                  Tel:+44(0)131 332 2471
Western General Hospital                 Fax:+44(0)131 467 8456
Crewe Road, Edinburgh EH4 2XU            email:Rao . Jianguo at hgu . mrc . ac . uk



--------------BA6ACF0EFDF94F060BD52870
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
OK, I get it solved by myself. Of course Luis's suggestion has
<br>moved me to the correct direction. I have addied another
<br>1 at the&nbsp; scaling at the lowest let of pyramid as it's 3D.
<p>Cheers,
<p>Jianguo
<br>&nbsp;
<br>&nbsp;
<p>Rao Jianguo wrote:
<blockquote TYPE=CITE>Hi Luis,
<p>Many thanks for your message.
<p>Here is the param.file I used.
<p>I have tried to locate
<br>where the thing might go wrong. For example, I have
<br>checked the ReadConfigFile() and can figure out why.
<br>As I have used the style of param.file for 2D deformable
<br>registration and it works fine. The ReadConfigFile() shows
<br>that The same structure for 3D should be fine.&nbsp; I hope you
<br>can help.
<p>========================
<br>% Configuration file #1 for DeformableRegistration1.cxx
<br>%
<br>% This example demonstrates the setup of a basic registration
<br>% problem that doest NOT use multi-resolution strategies. As a
<br>% result, only on evalue for the parameters between
<br>% (# of pixels per element) and (maximum iterations) is necessary.
<br>% If you were using multi-resolution, you would have to specify
<br>% values for those parameters at each level of the pyramid.
<br>%
<br>% Note: the paths in the parameters assume you have the traditional
<br>% ITK file hierarchy as shown below:
<br>% ITK/Insight/Examples/Registration/DeformableRegistration1.cxx
<br>% ITK/Insight/Examples/Data/RatLungSlice*
<br>% ITK/Insight-Bin/bin/DeformableRegistration1
<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>&nbsp; 1 1 % Scaling at lowest level of pyramid
<br>&nbsp;4 % Number of pixels per element
<br>&nbsp;1.e6 % Elasticity (E)
<br>&nbsp;1.e4 % Density x capacity (RhoC)
<br>&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; % Image enery scaling (gamma)
- sets gradient step size
<br>&nbsp;4 % NumberOfIntegrationPoints
<br>&nbsp;4 % WidthOfMetricRegion
<br>&nbsp;40 % MaximumIterations
<br>% ---------------------------------------------
<br>% Parameters for the registration
<br>% ---------------------------------------------
<br>0 0.99&nbsp; % Similarity metric ( 0=mean sq, 1 =ncc, 2=pattern int,
3=MI,
<br>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.e2&nbsp;&nbsp;&nbsp; % TimeStep
<br>%0.5 % Landmark variance
<br>0.5 % Landmark variance
<br>0 % Employ regridding / enforce diffeomorphism ( >=1 -> true)
<br>%-------------------------------------
<br>% Information about the image inputs
<br>%-------------------------------------
<br>44 % Nx (image x dimension)
<br>34 % Ny (image y dimension)
<br>57 % Nz (image z dimension - not used if 2D)
<br>R3D.mha&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; % ReferenceFileName
<br>tT3D.mha&nbsp;&nbsp;&nbsp;&nbsp; % 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 WriteDisplacementFields to 1.
<br>%----------------------------------
<br>0 % UseLandmards? - read the file name below if this is true
<br>- % LandmarkFileName
<br>./RatLung_result % ResultsFileName (prefix only)
<br>1 % WriteDisplacementField?
<br>./RatLung_disp&nbsp; % DisplacementsFileName (prefix only)
<br>0 % ReadMeshFile?
<br>-&nbsp;&nbsp; % MeshFileName
<br>END
<br>===========================
<p>Thanks again.
<p>Jianguo
<p>Luis Ibanez wrote:
<p>> Hi Jianguo,
<br>>
<br>> Your paramter file doesn't seem to fit the
<br>> expected format.
<br>>
<br>> The filenames of your images are not being
<br>> found but the (simple) parser that gathers
<br>> the information from the input file.
<br>>
<br>> Please post the file to the list.
<br>>
<br>> Thanks
<br>>
<br>>&nbsp;&nbsp;&nbsp; Luis
<br>>
<br>> --------------------
<br>> Rao Jianguo wrote:
<br>> > Dear All,
<br>> >
<br>> > I am trying&nbsp; to do a 3D to 3D deformable registration.
<br>> >
<br>> > I used the DeformableRegistration1.cxx as an example and
<br>> > simply changes all the 2D types to 3D.&nbsp; Compile it, no problem.
<br>> >
<br>> > I also use the param.file for&nbsp; DeformableRegistration1.
<br>> > Change the two file names for 3D metaimage file name
<br>> > and change the dimension to the specific 3D one.
<br>> >
<br>> > When I run the application.&nbsp; I got the&nbsp; the following
error message:
<br>> >
<br>> > ===================
<br>> > Reading config file...param.file
<br>> > Example configured. E 0 rho 0
<br>> >&nbsp; reading moving
<br>> >&nbsp; reading fixed
<br>> > Exception caught during reference file reading
<br>> >
<br>> > itk::ImageFileReaderException (0x813f628)
<br>> > Location: "Unknown"
<br>> > File: /workingDir/ITK/sourceDir/Insight/Code/IO/itkImageFileReader.txx
<br>> > Line: 91
<br>> > Description: FileName must be specified
<br>> > ===================
<br>> >
<br>> > I suspect that from 2D to 3D the param.file should be different.
But I
<br>> > do not have an
<br>> > example to follow. Anyone can help?
<br>> >
<br>> > Thanks
<br>> >
<br>> > Cheers,
<br>> >
<br>> > Jianguo
<br>> >
<br>> >
<br>> >
<br>> > --
<br>>
<br>>
<br>> _______________________________________________
<br>> Insight-users mailing list
<br>> Insight-users at itk . org
<br>> <a href="http://www . itk . org/mailman/listinfo/insight-users">http://www . itk . org/mailman/listinfo/insight-users</a>
<p>_______________________________________________
<br>Insight-users mailing list
<br>Insight-users at itk . org
<br><a href="http://www . itk . org/mailman/listinfo/insight-users">http://www . itk . org/mailman/listinfo/insight-users</a></blockquote>

<pre>--&nbsp;
Jianguo Rao
MRC Human Genetics Unit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tel:+44(0)131 332 2471
Western General Hospital&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fax:+44(0)131 467 8456
Crewe Road, Edinburgh EH4 2XU&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; email:Rao . Jianguo at hgu . mrc . ac . uk</pre>
&nbsp;</html>

--------------BA6ACF0EFDF94F060BD52870--