Make this code compatible with ITK4.5 by adding SetDirectionCollapseToSubmatrix to ExtractImageFilter