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()
121 if (mImage && mVideoSource && mVideoSource->isStreaming())
123 mImage->setVtkImageData(mVideoSource->getVtkImageData(),
false);
135 mSpaceProvider = spaceProvider;
163 return "trackedStream";
171 mImage =
ImagePtr(
new Image(this->
getUid()+
"_TrackedStreamHelper", mVideoSource->getVtkImageData(), this->
getName()+
"_TrackedStreamHelper"));
177 if(this->
hasVideo() && ( mVideoSource->getVtkImageData()->GetDataDimension() == 3) )
185 if(this->
hasVideo() && ( mVideoSource->getVtkImageData()->GetDataDimension() == 2) )
193 if(!mVideoSource || !mVideoSource->getVtkImageData())
201 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.
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