[Insight-users] GetInverse

David Doria daviddoria at gmail.com
Tue Dec 11 10:44:23 EST 2012


On Tue, Dec 11, 2012 at 9:29 AM, Ted Broom <tedbroom123 at gmail.com> wrote:
> Hi List;
>
> I would like to simply implement the inverse of a translation transform;
> can someone point me in the correct direction of an example that uses
> GetInverse;
>
> Thanks

You can get the inverse as an itk::Matrix like this:

typedef itk::Matrix<double, 2, 2> MatrixType;

MatrixType M;
// ... fill M ...

MatrixType Minv( M.GetInverse() ); // Have to do this, because
GetInverse returns a vnl_matrix

I have added an example here:
http://www.itk.org/Wiki/ITK/Examples/Math/MatrixInverse

David


More information about the Insight-users mailing list