[Insight-users] MattesMutualInformation MultiResolution Registration crashes

Jan Schreiber Jan.Schreiber at umit.at
Wed Jun 1 06:57:06 EDT 2005


Hi, 

my registation of two x-ray images (sometimes) crashes.
I am using the cvs version (about 1-2 weeks old) of ITK, Microsoft Visual C++ .NET and the following components:
  itk::RegularStepGradientDescentOptimizer
  itk::LinearInterpolateImageFunction
  itk::MultiResolutionImageRegistrationMethod
  itk::(Recursive)MultiResolutionPyramidImageFilter
  itk::(Recursive)MultiResolutionPyramidImageFilter
  itk::MattesMutualInformationImageToImageMetric


The Error occures in ImageConstIteratorWithIndex.h line 234
  PixelType Get(void) const  
    { return m_PixelAccessor.Get(*m_Position); }
because m_Position is not valid. 

This Get() Function is called in line 532 of itkMattesMutualInformationImageToImageMetric.txx
      (*iter).FixedImageValue = regionIter.Get();

Consulting the debugger gives information shown at the end of this mail ( have a look at the line with <<========== )

The Spacing of my image is usually 1.0 (as I am reading PNG Images). Within the pyramid (the output below is from level 4) the spacing is 8.0. Is this realted to the downsampling?
Originally, my Images have a size of 2828x2320 Pixels, 8 bit stored as float and the FixedImageRegion ist set to x:1800, y:1000, w:940, h:1290.

m_Position gets invalid if the level of the MultiResolutionImageRegistrationMethod is >= 3.
The chance for this crah is almost 100% when SetUseAllPixels(true) is used and the FixedImageRegion is not the LergestPossibleRegion. Taking random Pixels reduces the risk of a crah but does not eliminate it. 
Setting the FixedImageRegion to something smaller than the LargestPossibleRegion increases the crash-frequency .

I would be very glad if you had any suggestion...

Thanks in advance, 
Jan



Debugger output:

-	regionIter	{...}	itk::ImageRegionConstIteratorWithIndex<ibia::Image2DFloat>
-	itk::ImageConstIteratorWithIndex<ibia::Image2DFloat>	{ImageDimension=??? m_Image={m_Pointer=0x0a088e98 } m_PositionIndex={m_Index=0x011edc1c } ...}	itk::ImageConstIteratorWithIndex<ibia::Image2DFloat>
-	m_Image	{m_Pointer=0x0a088e98 }	itk::WeakPointer<ibia::Image2DFloat const >
-	m_Pointer	0x0a088e98	const ibia::Image2DFloat *
-	ibia::Image2D<float>	{...}	const ibia::Image2D<float>
-	ibia::ImageBase<float,2>	{...}	const ibia::ImageBase<float,2>
-	itk::Image<float,2>	{ImageDimension=??? }	const itk::Image<float,2>
-	itk::ImageBase<2>	{ImageDimension=??? m_Spacing={...} m_Origin={...} ...}	const itk::ImageBase<2>
+	itk::DataObject	{m_Source={m_Pointer=0x0a088db8 {m_Updating=??? m_OutputInformationMTime=??? m_Inputs=??? ...} } m_SourceOutputIndex=0 m_UpdateMTime={m_ModifiedTime=2988 } ...}	itk::DataObject
-	m_Spacing	{...}	itk::Vector<double,2>
-	itk::FixedArray<double,2>	{Length=??? }	itk::FixedArray<double,2>
-	m_InternalArray	0x0a088ee0	double [2]
	[0]	8.0000000000000000	double
	[1]	8.0000000000000000	double
-	m_Origin	{...}	itk::Point<double,2>
-	itk::FixedArray<double,2>	{Length=??? }	itk::FixedArray<double,2>
-	m_InternalArray	0x0a088ef0	double [2]
	[0]	0.00000000000000000	double
	[1]	0.00000000000000000	double
+	m_Direction	{RowDimensions=??? }	itk::Matrix<double,2,2>
+	m_OffsetTable	0x0a088f20	long [3]
-	m_LargestPossibleRegion	{ImageDimension=??? SliceDimension=??? }	itk::ImageRegion<2>
+	itk::Region	{...}	const itk::Region
-	m_Index	{m_Index=0x0a088f30 }	itk::Index<2>
-	m_Index	0x0a088f30	long [2]
	[0]	0	long
	[1]	0	long
-	m_Size	{m_Size=0x0a088f38 }	itk::Size<2>
-	m_Size	0x0a088f38	unsigned long [2]
	[0]	353	unsigned long
	[1]	290	unsigned long
-	m_RequestedRegion	{ImageDimension=??? SliceDimension=??? }	itk::ImageRegion<2>
+	itk::Region	{...}	const itk::Region
-	m_Index	{m_Index=0x0a088f44 }	itk::Index<2>
-	m_Index	0x0a088f44	long [2]
	[0]	0	long
	[1]	0	long
-	m_Size	{m_Size=0x0a088f4c }	itk::Size<2>
-	m_Size	0x0a088f4c	unsigned long [2]
	[0]	353	unsigned long
	[1]	290	unsigned long
-	m_BufferedRegion	{ImageDimension=??? SliceDimension=??? }	itk::ImageRegion<2>
+	itk::Region	{...}	const itk::Region
-	m_Index	{m_Index=0x0a088f58 }	itk::Index<2>
-	m_Index	0x0a088f58	long [2]
	[0]	0	long
	[1]	0	long
-	m_Size	{m_Size=0x0a088f60 }	itk::Size<2>
-	m_Size	0x0a088f60	unsigned long [2]
	[0]	353	unsigned long
	[1]	290	unsigned long
+	m_Buffer	{m_Pointer=0x0a088fb0 {m_ImportPointer=??? m_Size=??? m_Capacity=??? ...} }	itk::SmartPointer<itk::ImportImageContainer<unsigned long,float> >
-	m_PositionIndex	{m_Index=0x011edc1c }	itk::Index<2>
-	m_Index	0x011edc1c	long [2]
	[0]	257	long
	[1]	129	long
-	m_BeginIndex	{m_Index=0x011edc24 }	itk::Index<2>
-	m_Index	0x011edc24	long [2]
	[0]	225	long
	[1]	125	long
-	m_EndIndex	{m_Index=0x011edc2c }	itk::Index<2>
-	m_Index	0x011edc2c	long [2]
	[0]	342	long
	[1]	286	long
-	m_Region	{ImageDimension=??? SliceDimension=??? }	itk::ImageRegion<2>
+	itk::Region	{...}	const itk::Region
+	m_Index	{m_Index=0x011edc38 }	itk::Index<2>
+	m_Size	{m_Size=0x011edc40 }	itk::Size<2>
-	m_OffsetTable	0x011edc48	unsigned long [3]
	[0]	1	unsigned long
	[1]	353	unsigned long
	[2]	102370	unsigned long
-	m_Position	0x0a178000	const float *
		CXX0030: Fehler: Ausdruck kann nicht ausgewertet werden	const float       <<================
-	m_Begin	0x0a13f520	const float *
		86.568977	const float
-	m_End	0x0a176970	const float *
		8.7256823	const float
	m_Remaining	true	bool
	m_PixelAccessor	{...}	itk::DefaultPixelAccessor<float>



More information about the Insight-users mailing list