Commit d89f86a0 authored by Dean Inglis's avatar Dean Inglis
Browse files

ENH: update trace representation when projection position is changed

parent 94cdb4fc
......@@ -37,7 +37,7 @@
#include "vtkTransformPolyDataFilter.h"
#include "vtkTransform.h"
vtkCxxRevisionMacro(vtkImageTracerWidget, "1.9");
vtkCxxRevisionMacro(vtkImageTracerWidget, "1.10");
vtkStandardNewMacro(vtkImageTracerWidget);
vtkCxxSetObjectMacro(vtkImageTracerWidget, HandleProperty, vtkProperty);
......@@ -524,6 +524,17 @@ void vtkImageTracerWidget::AdjustHandlePosition(int handle, double pos[3])
this->HandleGeometry[handle]->Modified();
}
void vtkImageTracerWidget::SetProjectionPosition(double position)
{
this->ProjectionPosition = position;
for (int i=0;i<this->NumberOfHandles;i++)
{
this->AdjustHandlePosition(i,this->HandleGeometry[i]->GetCenter());
}
this->BuildLinesFromHandles();
}
void vtkImageTracerWidget::SetHandlePosition(int handle, double xyz[3])
{
this->AdjustHandlePosition(handle, xyz);
......
......@@ -143,7 +143,7 @@ public:
// handles are set to ProjectionPosition. No attempt is made to ensure that
// the position is within the bounds of either the underlying image data or
// the prop on which tracing is performed.
vtkSetMacro(ProjectionPosition,double);
void SetProjectionPosition(double position);
vtkGetMacro(ProjectionPosition,double);
// Description:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment