19 #include <vtkLinearTransform.h> 32 float rgba[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
50 bool updateNeccesary =
true;
62 Contour::BoundingBoxType::PointType point;
66 float lineWidth = 3.0;
68 if (dynamic_cast<mitk::FloatProperty *>(this->
GetDataNode()->GetProperty(
"Width")) !=
nullptr)
70 glLineWidth(lineWidth);
72 if (input->GetClosed())
74 glBegin(GL_LINE_LOOP);
78 glBegin(GL_LINE_STRIP);
87 while (pointsIt != points->End())
92 point = pointsIt.Value();
95 transform->TransformPoint(vtkp, vtkp);
99 bool projectmode =
false;
107 if (diff.GetSquaredNorm() < 1.0)
114 glVertex2f(pt2d[0], pt2d[1]);
mitk::BaseProperty * GetProperty(const char *propertyKey, const mitk::BaseRenderer *renderer=nullptr, bool fallBackOnDataProperties=true) const
Get the property (instance of BaseProperty) with key propertyKey from the PropertyList of the rendere...
BoundingBoxType::PointsContainerIterator PointsContainerIterator
virtual DataNode * GetDataNode() const
Get the DataNode containing the data to map. Method only returns valid DataNode Pointer if the mapper...
Organizes the rendering process.
virtual const PlaneGeometry * GetCurrentWorldPlaneGeometry()
Get the current 2D-worldgeometry (m_CurrentWorldPlaneGeometry) used for 2D-rendering.
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...
bool GetOpacity(float &opacity, const mitk::BaseRenderer *renderer, const char *propertyKey="opacity") const
Convenience access method for opacity properties (instances of FloatProperty)
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...
Stores vertices for drawing a contour.
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
bool GetColor(float rgb[3], const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="color") const
Convenience access method for color properties (instances of ColorProperty)
void ApplyColorAndOpacityProperties(mitk::BaseRenderer *renderer, vtkActor *actor=nullptr) override
Apply specific color and opacity properties read from the PropertyList. Reimplemented in GLmapper (do...
const Contour * GetInput(void)
bool GetVisibility(bool &visible, const mitk::BaseRenderer *renderer, const char *propertyKey="visible") const
Convenience access method for visibility properties (instances of BoolProperty with property-key "vis...
void vtk2itk(const Tin &in, Tout &out)
vtkLinearTransform * GetVtkTransform(int t=0) const
Get the transformation applied prior to displaying the data as a vtkTransform.
BoundingBoxType::PointsContainer::Pointer PointsContainerPointer
void MitkRender(mitk::BaseRenderer *renderer, mitk::VtkPropRenderer::RenderType type) override
void itk2vtk(const Tin &in, Tout &out)
~ContourMapper2D() override