[Insight-users] Memory Access Violation in itkAnisotropicDiffusionVesselEnhancementImageFilter

Constantine Zakkaroff mnkz at leeds.ac.uk
Wed Aug 26 12:40:01 EDT 2009


Dear ALL,

I've downloaded from Insight Journal the code for Vessel Enhancing 
Diffusion Filter 
[http://www.insight-journal.org/browse/publication/163], but when I run 
the itkAnisotropicDiffusionVesselEnhancementImageFilterTest on the data 
provided in the download, the code reports access violation after this 
output:

Reading input image : CroppedWholeLungCTScan.mhd
Enhancing vessels.........: CroppedWholeLungCTScan.mhd
Iteration:      0
Computing vesselness for scale with sigma= 0.5
Computing vesselness for scale with sigma= 0.615572
Computing vesselness for scale with sigma= 0.757858
Computing vesselness for scale with sigma= 0.933033
Computing vesselness for scale with sigma= 1.1487
Computing vesselness for scale with sigma= 1.41421
Computing vesselness for scale with sigma= 1.7411
Computing vesselness for scale with sigma= 2.14355
Computing vesselness for scale with sigma= 2.63902
Computing vesselness for scale with sigma= 3.24901
Computing vesselness for scale with sigma= 4
Generate tensor matrix:

I've tried to look into the cause and it appears things start to get 
sour when this code in itkSymmetricSecondRankTensor.h (line 114) gets 
passed an array with unallocated buffer:

SymmetricSecondRankTensor(const Self& r): BaseArray(r) {}

-		m_InternalArray	0x03945a50	double [6]
		[0]	CXX0030: Error: expression cannot be evaluated	
                 ...
		[5]	CXX0030: Error: expression cannot be evaluated

The call to SymmetricSecondRankTensor constructor comes from 
itkAnisotropicDiffusionVesselEnhancementFunction.txx, ComputeUpdate call:

template< class TImageType >
typename AnisotropicDiffusionVesselEnhancementFunction< TImageType 
 >::PixelType
AnisotropicDiffusionVesselEnhancementFunction< TImageType >
::ComputeUpdate(const NeighborhoodType &it,
                 const DiffusionTensorNeighborhoodType &gt,
                 void *globalData,
                 const FloatOffsetType& offset)
{
...
...
...
     TensorPixelType positionA_Tensor_value = gt.GetPixel( positionA );

positionA is 22 at the moment of the call, which is within (?) the 
boundaries of the neighbourhood iterator.

I have not modified the code, just running it as it is. So I'm wondering 
if anyone can please suggest what's going wrong and how to fix it or is 
there a more recent version of the code available anywhere?

Any suggestions would be appreciated.

Best regards,
Constantine



More information about the Insight-users mailing list