35 #include <vtkImageData.h>
77 mProbeTool = probeTool;
84 void TrackedStream::toolTransformAndTimestamp(
Transform3D prMt,
double timestamp)
93 mImage->get_rMd_History()->setRegistration(rMu);
100 QString streamUid = mVideoSource->getUid();
101 ProbeDefinition probeDefinition = mProbeTool->getProbe()->getProbeDefinition(streamUid);
102 Vector3D origin_p = probeDefinition.getOrigin_p();
103 Vector3D spacing = probeDefinition.getSpacing();
104 Vector3D origin_u(origin_p[0]*spacing[0], origin_p[1]*spacing[1], origin_p[2]*spacing[2]);
128 mVideoSource = videoSource;
139 void TrackedStream::newFrameSlot()
142 if (mImage && mVideoSource && mVideoSource->isStreaming())
144 mImage->setVtkImageData(mVideoSource->getVtkImageData(),
false);
184 return "trackedStream";
192 mImage =
ImagePtr(
new Image(this->
getUid()+
"_TrackedStreamHelper", mVideoSource->getVtkImageData(), this->
getName()+
"_TrackedStreamHelper"));
198 if(this->
hasVideo() && ( mVideoSource->getVtkImageData()->GetDataDimension() == 3) )
206 if(this->
hasVideo() && ( mVideoSource->getVtkImageData()->GetDataDimension() == 2) )
214 if(!mVideoSource || !mVideoSource->getVtkImageData())
222 return mVideoSource->isStreaming();
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