#include <mitkPointDataVtkMapper3D.h>
Public Types | |
typedef PointDataVtkMapper3D | Self |
typedef VtkMapper3D | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer < const Self > | ConstPointer |
Public Member Functions | |
virtual const char * | GetClassName () const |
virtual void | SetRadius (float _arg) |
virtual float | GetRadius () |
virtual vtkProp * | GetVtkProp (mitk::BaseRenderer *renderer) |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
PointDataVtkMapper3D () | |
virtual | ~PointDataVtkMapper3D () |
virtual void | GenerateData () |
Generate the data needed for rendering (independent of a specific renderer) | |
Protected Attributes | |
vtkActor * | m_PointActor |
vtkPolyDataMapper * | m_PointMapper |
vtkPolyData * | m_PolyData |
vtkPoints * | m_Points |
vtkCellArray * | m_CellArray |
float | m_Radius |
Definition at line 45 of file mitkPointDataVtkMapper3D.h.
typedef itk::SmartPointer<const Self> mitk::PointDataVtkMapper3D::ConstPointer |
Reimplemented from mitk::VtkMapper3D.
Definition at line 49 of file mitkPointDataVtkMapper3D.h.
typedef itk::SmartPointer<Self> mitk::PointDataVtkMapper3D::Pointer |
Reimplemented from mitk::VtkMapper3D.
Definition at line 49 of file mitkPointDataVtkMapper3D.h.
Reimplemented from mitk::VtkMapper3D.
Definition at line 49 of file mitkPointDataVtkMapper3D.h.
Reimplemented from mitk::VtkMapper3D.
Definition at line 49 of file mitkPointDataVtkMapper3D.h.
mitk::PointDataVtkMapper3D::PointDataVtkMapper3D | ( | ) | [protected] |
Definition at line 25 of file mitkPointDataVtkMapper3D.cpp.
References m_CellArray, m_PointActor, m_PointMapper, m_Points, m_PolyData, and New().
{ int i; float x[6][3] = {{105,0,0},{-105,0,0},{0,105,0},{0,-105,0},{0,0,105},{0,0,-105}}; vtkIdType pts[3][2] = {{0,1},{2,3},{4,5}}; m_PointActor = vtkActor::New(); m_PointMapper = vtkPolyDataMapper::New(); m_PolyData = vtkPolyData::New(); m_Points = vtkPoints::New(); m_CellArray = vtkCellArray::New(); for (i=0;i<6;i++) m_Points->InsertPoint(i,x[i]); for (i=0;i<3;i++) m_CellArray->InsertNextCell(2,pts[i]); m_PolyData->SetPoints(m_Points); m_PolyData->SetLines(m_CellArray); m_PointMapper->SetInput(m_PolyData); m_PointActor->SetMapper( m_PointMapper ); m_PointActor->GetProperty()->SetColor(0.0,0.0,1.0); }
mitk::PointDataVtkMapper3D::~PointDataVtkMapper3D | ( | ) | [protected, virtual] |
Definition at line 49 of file mitkPointDataVtkMapper3D.cpp.
{ m_Points->Delete(); m_CellArray->Delete(); m_PolyData->Delete(); m_PointMapper->Delete(); m_PointActor->Delete(); }
void mitk::PointDataVtkMapper3D::GenerateData | ( | ) | [protected, virtual] |
Generate the data needed for rendering (independent of a specific renderer)
Reimplemented from mitk::Mapper.
Definition at line 64 of file mitkPointDataVtkMapper3D.cpp.
References mitk::PointData::GetPoint3D().
{ // Get the input data object ( a mitk::PointData ) mitk::PointData::Pointer input = dynamic_cast< mitk::PointData* >( this->GetData() ); mitk::Point3D point = input->GetPoint3D(); // MITK_INFO<<point[0]<<" "<<point[1]<<" "<<point[2]<<std::endl; m_PointActor->SetPosition( point[0], point[1], point[2] ); m_PolyData->Update(); SetVtkMapperImmediateModeRendering(m_PointMapper); }
virtual const char* mitk::PointDataVtkMapper3D::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::VtkMapper3D.
virtual float mitk::PointDataVtkMapper3D::GetRadius | ( | ) | [virtual] |
vtkProp * mitk::PointDataVtkMapper3D::GetVtkProp | ( | mitk::BaseRenderer * | renderer ) | [virtual] |
Implements mitk::VtkMapper3D.
Definition at line 58 of file mitkPointDataVtkMapper3D.cpp.
{ return m_PointActor; }
static Pointer mitk::PointDataVtkMapper3D::New | ( | ) | [static] |
virtual void mitk::PointDataVtkMapper3D::SetRadius | ( | float | _arg ) | [virtual] |
vtkCellArray* mitk::PointDataVtkMapper3D::m_CellArray [protected] |
Definition at line 73 of file mitkPointDataVtkMapper3D.h.
Referenced by PointDataVtkMapper3D().
vtkActor* mitk::PointDataVtkMapper3D::m_PointActor [protected] |
Definition at line 67 of file mitkPointDataVtkMapper3D.h.
Referenced by PointDataVtkMapper3D().
vtkPolyDataMapper* mitk::PointDataVtkMapper3D::m_PointMapper [protected] |
Definition at line 69 of file mitkPointDataVtkMapper3D.h.
Referenced by PointDataVtkMapper3D().
vtkPoints* mitk::PointDataVtkMapper3D::m_Points [protected] |
Definition at line 72 of file mitkPointDataVtkMapper3D.h.
Referenced by PointDataVtkMapper3D().
vtkPolyData* mitk::PointDataVtkMapper3D::m_PolyData [protected] |
Definition at line 71 of file mitkPointDataVtkMapper3D.h.
Referenced by PointDataVtkMapper3D().
float mitk::PointDataVtkMapper3D::m_Radius [protected] |
Definition at line 75 of file mitkPointDataVtkMapper3D.h.