X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=common%2FvvImage.txx;h=a6d37c8cbbd8f0447f69c990235fa0963afedb53;hb=3abd767ea72e82f5f3de805917014a0ae2a71da9;hp=90eeb02338e21408be4854687b1ab5969ef1febc;hpb=13408338a1ef8779be07f538aacb787683aa5ddb;p=clitk.git diff --git a/common/vvImage.txx b/common/vvImage.txx index 90eeb02..a6d37c8 100644 --- a/common/vvImage.txx +++ b/common/vvImage.txx @@ -47,7 +47,13 @@ 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); + //META DATA + mDictionary.push_back(&(input->GetMetaDataDictionary())); } //--------------------------------------------------------------------