15 #include <vtkTextProperty.h> 16 #include <vtkRenderer.h> 17 #include <vtkTextMapper.h> 18 #include <vtkObjectFactory.h> 19 #include <vtkCornerAnnotation.h> 37 mOrientation->GetTextProperty()->SetColor(0.7372, 0.815, 0.6039);
74 disconnect(
mSlicer.get(), SIGNAL(transformChanged(
Transform3D)),
this, SLOT(transformChangedSlot()));
79 connect(mSlicer.get(), SIGNAL(transformChanged(
Transform3D)),
this, SLOT(transformChangedSlot()));
80 this->transformChangedSlot();
84 void OrientationAnnotationSmartRep::transformChangedSlot()
91 Vector3D planeDir_r = rMs.vector(planeDir_s);
94 double threshold = cos(
mAngle);
99 double w =
dot(planeDir_r, iter->second);
110 this->transformChangedSlot();
OrientationAnnotationSmartRep()
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
static boost::shared_ptr< REP > wrap_new(REP *object, QString uid)
std::vector< Vector3D > mPlaneDirections_s
the four directions in the slice plane
cstring_cast_Placeholder cstring_cast(const T &val)
virtual void addRepActorsToViewRenderer(ViewPtr view)
OrientationAnnotationPtr mOrientation
boost::shared_ptr< class View > ViewPtr
virtual void removeRepActorsFromViewRenderer(ViewPtr view)
static OrientationAnnotationSmartRepPtr New(const QString &uid="")
void setSliceProxy(SliceProxyPtr slicer)
virtual ~OrientationAnnotationSmartRep()
boost::shared_ptr< class OrientationAnnotationSmartRep > OrientationAnnotationSmartRepPtr
std::map< QString, Vector3D > mDCMDirections_r
directions of DICOM labels APSILR
double ThresholdAngle() const
void setVisible(bool visible)
double dot(const Vector3D &a, const Vector3D &b)
compute inner product (or dot product) of a and b.
Default implementation of Rep.
QString determineAnnotation(Vector3D planeDir_s, Transform3D rMs)
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Namespace for all CustusX production code.