From: tbaudier Date: Tue, 23 Feb 2016 13:45:27 +0000 (+0100) Subject: Fix the profile line display with transformation X-Git-Tag: v1.4.0~44 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=87bc8d3939a62ac6c2f0f1c72fb83cf24c49ec41;p=clitk.git Fix the profile line display with transformation --- 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