本文整理汇总了C++中SpikeDetector::getElectrodes方法的典型用法代码示例。如果您正苦于以下问题:C++ SpikeDetector::getElectrodes方法的具体用法?C++ SpikeDetector::getElectrodes怎么用?C++ SpikeDetector::getElectrodes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpikeDetector
的用法示例。
在下文中一共展示了SpikeDetector::getElectrodes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: buttonEvent
//.........这里部分代码省略.........
for (int i = 0; i < electrodeButtons.size(); i++)
{
if (button->getToggleState())
{
electrodeButtons[i]->setToggleState(false, dontSendNotification);
electrodeButtons[i]->setRadioGroupId(299);
channelSelector->activateButtons();
channelSelector->setRadioStatus(true);
}
else
{
electrodeButtons[i]->setToggleState(true, dontSendNotification);
electrodeButtons[i]->setRadioGroupId(0);
channelSelector->inactivateButtons();
channelSelector->setRadioStatus(false);
activeChannels.add(electrodeButtons[i]->getChannelNum()-1);
}
}
if (!button->getToggleState())
{
thresholdSlider->setActive(false);
// This will be -1 with nothing selected
int selectedItemIndex = electrodeList->getSelectedItemIndex();
if (selectedItemIndex != -1)
{
drawElectrodeButtons(selectedItemIndex);
}
else
{
electrodeButtons.clear();
}
}
// channelSelector->setActiveChannels(activeChannels);
return;
}
else if (button == electrodeEditorButtons[1]) // MONITOR
{
Button* audioMonitorButton = electrodeEditorButtons[1];
channelSelector->clearAudio();
SpikeDetector* processor = (SpikeDetector*) getProcessor();
Array<SimpleElectrode*> electrodes = processor->getElectrodes();
for (int i = 0; i < electrodes.size(); i++)
{
SimpleElectrode* e = electrodes[i];
e->isMonitored = false;
}
SimpleElectrode* e = processor->getActiveElectrode();
if (e != nullptr)
{
e->isMonitored = audioMonitorButton->getToggleState();
for (int i = 0; i < e->numChannels; i++)
{
std::cout << "Channel " << e->channels[i] << std::endl;
int channelNum = e->channels[i];
channelSelector->setAudioStatus(channelNum, audioMonitorButton->getToggleState());
}
}
else
{
audioMonitorButton->setToggleState(false, dontSendNotification);
}
return;
}
else if (button == electrodeEditorButtons[2]) // DELETE
{
if (acquisitionIsActive)
{
CoreServices::sendStatusMessage("Stop acquisition before deleting electrodes.");
return;
}
removeElectrode(electrodeList->getSelectedItemIndex());
CoreServices::updateSignalChain(this);
CoreServices::highlightEditor(this);
return;
}
}