19 #include <vtkLinearTransform.h> 33 float rgba[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
51 bool updateNeccesary =
true;
60 auto contourIt = contourVec.begin();
62 while (contourIt != contourVec.end())
68 Contour::BoundingBoxType::PointType point;
73 glLineWidth(nextContour->GetWidth());
75 if (nextContour->GetClosed())
77 glBegin(GL_LINE_LOOP);
81 glBegin(GL_LINE_STRIP);
96 while (pointsIt != points->End())
98 point = pointsIt.Value();
101 transform->TransformPoint(vtkp, vtkp);
106 if (diff.GetSquaredNorm() < 1.0)
110 glVertex2f(pt2d[0], pt2d[1]);
BoundingBoxType::PointsContainerIterator PointsContainerIterator
const mitk::ContourSet * GetInput(void)
void MitkRender(mitk::BaseRenderer *renderer, mitk::VtkPropRenderer::RenderType type) override
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.
~ContourSetMapper2D() override
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...
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)
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 ApplyColorAndOpacityProperties(mitk::BaseRenderer *renderer, vtkActor *actor=nullptr) override
Apply specific color and opacity properties read from the PropertyList. Reimplemented in GLmapper (do...
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.
std::map< unsigned long, Contour::Pointer > ContourVectorType
BoundingBoxType::PointsContainer::Pointer PointsContainerPointer
void itk2vtk(const Tin &in, Tout &out)
itk::SmartPointer< Self > Pointer