X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FvvImage.txx;h=55b785fb4814571fd4c0a7788699d03c848b937f;hb=b3eefccefcc9a81814c52e249fe805df7dc2cbf7;hp=90eeb02338e21408be4854687b1ab5969ef1febc;hpb=13408338a1ef8779be07f538aacb787683aa5ddb;p=clitk.git diff --git a/common/vvImage.txx b/common/vvImage.txx index 90eeb02..55b785f 100644 --- a/common/vvImage.txx +++ b/common/vvImage.txx @@ -47,7 +47,11 @@ void vvImage::AddItkImage(TItkImageType *input) (*matrix)[i][3] += input->GetOrigin()[i]; } - mTransform->SetMatrix(matrix); + // GetDirection provides the forward transform, vtkImageReslice wants the inverse + matrix->Invert(); + + mTransform.push_back(vtkSmartPointer::New()); + mTransform.back()->SetMatrix(matrix); } //--------------------------------------------------------------------