14 #include <vtkImageData.h> 56 mProbeTool = probeTool;
63 void TrackedStream::toolTransformAndTimestamp(
Transform3D prMt,
double timestamp)
72 mImage->get_rMd_History()->setRegistration(rMu);
79 QString streamUid = mVideoSource->getUid();
80 ProbeDefinition probeDefinition = mProbeTool->getProbe()->getProbeDefinition(streamUid);
83 Vector3D origin_u(origin_p[0]*spacing[0], origin_p[1]*spacing[1], origin_p[2]*spacing[2]);
107 mVideoSource = videoSource;
118 void TrackedStream::newFrameSlot()
120 if (mImage && mVideoSource && mVideoSource->isStreaming())
122 mImage->setVtkImageData(mVideoSource->getVtkImageData(),
false);
134 mSpaceProvider = spaceProvider;
162 return "trackedStream";
170 mImage =
ImagePtr(
new Image(this->
getUid()+
"_TrackedStreamHelper", mVideoSource->getVtkImageData(), this->
getName()+
"_TrackedStreamHelper"));
181 if(this->
hasVideo() && ( mVideoSource->getVtkImageData()->GetDataDimension() == 3) )
189 if(this->
hasVideo() && ( mVideoSource->getVtkImageData()->GetDataDimension() == 2) )
197 if(!mVideoSource || !mVideoSource->getVtkImageData())
205 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)
Vector3D getOrigin_p() const
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.
void deleteImageToStopEmittingFrames()
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition of characteristics for an Ultrasound Probe Sector.
Vector3D getSpacing() const
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...
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr