// To setup the ContourWidget and its representation:
#include <vtkContourWidget.h>
#include <vtkProperty.h>
#include <vtkOrientedGlyphContourRepresentation.h>
// To create the geometry:
#include <vtkPolyData.h>
#include <vtkCellArray.h>
#include <vtkPoints.h>
#include <vtkMath.h>
// Usual VTK pipeline elements:
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkInteractorStyleTrackballCamera.h>
#include <iostream>
#include "vtkCommand.h"
#include <vtkPolyDataWriter.h>
class MyContourPointModifyCallBack : public vtkCommand
{
public:
static MyContourPointModifyCallBack* New()
{
return new MyContourPointModifyCallBack;
}
void SetContourWidget(vtkSmartPointer<vtkContourWidget> contourWidget)
{
m_contourWidget = contourWidget;
}
void Execute(vtkObject * caller, unsigned long eventId, vo
vtkContourWidget 交互
最新推荐文章于 2022-09-23 20:00:00 发布