[Insight-users] RE: Error: jointPDFSum == 0!
Luis Ibanez
luis.ibanez at kitware.com
Fri Dec 10 00:23:56 EST 2004
Hi George,
The Example ImageRegistration4.cxx has already a
Command/Observer connected to the optimizer.
When you run the example... do you get any output
from this observer ?
It should be something like an iteration number,
the metric value and the list of transform parameters
(potentially many of those lines).
Please post the the list *all* the messages that you
get before you see the exception being thrown.
Thanks
Luis
--------------------------------
Li, George (NIH/NCI) wrote:
> Jim:
>
> I used the same image series for both fixed and moving images, so that it is
> guaranteed to have overlap between the two. Of course, presumably the origin
> of the two is the same, as it was indicated in both print-out of the images
> (I did not provide both in my previous mail, because they are identical).
>
> Based on your explanation on the exception message, similar to what I
> guessed from these words, there must be something else that has not been set
> correctly, rather than the image series themselves.
>
> Based on your experience, do you think my simple approach to register 3D
> images is valid? I did simple substitution of imageFileReader in the
> imageRegistration4.cxx by the dicomSeriesReader from the other example. I
> assumed that the registration behind the scene is implemented independent of
> the dimension of the image, as it should.
>
> Anyway, I am new to ITK and your input is very valuable.
>
> Thanks,
>
> George
>
>
>
> -----Original Message-----
> From: Miller, James V (Research) [mailto:millerjv at crd.ge.com]
> Sent: Thursday, December 09, 2004 1:56 PM
> To: Li, George (NIH/NCI); 'insight-users at itk.org'
> Subject: RE: [Insight-users] RE: Error: jointPDFSum == 0!
>
>
> George,
>
> What is the origin of the other image?
>
> It looks like the origin of one image is [0, 0, -1264.5].
>
> Your transform is probably initially the identity, resulting in an
> assumption that the two image set overlap in physical space (meaning if you
> laid out the two images pinned down at their respective origins, and the
> sizes of the image took into account the spacing of the pixels, then the two
> images would overlap).
>
> Whenever you get the message
>
> Too many samples map outside moving image buffer: 0 / 10000
>
> It means the fixed and moving image are not overlapping (after the
> application of the current transform). A set of points is selected
> in on of the images and mapped through the transform to identify locations
> in the other image. If the mapping puts all the samples outside the other
> image, then an exception occurs.
>
> If you "know" the images are supposed to span the same region
> of anatomy, then the two image series may simply have had different
> landmarks prescribed during acquisition. In this case, you can either set
> the initial transformation to be a translation of
>
> movingImageReader->GetOutput()->GetOrigin() -
> fixedImageReader->GetOutput()->GetOrigin()
>
> or you can use the ChangeInformationImageFilter to override the origin of
> one of the images.
>
> Jim
>
>
>
>
> -----Original Message-----
> From: Li, George (NIH/NCI) [mailto:ligeorge at mail.nih.gov]
> Sent: Wednesday, December 08, 2004 10:08 AM
> To: 'Miller, James V (Research)'; 'insight-users at itk.org'
> Subject: RE: [Insight-users] RE: Error: jointPDFSum == 0!
>
>
> Jim:
>
> Thanks for the tip to print out the image. Here is the print out content
> about the image and the exception. Maybe it will give a clue to what has
> gone wrong. This time, the exception seems thrown out a bit earlier in the
> GetValue() method. It complains "Too many samples map outside moving image
> buffer" at the end.
>
>
> Argument[1]: ..\ITK_Data\PQ_HDR_VR-vr
> Argument[2]: ..\ITK_Data\PQ_HDR_VR-vr
>
> Now reading series:
>
> 2.16.840.1.113662.2.2534022882858481901029150326.1
> Image (0166FE68)
> RTTI typeinfo: class itk::Image<unsigned short,3>
> Reference Count: 1
> Modified Time: 2805
> Debug: Off
> Observers:
> none
> Source: (0166DA80)
> Source output index: 0
> Release Data: Off
> Data Released: False
> Global Release Data: Off
> PipelineMTime: 1447
> UpdateMTime: 2806
> LargestPossibleRegion:
> Dimension: 3
> Index: [0, 0, 0]
> Size: [512, 512, 43]
> BufferedRegion:
> Dimension: 3
> Index: [0, 0, 0]
> Size: [512, 512, 43]
> RequestedRegion:
> Dimension: 3
> Index: [0, 0, 0]
> Size: [512, 512, 43]
> Spacing: [0.742188, 0.742188, 10]
> Origin: [0, 0, -1264.5]
> PixelContainer:
> ImportImageContainer (0166FF80)
> RTTI typeinfo: class itk::ImportImageContainer<unsigned long,
> unsigned short>
> Reference Count: 1
> Modified Time: 1515
> Debug: Off
> Observers:
> none
> Pointer: 0166FFB0
> Container manages memory: true
> Size: 11272192
> Capacity: 11272192
>
> ExceptionObject caught !
>
> itk::ExceptionObject (0104FBE4)
> Location: "Unknown"
> File: C:\Programming\ITK_1.8.0\InsightToolkit-1.8.0\Code\Algorithms\
> itkMattesMutualInformationImageToImageMetric.txx
> Line: 623
> Description: itk::ERROR:
> MattesMutualInformationImageToImageMetric(01667B50):
> Too many samples map outside moving image buffer: 0 / 10000
>
>
> I checked the origin with another image series, it has all
> zero value but with the same exception, so the negative z0 should not be the
> cause.
>
> Any idea about "Too many samples map outside moving image
> Buffer"?
>
> Thanks,
>
> George
>
>
>
>
> -----Original Message-----
> From: Miller, James V (Research) [mailto:millerjv at crd.ge.com]
> Sent: Tuesday, December 07, 2004 2:49 PM
> To: Li, George (NIH/NCI); 'insight-users at itk.org'
> Subject: RE: [Insight-users] RE: Error: jointPDFSum == 0!
>
>
> George,
>
> Are the images being read in correctly? After you do a
> fixedImageReader->Update(), can you print out the image
>
> fixedImageReader->GetOutput()->Print(std::cout);
>
> (and the same for the moving image) to make sure the images have the proper
> resolution?
>
> Jim
>
> -----Original Message-----
> From: Li, George (NIH/NCI) [mailto:ligeorge at mail.nih.gov]
> Sent: Tuesday, December 07, 2004 1:48 PM
> To: 'insight-users at itk.org'
> Subject: [Insight-users] RE: Error: jointPDFSum == 0!
>
>
> BTW, even if I used the identical dicom image series
> for both fixedImage and movingImage, this problem is
> still there. In this case, jointPDFSum must equal to
> 1.0. So, it shouldn't be image data related problem,
> unless the data is not read properly or completely.
>
> As a matter of fact, I think jointPDFSum is assigned
> by a value that is not initialized, because in VC6++
> debug tool, jointPDFSum value is 1.#QNAN00000000000.
>
> Anyone can help me with this?
>
> Thanks,
>
> George
>
>
>
>
> Hi, Luis and insight users:
>
> I did a test to combine two examples together and
> see how image registration can be applied to 3D
> image series. Enclosed please find my code for the
> registration of 3D image series.
>
> Basically, I used the ImageRegistration4.cxx as the
> major code but replaced the image reading part with corresponding code in
> DicomSeriesReadImageWrite.cxx.
>
> Unfortunately, I got an exception that is related a
> zero sum for the jointPDFSum, which supposed to be 1,
> inside itkMattesMutualInformationImageToImageMetric::
> GetValue().
>
> What could be done wrong here? Is there extra things
> need to be done for the image series, comparing with
> single image file?
>
> Thanks a lot.
>
> George
>
> _______________________________________________
> 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
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
More information about the Insight-users
mailing list