[Insight-users] Mutual Information Error

Jordan Soet jds at interchange.ubc.ca
Thu Jun 2 14:23:29 EDT 2005


Thanks, John

You were right about the not having a main function, I should've checked 
that. Anyways, the test works now and it prints out a bunch of [0,0,0]'s 
and then a bunch of [10,12,14]'s, which doesn't seem very random to me, 
but it says test passed at the end, so I guess it's alright and that's 
not the problem.

Thanks again,
Jordan



Woo, John wrote:

> Jordan -
>
> I too am just now learning about the registration algorithms in ITK.  
> In fact, I had encountered the very same problems with re-initializing 
> the seed for the RNG.
>
> I can't help you with why your code is working for 2D but not 3D 
> images.  Perhaps it has something to do with the origin, like Luis 
> suggested?  Can you see what the origins are in your files?
>
> I may be of help with your "_WinMain at 16" error.  Did you put in a 
> "main()" function?  I think the itkImageRandomIteratorTest file does 
> not come with one.
>
> - John.
>
>
> -----Original Message-----
> From: insight-users-bounces+woojohn=uphs.upenn.edu at itk.org
> [mailto:insight-users-bounces+woojohn=uphs.upenn.edu at itk.org]
> Sent: Thursday, June 02, 2005 1:47 PM
> To: Luis Ibanez
> Cc: insight-users at itk.org
> Subject: Re: [Insight-users] Mutual Information Error
>
>
> Well, I thought I had fixed my problem, but it looks like I didn't..
>
>
> After my last e-mail where I mentioned that I got the error message even
> if I set the fixed and moving image to the same image I started looking
> to see if maybe it was something to do with the random number generator,
> and through looking through the mailing list I realized that I hadn't
> initialized the seed. So, I added metric->ReinitializeSeed() and it
> seemed to fix my problem, I could get ImageRegistration11 working on 3D
> images.
>
> However, ImageRegistration11 only uses a translation transform, so I
> changed it to an affine transform and the problem came back. I again got
> the message "Too many samples map outside moving image buffer: 0 /
> 10000". I then tried changing it back to 2D while still using an affine
> transform and it worked fine. I then tried using
> MultiResImageRegistration2 and changing it to 3D, since it already uses
> an affine transform, and would remove the possibility that I was making
> errors with the transform, but again, it worked on 2D images but when I
> moved to 3D images it gave me the exception. Also, I tried these all
> using the same image for both inputs, as well.
>
> In addition, I also tried testing my random number generator by building
> itkImageRandomIteratorTest, as suggested in another e-mail, but I got
> the following error:
>
> Building executable /home/Jordan/Test/itkImageRandomIteratorTest.exe...
> /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../libcygwin.a(libcmain.o)(.text+0xb 
>
> 3): undefined reference to `_WinMain at 16'
> collect2: ld returned 1 exit status
> make: *** [/home/Jordan/Test/itkImageRandomIteratorTest.exe] Error 1
>
>
> Thanks in advance for any advice,
> Jordan
>
>
>



More information about the Insight-users mailing list