MantisBT - ITK | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0009709 | ITK | public | 2009-10-13 18:53 | 2010-10-21 12:31 | |
Reporter | Kishore Mosaliganti | ||||
Assigned To | Luis Ibanez | ||||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | ITK-3-16 | ||||
Target Version | Fixed in Version | ||||
Resolution Date | |||||
Sprint | |||||
Sprint Status | |||||
Summary | 0009709: Isotropic image spacing in itkLevelsetMotionRegistrationImageFilter | ||||
Description | Hi all, I was using the LevelsetMotionRegistrationImageFilter to register two 3D image datasets whose voxels have anisotropic spacing: RegistrationFilterType::Pointer filter = RegistrationFilterType::New(); CommandIterationUpdate::Pointer observer = CommandIterationUpdate::New(); filter->AddObserver( itk::IterationEvent(), observer ); filter->SetFixedImage( fixedImage ); filter->SetMovingImage( movingImage ); filter->SetNumberOfIterations( 50 ); filter->SetGradientSmoothingStandardDeviations( 0.1 ); filter->UseImageSpacingOn(); filter->Update(); The problem is I get a Segmentation fault when I turn on UseImageSpacingOn(). Otherwise, the filter executes normally. I used the debugger and went into the code. LevelsetMotionRegistrationImageFilter is a sub-class of itkPDEDeformableRegistrationImageFilter which is a subclass of itkFiniteDifferenceImageFilter. The code failed in the itkFiniteDifferenceImageFilter::GenerateData() method in the following lines: .... if (this->GetState() == UNINITIALIZED) { // Set the coefficients for the deriviatives double coeffs[TInputImage::ImageDimension]; if (m_UseImageSpacing) { for (unsigned int i = 0; i < TInputImage::ImageDimension; i++) { coeffs[i] = 1.0 / this->GetInput()->GetSpacing()[i]; } } else { for (unsigned int i = 0; i < TInputImage::ImageDimension; i++) { coeffs[i] = 1.0; } } ..... When I went to see the state of the input pointer, this->m_Input has 3 image pointers. Basically, this->m_Input[1] refers to the fixed image and this->m_Input[2] refers to the moving image. this->m_Input[0] is NULL. The code in itkPDEDeformableRegistrationImageFilter::SetFixedImage() and itkPDEDeformableRegistrationImageFilter::SetMovingImage() incorrectly call this->ProcessObject::SetNthInput( 1, const_cast< FixedImageType * >( ptr ) ) and this->ProcessObject::SetNthInput( 2, const_cast< FixedImageType * >( ptr ) ) respectively. Clearly, the indices need to be 0 and 1. | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2009-10-13 18:53 | Kishore Mosaliganti | New Issue | |||
2009-10-17 17:22 | Luis Ibanez | Status | new => assigned | ||
2009-10-17 17:22 | Luis Ibanez | Assigned To | => Luis Ibanez | ||
2009-10-17 17:23 | Luis Ibanez | Note Added: 0018095 | |||
2009-10-17 17:44 | Luis Ibanez | Note Added: 0018096 | |||
2009-10-17 18:09 | Kishore Mosaliganti | Note Added: 0018097 | |||
2009-10-19 09:16 | Luis Ibanez | Note Added: 0018103 | |||
2009-10-19 09:28 | Luis Ibanez | Note Added: 0018104 | |||
2009-10-19 11:34 | Luis Ibanez | Note Added: 0018108 | |||
2009-10-19 11:35 | Luis Ibanez | Note Added: 0018109 | |||
2009-10-19 11:35 | Luis Ibanez | Status | assigned => resolved | ||
2009-10-19 11:35 | Luis Ibanez | Resolution | open => fixed | ||
2009-10-20 16:41 | Luis Ibanez | Note Added: 0018130 | |||
2010-10-21 12:31 | Gabe Hart | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|