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);
81 Vector3D origin_p = probeDefinition.getOrigin_p();
82 Vector3D spacing = probeDefinition.getSpacing();
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();