34 #ifndef CXVTKHELPERCLASSES_H_ 35 #define CXVTKHELPERCLASSES_H_ 37 #include "cxResourceVisualizationExport.h" 54 template <
typename vtkPropertyOrProperty2DPtr>
57 property->SetColor(color.redF(), color.greenF(), color.blueF());
58 property->SetOpacity(color.alphaF());
69 class cxResourceVisualization_EXPORT
RGBColor :
public boost::array<double,3>
73 RGBColor(
double r,
double g,
double b);
74 explicit RGBColor(
const double* rgb);
78 RGBColor& operator=(
const QColor& c);
91 void setRadius (
int radius );
94 void update(
const Vector3D& point );
114 void setResolution(
int res);
118 void setPattern(
int stipplePattern);
119 void setWidth(
float width);
135 TextDisplay(
const QString& text,
const QColor& color,
int fontsize);
138 void setPosition(
float x,
float y);
139 void setPosition(
const Vector3D& pos );
141 void updateText(
const QString& text );
142 void setColor(QColor color);
143 vtkTextProperty* textProperty();
145 void setMaxWidth(
int width, vtkViewport *vp );
147 int getWidth( vtkViewport *vp );
150 static void forceUseVtkTextMapper();
159 static void verifyVtkTextMapper();
173 void setValue(
const Vector3D& focalPoint,
int width,
int height,
double bordarOffset,
const RGBColor& color);
176 void updateRegCross(
const Vector3D& crossPos );
193 class cxResourceVisualization_EXPORT
Axes3D 201 void setCaption(vtkCaptionActor2D* captionActor,
const QString& caption,
RGBColor color);
206 typedef boost::shared_ptr<Axes3D>
Axes3DPtr;
213 #endif // CXVTKHELPERCLASSES_H_ Vector3D getColorAsVector3D(QColor color)
vtkSmartPointer< class vtkAxesActor > vtkAxesActorPtr
boost::shared_ptr< class Axes3D > Axes3DPtr
boost::shared_ptr< class CrossHair2D > CrossHair2DPtr
vtkSmartPointer< class vtkActor2D > vtkActor2DPtr
vtkSmartPointer< class vtkTextMapper > vtkTextMapperPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
vtkSmartPointer< class vtkCursor2D > vtkCursor2DPtr
vtkSmartPointer< class vtkLineSource > vtkLineSourcePtr
Helper for drawing a point in 2D.
vtkSmartPointer< class vtkRenderer > vtkRendererPtr
Helper for drawing a line in 2D.
Helper for drawing a coordinate axis in 3D.
Helper for drawing text in 2D.
boost::shared_ptr< class TextDisplay > TextDisplayPtr
vtkSmartPointer< class vtkSphereSource > vtkSphereSourcePtr
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
boost::shared_ptr< class OffsetPoint > OffsetPointPtr
vtkSmartPointer< class vtkProp3D > vtkProp3DPtr
vtkTextMapperPtr getMapper()
Helper for drawing a crosshair in 2D.
void setColorAndOpacity(vtkPropertyOrProperty2DPtr property, QColor color)
vtkSmartPointer< class vtkPolyDataMapper2D > vtkPolyDataMapper2DPtr
Namespace for all CustusX production code.