15 #include <vtkImageData.h>
16 #include <vtkPolyData.h>
31 mSpaceProvider = spaceProvider;
34 mShowInToolSpace =
true;
43 mShowInToolSpace = on;
48 return mPipeline->getActor();
58 return mProbeDefinition;
68 disconnect(mTool.get(), SIGNAL(toolTransformAndTimestamp(
Transform3D,
double)),
this, SLOT(receiveTransforms(
Transform3D,
double)));
69 disconnect(mTool.get(), SIGNAL(toolProbeSector()),
this, SLOT(probeSectorChanged()));
73 if (tool && tool->getProbe())
81 connect(mTool.get(), SIGNAL(toolTransformAndTimestamp(
Transform3D,
double)),
this, SLOT(receiveTransforms(
Transform3D,
double)));
82 connect(mTool.get(), SIGNAL(toolProbeSector()),
this, SLOT(probeSectorChanged()));
85 this->probeSectorChanged();
91 this->probeSectorChanged();
94 void VideoSourceGraphics::probeSectorChanged()
96 if (!mTool || !mTool->getProbe())
99 mProbeDefinition.
setData(mTool->getProbe()->getProbeDefinition());
102 mPipeline->setClip(mProbeDefinition.
getSector());
106 mPipeline->setClip(NULL);
108 this->receiveTransforms(mTool->get_prMt(), 0);
122 mPipeline->setInputVideo(NULL);
130 mPipeline->setInputVideo(mData->getVtkImageData());
136 void VideoSourceGraphics::receiveTransforms(
Transform3D prMt,
double timestamp)
138 if (!mShowInToolSpace)
143 mPipeline->setActorUserMatrix(rMu.getVtkMatrix());
146 void VideoSourceGraphics::newDataSlot()
148 if (!mData || !mData->validData())
150 mPipeline->setVisibility(
false);
157 bool visible = mData->validData();
158 if (mShowInToolSpace)
159 visible = visible && mTool && mTool->getVisible();
160 mPipeline->setVisibility(visible);