From 87bc8d3939a62ac6c2f0f1c72fb83cf24c49ec41 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Tue, 23 Feb 2016 14:45:27 +0100 Subject: [PATCH] Fix the profile line display with transformation --- vv/vvToolProfile.cxx | 5 ++++- vv/vvToolProfile.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/vv/vvToolProfile.cxx b/vv/vvToolProfile.cxx index 83334a2..f90f623 100644 --- a/vv/vvToolProfile.cxx +++ b/vv/vvToolProfile.cxx @@ -605,7 +605,10 @@ void vvToolProfile::DisplayLine(int slicer) #if VTK_MAJOR_VERSION <= 5 clipper->SetInput(mLinesPolyData); #else - clipper->SetInputData(mLinesPolyData); + mLineTransform = vtkSmartPointer::New(); + mLineTransform->SetInputData(mLinesPolyData); + mLineTransform->SetTransform(mCurrentSlicerManager->GetSlicer(slicer)->GetConcatenatedTransform()->GetInverse()); + clipper->SetInputConnection(mLineTransform->GetOutputPort()); #endif clipper->InsideOutOff(); clipper->Update(); diff --git a/vv/vvToolProfile.h b/vv/vvToolProfile.h index 03fcd0c..94b377f 100644 --- a/vv/vvToolProfile.h +++ b/vv/vvToolProfile.h @@ -37,6 +37,7 @@ #include #include #include +#include //------------------------------------------------------------------------------ class vvToolProfile: @@ -87,6 +88,7 @@ class vvToolProfile: std::string mTextFileName; std::vector > mLineActors; vtkSmartPointer mLinesPolyData; + vtkSmartPointer mLineTransform; }; // end class vvToolProfile -- 2.47.1