13 #ifndef CXVTKHELPERCLASSES_H_ 14 #define CXVTKHELPERCLASSES_H_ 16 #include "cxResourceVisualizationExport.h" 33 template <
typename vtkPropertyOrProperty2DPtr>
36 property->SetColor(color.redF(), color.greenF(), color.blueF());
37 property->SetOpacity(color.alphaF());
48 class cxResourceVisualization_EXPORT
RGBColor :
public boost::array<double,3>
52 RGBColor(
double r,
double g,
double b);
53 explicit RGBColor(
const double* rgb);
57 RGBColor& operator=(
const QColor& c);
70 void setRadius (
int radius );
73 void update(
const Vector3D& point );
93 void setResolution(
int res);
97 void setPattern(
int stipplePattern);
98 void setWidth(
float width);
114 TextDisplay(
const QString& text,
const QColor& color,
int fontsize);
117 void setPosition(
float x,
float y);
118 void setPosition(
const Vector3D& pos );
120 void updateText(
const QString& text );
121 void setColor(QColor color);
122 vtkTextProperty* textProperty();
124 void setMaxWidth(
int width, vtkViewport *vp );
126 int getWidth( vtkViewport *vp );
129 static void forceUseVtkTextMapper();
138 static void verifyVtkTextMapper();
152 void setValue(
const Vector3D& focalPoint,
int width,
int height,
double bordarOffset,
const RGBColor& color);
155 void updateRegCross(
const Vector3D& crossPos );
172 class cxResourceVisualization_EXPORT
Axes3D 180 void setCaption(vtkCaptionActor2D* captionActor,
const QString& caption,
RGBColor color);
185 typedef boost::shared_ptr<Axes3D>
Axes3DPtr;
192 #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.