Page MenuHomePhabricator

Invalid submatrix extracted for collapsed direction (ExtractImageFilter)
Closed, ResolvedPublic

Description

The mitkExtractImageFilter uses internally the itkExtractImageFilter. Since ITK4 it is possible to define the desired collapse strategy. Currently the strategy DIRECTIONCOLLAPSETOSUBMATRIX is used with which the direction matrix of the input image is collapsed to a submatrix.

This can currently be a problem if the direction matrix of the input image looks like this:

1 0 0
0 0 1
0 -1 0

In this case the submatrix would look:

1 0
0 0

One possible solution would be to use the collapse strategy DIRECTIONCOLLAPSETOGUESS which is backwards compatible with ITK3. In that case if the determinant of the submatrix is 0 then the identity matrix is used.

Attached is a patch with a proposed solution.

Event Timeline

Sorry wrong attachement added. This one should work, but it is just a quick and not tested fix.

New remote branch pushed: bug-15927-AddOptionForCollapseStrategyInExtractImageFilter

[aefd74]: Merge branch 'bug-15927-AddOptionForCollapseStrategyInExtractImageFilt

Merged commits:

2013-09-04 15:01:29 Christoph Kolb [0cc669]
Applied patch for setting collapsestrategy