X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FvvImage.txx;h=a84fa76669d7a317655d725e9e2e8371fd8f133c;hb=24fb0576a860ea843722b1d84561186542b62fd5;hp=06f44af400ef2d75dc0bb12936ed80289672d84f;hpb=4e48b2bd88a018e6e9d383d07d9775f44b336e53;p=clitk.git diff --git a/common/vvImage.txx b/common/vvImage.txx index 06f44af..a84fa76 100755 --- a/common/vvImage.txx +++ b/common/vvImage.txx @@ -13,11 +13,14 @@ void vvImage::AddItkImage(TItkImageType *input) converter->Update(); mVtkImages.push_back( converter->GetOutput() ); - // Account for direction in transform. The offset is already accounted for + // Account for direction in transform. The offset is already accounted for // in the VTK image coordinates, no need to put it in the transform. + vtkSmartPointer matrix = vtkSmartPointer::New(); + matrix->Identity(); for(unsigned int j=0; jGetImageDimension(); j++) for(unsigned int i=0; iGetImageDimension(); i++) - mTransform->GetMatrix()->SetElement(i,j, input->GetDirection()[i][j]); + (*matrix)[i][j] = input->GetDirection()[i][j]; + mTransform->SetMatrix(matrix); // Create the corresponding transformed image mVtkImageReslice.push_back(vtkSmartPointer::New());