65 mAcquisitionService(acquisitionService)
67 QVBoxLayout* mVerticalLayout =
new QVBoxLayout(
this);
71 mSelectRecordSession.reset(
new SelectRecordSession(mOptions, acquisitionService, services));
72 connect(mSelectRecordSession->getSessionSelector().get(), &
StringProperty::changed,
this, &RecordTrackingWidget::onMergeChanged);
75 "Merge new recording with selected recorded session",
77 connect(mMergeWithExistingSession.get(), &
BoolProperty::changed,
this, &RecordTrackingWidget::onMergeChanged);
80 mRecordSessionWidget =
new RecordSessionWidget(mAcquisitionService,
this, context, category);
82 mVerticalLayout->setMargin(0);
85 mVerticalLayout->addWidget(mToolSelectorWidget);
86 mVerticalLayout->addWidget(mRecordSessionWidget);
88 mVerticalLayout->addWidget(
new LabeledComboBoxWidget(
this, mSelectRecordSession->getSessionSelector()));
91 connect(mObscuredListener.get(), SIGNAL(obscured(
bool)),
this, SLOT(obscuredSlot(
bool)));
96 mToolSelectorWidget->setVisible(on);
101 return mSelectRecordSession->getSessionSelector();
104 void RecordTrackingWidget::acquisitionStarted()
111 if (!mMergeWithExistingSession->getValue())
112 activeRep3D->getTracer()->clear();
113 activeRep3D->getTracer()->setColor(QColor(
"magenta"));
114 activeRep3D->getTracer()->start();
118 void RecordTrackingWidget::acquisitionStopped()
120 QString newUid = mAcquisitionService->getLatestSession()->getUid();
121 mSelectRecordSession->getSessionSelector()->setValue(newUid);
123 mServices->patient()->autoSave();
128 activeRep3D->getTracer()->stop();
130 mRecordingTool.reset();
135 void RecordTrackingWidget::acquisitionCancelled()
140 activeRep3D->getTracer()->stop();
141 activeRep3D->getTracer()->clear();
143 mRecordingTool.reset();
146 void RecordTrackingWidget::onMergeChanged()
148 QString mergeSession =
"";
149 if (mMergeWithExistingSession->getValue())
150 mergeSession = mSelectRecordSession->getSessionSelector()->getValue();
157 return mServices->view()->get3DReps(0, 0)->findFirst<ToolRep3D>(mRecordingTool);
160 void RecordTrackingWidget::obscuredSlot(
bool obscured)
163 mAcquisitionService->cancelRecord();
182 mSelectRecordSession->setVisible(!obscured);
185 void RecordTrackingWidget::onToolChanged()
187 mSelectRecordSession->setTool(mToolSelector->getTool());
193 ToolPtr retval = mToolSelector->getTool();
195 retval = mServices->tracking()->getActiveTool();
201 return mSelectRecordSession->getRecordedTrackerData_prMt();
static BoolPropertyPtr initialize(const QString &uid, QString name, QString help, bool value, QDomNode root=QDomNode())
void acquisitionStopped()
boost::shared_ptr< class AcquisitionService > AcquisitionServicePtr
boost::shared_ptr< class VisServices > VisServicesPtr
void activeToolChanged(const QString &uId)
boost::shared_ptr< class StringProperty > StringPropertyPtr
cxLogicManager_EXPORT AcquisitionServicePtr acquisitionService()
void changed()
emit when the underlying data value is changed: The user interface will be updated.
boost::shared_ptr< class ToolRep3D > ToolRep3DPtr
Helper class for xml files used to store ssc/cx data.
std::map< double, Transform3D > TimedTransformMap
boost::shared_ptr< class Tool > ToolPtr