23 #include <vtkLinearTransform.h>
38 GetDataNode()->GetVisibility(visible, renderer,
"visible");
44 bool updateNeccesary =
true;
51 ApplyColorAndOpacityProperties(renderer);
53 vtkLinearTransform *transform = GetDataNode()->GetVtkTransform();
60 float lineWidth = 3.0;
62 if (dynamic_cast<mitk::FloatProperty *>(this->GetDataNode()->GetProperty(
"Width")) != NULL)
63 lineWidth =
dynamic_cast<mitk::FloatProperty *
>(this->GetDataNode()->GetProperty(
"Width"))->GetValue();
64 glLineWidth(lineWidth);
66 if (input->GetClosed())
68 glBegin(GL_LINE_LOOP);
72 glBegin(GL_LINE_STRIP);
81 while (pointsIt != points->End())
86 point = pointsIt.Value();
89 transform->TransformPoint(vtkp, vtkp);
93 bool projectmode =
false;
94 GetDataNode()->GetVisibility(projectmode, renderer,
"project");
101 if (diff.GetSquaredNorm() < 1.0)
108 glVertex2f(pt2d[0], pt2d[1]);
122 return static_cast<const mitk::Contour *
>(GetDataNode()->GetData());
BoundingBoxType::PointsContainerIterator PointsContainerIterator
Organizes the rendering process.
virtual const PlaneGeometry * GetCurrentWorldPlaneGeometry()
Get the current 2D-worldgeometry (m_CurrentWorldPlaneGeometry) used for 2D-rendering.
Stores vertices for drawing a contour.
void WorldToDisplay(const Point3D &worldIndex, Point2D &displayPoint) const
This method converts a 3D world index to the display point using the geometry of the renderWindow...
const Contour * GetInput(void)
virtual ~ContourMapper2D()
void vtk2itk(const Tin &in, Tout &out)
BoundingBoxType::PointsContainer::Pointer PointsContainerPointer
virtual bool Project(const mitk::Point3D &pt3d_mm, mitk::Point3D &projectedPt3d_mm) const
Project a 3D point given in mm (pt3d_mm) onto the 2D geometry. The result is a 3D point in mm (projec...
void itk2vtk(const Tin &in, Tout &out)
virtual void Paint(BaseRenderer *renderer) override