Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
plugin-GUI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yehaojie
plugin-GUI
Commits
1b2b04ed
Commit
1b2b04ed
authored
11 years ago
by
jsiegle
Browse files
Options
Downloads
Patches
Plain Diff
Create new classes for tetrode, stereotrode, and single electrode plots
parent
1779698d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/Processors/Visualization/SpikeDisplayCanvas.cpp
+110
-6
110 additions, 6 deletions
Source/Processors/Visualization/SpikeDisplayCanvas.cpp
Source/Processors/Visualization/SpikeDisplayCanvas.h
+78
-6
78 additions, 6 deletions
Source/Processors/Visualization/SpikeDisplayCanvas.h
with
188 additions
and
12 deletions
Source/Processors/Visualization/SpikeDisplayCanvas.cpp
+
110
−
6
View file @
1b2b04ed
...
@@ -328,9 +328,9 @@ SpikeDisplay::SpikeDisplay(SpikeDisplayCanvas* sdc, Viewport* v) :
...
@@ -328,9 +328,9 @@ SpikeDisplay::SpikeDisplay(SpikeDisplayCanvas* sdc, Viewport* v) :
for
(
int
i
=
0
;
i
<
10
;
i
++
)
for
(
int
i
=
0
;
i
<
10
;
i
++
)
{
{
Spik
ePlot
*
spik
ePlot
=
new
Spik
ePlot
(
canvas
,
i
,
2
);
Tetrod
ePlot
*
tetrod
ePlot
=
new
Tetrod
ePlot
(
canvas
,
i
);
spik
ePlots
.
add
(
spik
ePlot
);
tetrod
ePlots
.
add
(
tetrod
ePlot
);
addAndMakeVisible
(
spik
ePlot
);
addAndMakeVisible
(
tetrod
ePlot
);
}
}
}
}
...
@@ -362,12 +362,12 @@ void SpikeDisplay::resized()
...
@@ -362,12 +362,12 @@ void SpikeDisplay::resized()
float
width
=
(
float
)
w
/
(
float
)
numColumns
;
float
width
=
(
float
)
w
/
(
float
)
numColumns
;
float
height
=
width
*
0.75
;
float
height
=
width
*
0.75
;
for
(
int
i
=
0
;
i
<
spik
ePlots
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
tetrod
ePlots
.
size
();
i
++
)
{
{
column
=
i
%
numColumns
;
column
=
i
%
numColumns
;
row
=
i
/
numColumns
;
row
=
i
/
numColumns
;
spik
ePlots
[
i
]
->
setBounds
(
width
*
column
,
row
*
height
,
width
,
height
);
tetrod
ePlots
[
i
]
->
setBounds
(
width
*
column
,
row
*
height
,
width
,
height
);
}
}
...
@@ -440,9 +440,113 @@ void SpikePlot::deselect()
...
@@ -440,9 +440,113 @@ void SpikePlot::deselect()
isSelected
=
false
;
isSelected
=
false
;
}
}
void
SpikePlot
::
resized
()
// --------------------------------------------------
TetrodePlot
::
TetrodePlot
(
SpikeDisplayCanvas
*
sdc
,
int
elecNum
)
:
SpikePlot
(
sdc
,
elecNum
,
4
)
{
for
(
int
i
=
0
;
i
<
numChannels
;
i
++
)
{
WaveformPlot
*
wp
=
new
WaveformPlot
();
addAndMakeVisible
(
wp
);
waveformPlots
.
add
(
wp
);
}
for
(
int
i
=
0
;
i
<
6
;
i
++
)
{
ProjectionPlot
*
pp
=
new
ProjectionPlot
();
addAndMakeVisible
(
pp
);
projectionPlots
.
add
(
pp
);
}
}
void
TetrodePlot
::
resized
()
{
float
w
=
(
float
)
getWidth
()
/
5.0
f
;
float
h
=
(
float
)
getHeight
()
/
2.0
f
;
waveformPlots
[
0
]
->
setBounds
(
0
,
0
,
w
,
h
);
waveformPlots
[
1
]
->
setBounds
(
w
,
0
,
w
,
h
);
waveformPlots
[
2
]
->
setBounds
(
0
,
h
,
w
,
h
);
waveformPlots
[
3
]
->
setBounds
(
w
,
h
,
w
,
h
);
projectionPlots
[
0
]
->
setBounds
(
w
*
2
,
0
,
w
,
h
);
projectionPlots
[
1
]
->
setBounds
(
w
*
3
,
0
,
w
,
h
);
projectionPlots
[
2
]
->
setBounds
(
w
*
4
,
0
,
w
,
h
);
projectionPlots
[
3
]
->
setBounds
(
w
*
2
,
h
,
w
,
h
);
projectionPlots
[
4
]
->
setBounds
(
w
*
3
,
h
,
w
,
h
);
projectionPlots
[
5
]
->
setBounds
(
w
*
4
,
h
,
w
,
h
);
}
StereotrodePlot
::
StereotrodePlot
(
SpikeDisplayCanvas
*
sdc
,
int
elecNum
)
:
SpikePlot
(
sdc
,
elecNum
,
2
)
{
for
(
int
i
=
0
;
i
<
numChannels
;
i
++
)
{
WaveformPlot
*
wp
=
new
WaveformPlot
();
addAndMakeVisible
(
wp
);
waveformPlots
.
add
(
wp
);
}
ProjectionPlot
*
pp
=
new
ProjectionPlot
();
addAndMakeVisible
(
pp
);
projectionPlots
.
add
(
pp
);
}
void
StereotrodePlot
::
resized
()
{
{
float
w
=
(
float
)
getWidth
()
/
3.0
f
;
float
h
=
(
float
)
getHeight
()
/
1.0
f
;
waveformPlots
[
0
]
->
setBounds
(
0
,
0
,
w
,
h
);
waveformPlots
[
1
]
->
setBounds
(
w
,
0
,
w
,
h
);
projectionPlots
[
0
]
->
setBounds
(
w
*
2
,
0
,
w
,
h
);
}
}
SingleElectrodePlot
::
SingleElectrodePlot
(
SpikeDisplayCanvas
*
sdc
,
int
elecNum
)
:
SpikePlot
(
sdc
,
elecNum
,
1
)
{
WaveformPlot
*
wp
=
new
WaveformPlot
();
addAndMakeVisible
(
wp
);
waveformPlots
.
add
(
wp
);
}
void
SingleElectrodePlot
::
resized
()
{
float
w
=
(
float
)
getWidth
()
/
1.0
f
;
float
h
=
(
float
)
getHeight
()
/
1.0
f
;
waveformPlots
[
0
]
->
setBounds
(
0
,
0
,
w
,
h
);
}
WaveformPlot
::
WaveformPlot
()
{
}
void
WaveformPlot
::
paint
(
Graphics
&
g
)
{
g
.
fillAll
(
Colours
::
red
);
}
ProjectionPlot
::
ProjectionPlot
()
{
}
void
ProjectionPlot
::
paint
(
Graphics
&
g
)
{
g
.
fillAll
(
Colours
::
pink
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Source/Processors/Visualization/SpikeDisplayCanvas.h
+
78
−
6
View file @
1b2b04ed
...
@@ -39,6 +39,11 @@ class SpikeDisplayNode;
...
@@ -39,6 +39,11 @@ class SpikeDisplayNode;
class
SpikeDisplay
;
class
SpikeDisplay
;
class
SpikePlot
;
class
SpikePlot
;
class
TetrodePlot
;
class
StereotrodePlot
;
class
SingleElectrodePlot
;
class
WaveformPlot
;
class
ProjectionPlot
;
/**
/**
...
@@ -122,12 +127,16 @@ private:
...
@@ -122,12 +127,16 @@ private:
SpikeDisplayCanvas
*
canvas
;
SpikeDisplayCanvas
*
canvas
;
Viewport
*
viewport
;
Viewport
*
viewport
;
OwnedArray
<
SpikePlot
>
spikePlots
;
OwnedArray
<
TetrodePlot
>
tetrodePlots
;
OwnedArray
<
StereotrodePlot
>
stereotrodePlots
;
OwnedArray
<
SingleElectrodePlot
>
singleElectrodePlots
;
int
maxWidth
,
maxHeight
,
minWidth
,
minHeight
;
float
tetrodePlotMinWidth
,
stereotrodePlotMinWidth
,
singleElectrodePlotMinWidth
;
float
tetrodePlotRatio
,
stereotrodePlotRatio
,
singleElectrodePlotRatio
;
};
};
class
SpikePlot
:
public
Component
class
SpikePlot
:
public
Component
{
{
public:
public:
...
@@ -139,10 +148,6 @@ public:
...
@@ -139,10 +148,6 @@ public:
void
select
();
void
select
();
void
deselect
();
void
deselect
();
void
resized
();
private:
SpikeDisplayCanvas
*
canvas
;
SpikeDisplayCanvas
*
canvas
;
bool
isSelected
;
bool
isSelected
;
...
@@ -151,6 +156,73 @@ private:
...
@@ -151,6 +156,73 @@ private:
int
numChannels
;
int
numChannels
;
OwnedArray
<
ProjectionPlot
>
projectionPlots
;
OwnedArray
<
WaveformPlot
>
waveformPlots
;
private:
};
class
TetrodePlot
:
public
SpikePlot
{
public:
TetrodePlot
(
SpikeDisplayCanvas
*
,
int
elecNum
);
~
TetrodePlot
()
{}
void
resized
();
private
:
};
class
StereotrodePlot
:
public
SpikePlot
{
public:
StereotrodePlot
(
SpikeDisplayCanvas
*
,
int
elecNum
);
~
StereotrodePlot
()
{}
void
resized
();
private
:
};
class
SingleElectrodePlot
:
public
SpikePlot
{
public:
SingleElectrodePlot
(
SpikeDisplayCanvas
*
,
int
elecNum
);
~
SingleElectrodePlot
()
{}
void
resized
();
private
:
};
class
WaveformPlot
:
public
Component
{
public:
WaveformPlot
();
~
WaveformPlot
()
{}
void
paint
(
Graphics
&
g
);
private
:
};
class
ProjectionPlot
:
public
Component
{
public:
ProjectionPlot
();
~
ProjectionPlot
()
{}
void
paint
(
Graphics
&
g
);
private
:
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment