Page MenuHomePhabricator

Check for misalignment of mask and image in the mitkImageStatisticsCalculator doesn't work for rotated geometries
Closed, ResolvedPublic

Description

The check for misalignment in the method mitk::ImageStatisticsCalculator::InternalCalculateStatisticsMasked doesn't work when the geometries of the image and the mask are rotated in the world coordinate system. Currently it checks if the difference between the origin of the mask and the origin of the image is a multiple of the image spacing (for each direction). This doesn't work if the geometries are rotated.

Solution:

  • Check if the direction of the mask and the image are the same
  • Transform the origin of the mask into continuous index coordinates of the image
    • Check if the continuous index coordinates are integer values or rather if they are very close to an integer value ( < mitk::eps )

Event Timeline

in the attachment is the proposed solution

Danial, could you please write the WIKI specification and get this one approved for master?

Thanks!

[040251]: Merge branch 'bug-9689-rebased'

Merged commits:

2011-10-11 16:50:57 Mathias Seitel [9cc2d1]
Modified misalignment check to cover tilted geometries