X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkDicomRT_Contour.cxx;fp=common%2FclitkDicomRT_Contour.cxx;h=4bd4598316a77fb1788851bade1cf883b44d3146;hb=796954f9fff960cee1599e5a8960e0f424931900;hp=7fc71114bc43c987ba9dd9756a5f037a2df99618;hpb=80ae933047228d0164157aa4a25a3ed7b9c2eb7e;p=clitk.git diff --git a/common/clitkDicomRT_Contour.cxx b/common/clitkDicomRT_Contour.cxx index 7fc7111..4bd4598 100644 --- a/common/clitkDicomRT_Contour.cxx +++ b/common/clitkDicomRT_Contour.cxx @@ -253,6 +253,14 @@ void clitk::DicomRT_Contour::SetMesh(vtkPolyData * mesh) //-------------------------------------------------------------------- +//-------------------------------------------------------------------- +void clitk::DicomRT_Contour::SetTransformMatrix(vtkMatrix4x4* matrix) +{ + mTransformMatrix = matrix; +} +//-------------------------------------------------------------------- + + //-------------------------------------------------------------------- void clitk::DicomRT_Contour::ComputeMeshFromDataPoints() { @@ -263,13 +271,24 @@ void clitk::DicomRT_Contour::ComputeMeshFromDataPoints() mMesh->SetPoints(mPoints); vtkIdType ids[2]; for (unsigned int idx=0 ; idxGetPoint(idx)[j]; + pointIn[4] = 1.0; + /*mTransformMatrix->MultiplyPoint(pointIn, pointOut); + std::cout << pointOut[0] << " " << pointOut[1] << " " << pointOut[2] << " " << pointOut[3] << std::endl; + mMesh->GetPoints()->InsertNextPoint(pointOut[0], + pointOut[1], + pointOut[2]);*/ mMesh->GetPoints()->InsertNextPoint(mData->GetPoint(idx)[0], mData->GetPoint(idx)[1], mData->GetPoint(idx)[2]); + //std::cout << mData->GetPoint(idx)[0] << " " << mData->GetPoint(idx)[1] << " " << mData->GetPoint(idx)[2] << std::endl; ids[0]=idx; ids[1]=(ids[0]+1) % mNbOfPoints; //0-1,1-2,...,n-1-0 mMesh->GetLines()->InsertNextCell(2,ids); } + //std::cout << std::endl; mMeshIsUpToDate = true; } //--------------------------------------------------------------------