+ // Spacing is influenced by affine transform matrix and input direction
+ typename InputImageType::SpacingType outputSpacing;
+ outputSpacing = invRotMatrix *
+ input->GetDirection() *
+ input->GetSpacing();
+
+ // Origin is influenced by translation but not by input direction
+ typename InputImageType::PointType outputOrigin;
+ outputOrigin = invRotMatrix *
+ input->GetOrigin() +
+ invTrans;
+
+ // Size is influenced by affine transform matrix and input direction
+ // Size is converted to double, transformed and converted back to size type.