Skip to content

Commit f3c8b3c

Browse files
committed
Merge pull request #27 from jvoigts/master
pulling from inproved-lfp-rendering to main dev branch
2 parents ca28420 + 201f75f commit f3c8b3c

8 files changed

Lines changed: 3871 additions & 0 deletions

File tree

Source/Plugins/LfpDisplayNodeBeta/LfpDisplayCanvas.cpp

Lines changed: 2672 additions & 0 deletions
Large diffs are not rendered by default.

Source/Plugins/LfpDisplayNodeBeta/LfpDisplayCanvas.h

Lines changed: 487 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
------------------------------------------------------------------
3+
4+
This file is part of the Open Ephys GUI
5+
Copyright (C) 2013 Open Ephys
6+
7+
------------------------------------------------------------------
8+
9+
This program is free software: you can redistribute it and/or modify
10+
it under the terms of the GNU General Public License as published by
11+
the Free Software Foundation, either version 3 of the License, or
12+
(at your option) any later version.
13+
14+
This program is distributed in the hope that it will be useful,
15+
but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
GNU General Public License for more details.
18+
19+
You should have received a copy of the GNU General Public License
20+
along with this program. If not, see <http://www.gnu.org/licenses/>.
21+
22+
*/
23+
24+
#include "LfpDisplayEditor.h"
25+
26+
using namespace LfpDisplayNodeBeta;
27+
28+
29+
LfpDisplayEditor::LfpDisplayEditor(GenericProcessor* parentNode, bool useDefaultParameterEditors=true)
30+
: VisualizerEditor(parentNode, useDefaultParameterEditors)
31+
32+
{
33+
34+
tabText = "LFP";
35+
36+
desiredWidth = 180;
37+
38+
}
39+
40+
LfpDisplayEditor::~LfpDisplayEditor()
41+
{
42+
}
43+
44+
45+
Visualizer* LfpDisplayEditor::createNewCanvas()
46+
{
47+
48+
LfpDisplayNode* processor = (LfpDisplayNode*) getProcessor();
49+
return new LfpDisplayCanvas(processor);
50+
51+
}
52+
53+
void LfpDisplayEditor::buttonCallback(Button* button)
54+
{
55+
56+
int gId = button->getRadioGroupId();
57+
58+
if (gId > 0)
59+
{
60+
if (canvas != 0)
61+
{
62+
canvas->setParameter(gId-1, button->getName().getFloatValue());
63+
}
64+
65+
}
66+
67+
}
68+
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
------------------------------------------------------------------
3+
4+
This file is part of the Open Ephys GUI
5+
Copyright (C) 2013 Open Ephys
6+
7+
------------------------------------------------------------------
8+
9+
This program is free software: you can redistribute it and/or modify
10+
it under the terms of the GNU General Public License as published by
11+
the Free Software Foundation, either version 3 of the License, or
12+
(at your option) any later version.
13+
14+
This program is distributed in the hope that it will be useful,
15+
but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
GNU General Public License for more details.
18+
19+
You should have received a copy of the GNU General Public License
20+
along with this program. If not, see <http://www.gnu.org/licenses/>.
21+
22+
*/
23+
24+
#ifndef __LFPDISPLAYEDITOR_H_3438800D__
25+
#define __LFPDISPLAYEDITOR_H_3438800D__
26+
27+
#include "../../../JuceLibraryCode/JuceHeader.h"
28+
#include "../../Processors/Editors/GenericEditor.h"
29+
#include "../../UI/UIComponent.h"
30+
#include "../../UI/DataViewport.h"
31+
#include "../../Processors/Visualization/DataWindow.h"
32+
#include "LfpDisplayNode.h"
33+
#include "LfpDisplayCanvas.h"
34+
#include "../../Processors/Editors/VisualizerEditor.h"
35+
36+
class Visualizer;
37+
38+
namespace LfpDisplayNodeBeta {
39+
40+
/**
41+
42+
User interface for the LfpDisplayNode sink.
43+
44+
@see LfpDisplayNode, LfpDisplayCanvas
45+
46+
*/
47+
48+
class LfpDisplayEditor : public VisualizerEditor
49+
{
50+
public:
51+
LfpDisplayEditor(GenericProcessor*, bool useDefaultParameterEditors);
52+
~LfpDisplayEditor();
53+
54+
void buttonCallback(Button* button);
55+
56+
Visualizer* createNewCanvas();
57+
58+
private:
59+
60+
61+
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(LfpDisplayEditor);
62+
63+
};
64+
};
65+
#endif // __LFPDISPLAYEDITOR_H_3438800D__

0 commit comments

Comments
 (0)