void ProbeImpl::setActiveStream(QString uid) { if (uid.isEmpty()) return; mActiveUid = uid; emit sectorChanged(); }
ToolUsingIGSTK::ToolUsingIGSTK(IgstkToolPtr igstkTool) : ToolImpl(""), mTool(igstkTool), mPolyData(NULL), mValid(false), mConfigured(false), mTracked(false) { mTimestamp = 0; Tool::mUid = mTool->getInternalStructure().mUid; Tool::mName = mTool->getInternalStructure().mName; mValid = igstkTool->isValid(); this->createPolyData(); connect(mTool.get(), SIGNAL(toolTransformAndTimestamp(Transform3D, double)), this, SLOT(toolTransformAndTimestampSlot(Transform3D, double))); connect(mTool.get(), SIGNAL(attachedToTracker(bool)), this, SIGNAL(attachedToTracker(bool))); connect(mTool.get(), SIGNAL(toolVisible(bool)), this, SLOT(toolVisibleSlot(bool))); connect(mTool.get(), SIGNAL(toolVisible(bool)), this, SIGNAL(toolVisible(bool))); connect(&mTpsTimer, SIGNAL(timeout()), this, SLOT(calculateTpsSlot())); if (mTool->getInternalStructure().mIsProbe) { mProbe = ProbeImpl::New(mTool->getInternalStructure().mInstrumentId, mTool->getInternalStructure().mInstrumentScannerId); connect(mProbe.get(), SIGNAL(sectorChanged()), this, SIGNAL(toolProbeSector())); } }
void ProbeImpl::applyConfig() { this->updateProbeSector(); this->updateTemporalCalibration(); this->setSoundSpeedCompensationFactor(mSoundSpeedCompensationFactor); emit sectorChanged(); }
void ProbeImpl::setProbeSector(ProbeDefinition probeSector) { if (probeSector.getUid().isEmpty()) probeSector.setUid(mActiveUid); mProbeData[probeSector.getUid()] = probeSector; emit sectorChanged(); }
void ProbeImpl::setSoundSpeedCompensationFactor(double factor) { if(similar(mSoundSpeedCompensationFactor, factor)) return; mSoundSpeedCompensationFactor = factor; for (std::map<QString, ProbeDefinition>::iterator iter=mProbeData.begin(); iter!=mProbeData.end(); ++iter) iter->second.applySoundSpeedCompensationFactor(mSoundSpeedCompensationFactor); emit sectorChanged(); }
void ProbeImpl::removeCurrentConfig() { ProbeXmlConfigParser::Configuration config = this->getConfiguration(); int index = this->getConfigIdList().indexOf(config.mConfigId); if (index<0) return; if (index!=0) --index; mXml->removeConfig(config.mUsScanner, config.mUsProbe, config.mRtSource, config.mConfigId); if (index < this->getConfigIdList().size()) this->applyNewConfigurationWithId(this->getConfigIdList()[index]); emit sectorChanged(); }
void ProbeImpl::setRTSource(VideoSourcePtr source) { CX_ASSERT(source); // not handled after refactoring - add clear method?? if (!source) return; // uid already exist: check if base object is the same if (mSource.count(source->getUid())) { VideoSourcePtr old = mSource.find(source->getUid())->second; ProbeAdapterRTSourcePtr oldAdapter; oldAdapter = boost::dynamic_pointer_cast<ProbeAdapterRTSource>(old); // check for identity, ignore if no change if (oldAdapter && (source==oldAdapter->getBaseSource())) return; } // must have same uid as original: the uid identifies the video source mSource[source->getUid()].reset(new ProbeAdapterRTSource(source->getUid(), mSelf.lock(), source)); emit sectorChanged(); emit videoSourceAdded(mSource[source->getUid()]); }