Hi Luis,<br>
<br>
Thank you.<br>
<br>
It seems that the image orientation of my data is the reason <br>
that cause this error.<br>
<br>
The Print() dumps:<br>
Direction: <br>
1 0 0<br>
0 -1 0<br>
0 0 1<br>
<br>
After I force the line 245 In DeformableRegistration13.cxx to <br>
[ 1 0 0<br>
0 1 0<br>
0 0 1] with <br>
<br>
FixedImageType::DirectionType gridDirection = fixedImage->GetDirection();<br>
gridDirection.SetIdentity();<br>
<br>
The registration of example 12, 13, 15 runs quite well!<br>
<br>
>>Do you get this exception error at the very beggining of the <br>
>>registration process ? <br>
<br>
I get the error message right after registration->StartRegistration();<br>
It didn't even reaching the optimization stage.<br>
<br>
<br>
I am wondering that with the same image direction in both fix and<br>
mov images with <br>
<br>
Direction: <br>
1 0 0<br>
0 -1 0<br>
0 0 1,<br>
<br>
why the registration wouldn't be able to matching two the same <br>
image direction together? <br>
<br>
Has it got trouble with getting derivatives within BSplineTransform?<br>
<br>
<br>
Thanks very much.<br>
john<br>
<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: Luis Ibanez <luis.ibanez@kitware.com><br>
To: johnjtchen@aol.co.uk<br>
Cc: insight-users@itk.org<br>
Sent: Sun, 29 Jun 2008 1:20 am<br>
Subject: Re: [Insight-users] Exceptions with Deformable BSpline registration.<br>
<br>
<div id=AOLMsgPart_0_53147b80-e439-44f8-9ef9-33660d0ebca0 style="FONT-SIZE: 12px; MARGIN: 0px; COLOR: #000; FONT-FAMILY: Tahoma, Verdana, Arial, Sans-Serif; BACKGROUND-COLOR: #fff">Hi John, <br>
<br>
This error message indicates that under the current Transform, <br>
the two images don't have a a significant overlapping region. <br>
<br>
This may be the result of poor initialization, or the result <br>
of an optimizer set to take strides that are too large. <br>
<br>
Setting the CMake flag to <br>
<br>
ITK_USE_ORIENTED_IMAGE_DIRECTION=ON <br>
<br>
is the right thing to do. <br>
<br>
Do you get this exception error at the very beggining of the <br>
registration process ? <br>
<br>
or do you get the error message after running the optimzer <br>
for several iterations ? <br>
<br>
Could you please do the following ? <br>
<br>
In any of the examples that you are trying, please add the <br>
following code: <br>
<br>
fixedImageReader->Update(); <br>
movingImageReeader->Update(); <br>
fixedImageReader->GetOutput()->Print(); <br>
movingImageReader->GetOutput()->Print(); <br>
<br>
This will help us see what is the initial overlap <br>
between the images. Please post to the list the entire <br>
output. We will be particularly interested in Origin, <br>
Spacing and Direction of both the Moving and Fixed images. <br>
<br>
<br>
Also, <br>
<br>
Could you please post to the list the output log of <br>
DeformableRegistration15 ? <br>
<br>
This is the example that perfoms Rigid, then Affine, and <br>
then a BSpline deformable registration with two levels <br>
of resolution in the BSpline grid. <br>
<br>
Thanks <br>
<br>
Luis <br>
<br>
--------------------------- <br>
<A __removedLink__1807393490__href="mailto:johnjtchen@aol.co.uk">johnjtchen@aol.co.uk</A> wrote: <br>
> Dear All, <br>
> > I have some problems with running BSpline with Mattes MI metric <br>
> registration from example\registration directory. <br>
> > No matter how I try the various conbination of the paramters of <br>
> LBFGSB or RegularStepGradient optimizer, the results that I can <br>
> get are "Joint PDF summed to zero" with gradient optimizer or <br>
> "Too many samples are mapping outside image" with LBFGSB. <br>
> > The images for registration are T1 256*256*92 brains. I am sure <br>
> that the origin of fix and mov images are both [0,0,0], and the <br>
> images have been rigidly aligned. <br>
> > I am windering is that the effects with regarding to the CMake <br>
> option "ITK_USE_ORIENTED_IMAGE_DIRECTION=ON"? Because <br>
> now the itkMattesMutualInformationImageMetric has been redirect <br>
> to itkOptMattesMutualInformationImageMetric. <br>
> > The examples that I try were Deformable8, 12, 13 and 15. It all gave <br>
> me the exceptions that mentioned above. <br>
> > Could you give some advice on this problem? <br>
> > Thanks very much. <br>
> john <br>
> > _______________________________________________ <br>
> Insight-users mailing list <br>
> <A __removedLink__1807393490__href="mailto:Insight-users@itk.org">Insight-users@itk.org</A> <br>
> <A target=_blank __removedLink__1807393490__href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A> <br>
</div>
<!-- end of AOLMsgPart_0_53147b80-e439-44f8-9ef9-33660d0ebca0 --><div id='u8CAA7F322835443-798-1FAB' class='aol_ad_footer'><FONT style="color: black; font: normal 10pt ARIAL, SAN-SERIF;"><HR style="MARGIN-TOP: 10px"><A title="http://toolbar.aol.com/moviefone/download.html?ncid=aolcmp00050000000011" href="http://toolbar.aol.com/moviefone/download.html?ncid=aolcmp00050000000011" target="_blank">Get the Moviefone Toolbar</A>. Showtimes, theaters, movie news, & more!</FONT> </div>