MantisBT - ITK | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0011699 | ITK | ITK | public | 2011-01-14 11:56 | 2011-01-18 17:17 |
Reporter | Andras Lasso 2 | ||||
Assigned To | Bill Lorensen | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | assigned | Resolution | open | ||
Platform | Win7-64, Linux-64 | OS | OS Version | ||
Product Version | ITK-3-18 | ||||
Target Version | Fixed in Version | ||||
Resolution Date | |||||
Sprint | |||||
Sprint Status | backlog | ||||
Summary | 0011699: ImageMaskSpatialObject IsInside and ValueAt methods give inconsistent results | ||||
Description | ImageMaskSpatialObject< TDimension >::IsInside (which determines if the point is inside or not the masked region) uses index[i] = static_cast<int>( p[i] ) to convert from continuous index to integer index. This is inconsistent with ImageSpatialObject< TDimension, PixelType >::ValueAt (which returns the pixel value at a specified position) that uses value = static_cast<double>(DefaultConvertPixelTraits<InterpolatorOutputType>:: GetScalarValue(m_Interpolator->EvaluateAtContinuousIndex(index))) to do the conversion. The effect is that when using a mask for registration many points are incorrectly rejected at the mask boundary during the sampling step (in ImageToImageMetric<TFixedImage,TMovingImage>::SampleFixedImageRegion). When the mask is thin (such as when the ROI is a single slice) this often leads to registration failure (e.g., "Joint PDF summed to zero"). Proposed fix: Change ImageMaskSpatialObject::IsInside to convert continuous indices to integer indices the same way (using the interpolator) as it is done in ImageSpatialObject::ValueAt. See the attached patch that implements this fix. The patch fixed the problem that we encountered during single-slice registration (was tested on Linux and Windows). | ||||
Steps To Reproduce | Create an ImageMaskSpatialObject, call IsInside and ValueAt functions near the masked/non-masked region boundary. Many times IsInside returns 1 while ValueAt returns 0. | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | itkImageMaskSpatialObject-IsInsideFix.patch (602) 2011-01-14 11:56 https://public.kitware.com/Bug/file/3623/itkImageMaskSpatialObject-IsInsideFix.patch itkImageMaskSpatialObjectTest2.cxx (8,841) 2011-01-18 17:17 https://public.kitware.com/Bug/file/3642/itkImageMaskSpatialObjectTest2.cxx | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2011-01-14 11:56 | Andras Lasso 2 | New Issue | |||
2011-01-14 11:56 | Andras Lasso 2 | File Added: itkImageMaskSpatialObject-IsInsideFix.patch | |||
2011-01-14 12:57 | Bill Lorensen | Assigned To | => Bill Lorensen | ||
2011-01-14 12:57 | Bill Lorensen | Status | new => assigned | ||
2011-01-18 17:17 | Andras Lasso 2 | File Added: itkImageMaskSpatialObjectTest2.cxx |
There are no notes attached to this issue. |