35 #include <vtkImageData.h>
68 mProbeTool = probeTool;
75 void TrackedStream::toolTransformAndTimestamp(
Transform3D prMt,
double timestamp)
84 mImage->get_rMd_History()->setRegistration(rMu);
90 ProbeDefinition probeDefinition = mProbeTool->getProbe()->getProbeData();
91 Vector3D origin_p = probeDefinition.getOrigin_p();
92 Vector3D spacing = probeDefinition.getSpacing();
93 Vector3D origin_u(origin_p[0]*spacing[0], origin_p[1]*spacing[1], origin_p[2]*spacing[2]);
117 mVideoSource = videoSource;
128 void TrackedStream::newFrameSlot()
131 if (mImage && mVideoSource)
133 mImage->setVtkImageData(mVideoSource->getVtkImageData(),
false);
173 return "TrackedStream";
181 mImage =
ImagePtr(
new Image(this->
getUid()+
"_TrackedStreamHelper", mVideoSource->getVtkImageData(), this->
getName()+
"_TrackedStreamHelper"));
187 if(this->
hasVideo() && ( mVideoSource->getVtkImageData()->GetDataDimension() == 3) )
195 if(!mVideoSource || !mVideoSource->getVtkImageData())
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
Transform3D createTransformRotateY(const double angle)
boost::shared_ptr< class TrackedStream > TrackedStreamPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
void streaming(bool on)
emitted when streaming started/stopped
boost::shared_ptr< class Image > ImagePtr
void streaming(bool on)
emitted when streaming started/stopped
void setVideoSource(const VideoSourcePtr &videoSource)
virtual DoubleBoundingBox3D boundingBox() const
TrackedStream(const QString &uid, const QString &name, const ToolPtr &probe, const VideoSourcePtr &videoSource)
void newVideoSource(VideoSourcePtr videoSource)
virtual void addXml(QDomNode &dataNode)
adds xml information about the data and its variabels
virtual void addXml(QDomNode &dataNode)
adds xml information about the data and its variabels
virtual void parseXml(QDomNode &dataNode)
Use a XML node to load data.
virtual QString getUid() const
void setSpaceProvider(SpaceProviderPtr spaceProvider)
void setProbeTool(const ToolPtr &probeTool)
void streamChanged(QString uid)
static TrackedStreamPtr create(const QString &uid, const QString &name="")
virtual QString getName() const
virtual void parseXml(QDomNode &dataNode)
Use a XML node to load data.
virtual QString getType() const
void newTool(ToolPtr tool)
boost::shared_ptr< class VideoSource > VideoSourcePtr
Transform3D createTransformTranslate(const Vector3D &translation)
ImagePtr getChangingImage()
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.
cxLogicManager_EXPORT SpaceProviderPtr spaceProvider()
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Superclass for all data objects.
static QString getTypeName()
VideoSourcePtr getVideoSource()
Transform3D createTransformRotateX(const double angle)
void newFrame()
emitted when a new frame has arrived (getVtkImageData() returns something new). info/status/name/vali...
boost::shared_ptr< class Tool > ToolPtr