]> Creatis software - clitk.git/blobdiff - vv/vvToolProfile.cxx
Fix the profile line display with transformation
[clitk.git] / vv / vvToolProfile.cxx
index 83334a29d55a2425bb0a9037cd6b21084263c18e..f90f6238d2d92949b03d4159138b67c157bcc9ba 100644 (file)
@@ -605,7 +605,10 @@ void vvToolProfile::DisplayLine(int slicer)
 #if VTK_MAJOR_VERSION <= 5
             clipper->SetInput(mLinesPolyData);
 #else
-            clipper->SetInputData(mLinesPolyData);
+            mLineTransform = vtkSmartPointer<vtkTransformPolyDataFilter>::New();
+            mLineTransform->SetInputData(mLinesPolyData);
+            mLineTransform->SetTransform(mCurrentSlicerManager->GetSlicer(slicer)->GetConcatenatedTransform()->GetInverse());
+            clipper->SetInputConnection(mLineTransform->GetOutputPort());
 #endif
             clipper->InsideOutOff();
             clipper->Update();