36 #include <vtkTextProperty.h>
37 #include <vtkRenderer.h>
38 #include <vtkTextMapper.h>
39 #include <vtkObjectFactory.h>
40 #include <vtkCornerAnnotation.h>
58 mOrientation->GetTextProperty()->SetColor(0.7372, 0.815, 0.6039);
95 disconnect(
mSlicer.get(), SIGNAL(transformChanged(
Transform3D)),
this, SLOT(transformChangedSlot()));
100 connect(
mSlicer.get(), SIGNAL(transformChanged(
Transform3D)),
this, SLOT(transformChangedSlot()));
101 this->transformChangedSlot();
105 void OrientationAnnotationSmartRep::transformChangedSlot()
112 Vector3D planeDir_r = rMs.vector(planeDir_s);
115 double threshold = cos(
mAngle);
120 double w =
dot(planeDir_r, iter->second);
131 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.