Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BigDataViewer_Core_Extension
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
BioinformaticDataCompression
BigDataViewer_Core_Extension
Commits
4744c8d6
Commit
4744c8d6
authored
9 years ago
by
Michael Heyde
Browse files
Options
Downloads
Patches
Plain Diff
eye candy for accumulators
parent
520111ff
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/bdv/jogl/VolumeRenderer/gui/VDataAggregationPanel/AggregatorManager.java
+26
-7
26 additions, 7 deletions
...Renderer/gui/VDataAggregationPanel/AggregatorManager.java
with
26 additions
and
7 deletions
src/main/java/bdv/jogl/VolumeRenderer/gui/VDataAggregationPanel/AggregatorManager.java
+
26
−
7
View file @
4744c8d6
...
...
@@ -28,6 +28,8 @@ public class AggregatorManager {
private
Map
<
String
,
AbstractVolumeAccumulator
>
accumulators
=
new
HashMap
<
String
,
AbstractVolumeAccumulator
>();
private
List
<
String
>
aggregatorNames
=
new
ArrayList
<
String
>();
private
String
activeAccumulatorName
;
private
void
notifyChanged
(
IVolumeAggregationListener
listener
){
...
...
@@ -41,23 +43,40 @@ public class AggregatorManager {
}
private
void
addAccumulator
(
AbstractVolumeAccumulator
a
){
accumulators
.
put
(
a
.
getFunctionName
(),
a
);
String
visualName
=
beautifyaccumulatorFuncName
(
a
.
getFunctionName
());
accumulators
.
put
(
visualName
,
a
);
aggregatorNames
.
add
(
visualName
);
}
private
String
beautifyaccumulatorFuncName
(
String
functionName
)
{
String
beautified
=
""
+
Character
.
toUpperCase
(
(
char
)
functionName
.
getBytes
()[
0
]);
for
(
int
i
=
1
;
i
<
functionName
.
length
();
i
++){
if
(
functionName
.
getBytes
()[
i
]
==
(
char
)
'_'
){
beautified
+=
' '
;
continue
;
}
beautified
+=
(
char
)
functionName
.
getBytes
()[
i
];
}
return
beautified
;
}
public
AggregatorManager
(){
MaximumVolumeAccumulator
max
=
new
MaximumVolumeAccumulator
();
addAccumulator
(
new
AverageVolumeAccumulator
());
addAccumulator
(
new
MaximumVolumeAccumulator
());
addAccumulator
(
new
MinimumVolumeAccumulator
());
addAccumulator
(
new
AverageVolumeAccumulator
());
addAccumulator
(
new
ViewDirectionAccumulator
());
addAccumulator
(
new
SharpnessVolumeAccumulator
());
addAccumulator
(
new
MaxDifferenceAccumulator
());
addAccumulator
(
new
MidmapMaxDifference
());
addAccumulator
(
new
MaxCurvatureDifference
());
// addAccumulator(new VoxelDistanceAccumulator());
addAccumulator
(
new
ViewDirectionAccumulator
());
addAccumulator
(
new
SharpnessVolumeAccumulator
());
setActiveAcumulator
(
max
.
getFunctionName
());
setActiveAcumulator
(
beautifyaccumulatorFuncName
(
max
.
getFunctionName
()));
}
/**
...
...
@@ -102,7 +121,7 @@ public class AggregatorManager {
* returns the function-names of the stored accumulators
* @return
*/
public
Se
t
<
String
>
getAccumulatorNames
(){
return
a
ccumulators
.
keySet
()
;
public
Lis
t
<
String
>
getAccumulatorNames
(){
return
a
ggregatorNames
;
}
}
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