The mitkBoundingObjectCutter produces different results from 2012.12 to 2013.03 using the exact same bounding box and the same image (see attachements). IMO, the behavior of 2012.12 is correct and the behavior of 2013.03 is not.
Description
Description
Event Timeline
Comment Actions
Nevermind my previous comment, it's still there. The issue seems to come from the lines
mitk::SlicedData::IndexType index=m_InputRequestedRegion.GetIndex(); //init times and channels mitk::BoundingBox::PointType min = boBoxRelativeToImage->GetMinimum(); index[0] = (mitk::SlicedData::IndexType::IndexValueType)(std::ceil(min[0])); index[1] = (mitk::SlicedData::IndexType::IndexValueType)(std::ceil(min[1])); index[2] = (mitk::SlicedData::IndexType::IndexValueType)(std::ceil(min[2])); mitk::SlicedData::SizeType size = m_InputRequestedRegion.GetSize(); //init times and channels mitk::BoundingBox::PointType max = boBoxRelativeToImage->GetMaximum(); size[0] = (mitk::SlicedData::SizeType::SizeValueType)(std::ceil(max[0])-index[0]); size[1] = (mitk::SlicedData::SizeType::SizeValueType)(std::ceil(max[1])-index[1]); size[2] = (mitk::SlicedData::SizeType::SizeValueType)(std::ceil(max[2])-index[2]);
Setting them as they were in 2012.12 seems to fix the problem
mitk::SlicedData::IndexType index=m_InputRequestedRegion.GetIndex(); //init times and channels mitk::BoundingBox::PointType min = boBoxRelativeToImage->GetMinimum(); index[0] = (mitk::SlicedData::IndexType::IndexValueType)((min[0]+0.5)); index[1] = (mitk::SlicedData::IndexType::IndexValueType)((min[1]+0.5)); index[2] = (mitk::SlicedData::IndexType::IndexValueType)((min[2]+0.5)); mitk::SlicedData::SizeType size = m_InputRequestedRegion.GetSize(); //init times and channels mitk::BoundingBox::PointType max = boBoxRelativeToImage->GetMaximum(); size[0] = (mitk::SlicedData::SizeType::SizeValueType)((max[0]+0.5)-index[0]); size[1] = (mitk::SlicedData::SizeType::SizeValueType)((max[1]+0.5)-index[1]); size[2] = (mitk::SlicedData::SizeType::SizeValueType)((max[2]+0.5)-index[2]);
Comment Actions
This task was automatically closed because it wasn't updated at least since July 2016 (over 2 years). Please re-open this task if you think that it is still relevant. This most probably means that you will resolve it.