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
70ec1b65
Commit
70ec1b65
authored
7 years ago
by
Tobias Pietzsch
Browse files
Options
Downloads
Patches
Plain Diff
Add ViewerOptions.numSourceGroups() to modify initial number of groups (10)
parent
45dfee2f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/bdv/viewer/ViewerOptions.java
+20
-0
20 additions, 0 deletions
src/main/java/bdv/viewer/ViewerOptions.java
src/main/java/bdv/viewer/ViewerPanel.java
+1
-1
1 addition, 1 deletion
src/main/java/bdv/viewer/ViewerPanel.java
with
21 additions
and
1 deletion
src/main/java/bdv/viewer/ViewerOptions.java
+
20
−
0
View file @
70ec1b65
...
...
@@ -137,6 +137,18 @@ public class ViewerOptions
return
this
;
}
/**
* Set how many source groups there are initially.
*
* @param n
* How many source groups to create initially.
*/
public
ViewerOptions
numSourceGroups
(
final
int
n
)
{
values
.
numSourceGroups
=
n
;
return
this
;
}
/**
* Set whether volatile versions of sources should be used if available.
*
...
...
@@ -224,6 +236,8 @@ public class ViewerOptions
private
int
numRenderingThreads
=
3
;
private
int
numSourceGroups
=
10
;
private
boolean
useVolatileIfAvailable
=
true
;
private
MessageOverlayAnimator
msgOverlay
=
new
MessageOverlayAnimator
(
800
);
...
...
@@ -245,6 +259,7 @@ public class ViewerOptions
targetRenderNanos
(
targetRenderNanos
).
doubleBuffered
(
doubleBuffered
).
numRenderingThreads
(
numRenderingThreads
).
numSourceGroups
(
numSourceGroups
).
useVolatileIfAvailable
(
useVolatileIfAvailable
).
msgOverlay
(
msgOverlay
).
transformEventHandlerFactory
(
transformEventHandlerFactory
).
...
...
@@ -282,6 +297,11 @@ public class ViewerOptions
return
numRenderingThreads
;
}
public
int
getNumSourceGroups
()
{
return
numSourceGroups
;
}
public
boolean
isUseVolatileIfAvailable
()
{
return
useVolatileIfAvailable
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/bdv/viewer/ViewerPanel.java
+
1
−
1
View file @
70ec1b65
...
...
@@ -255,7 +255,7 @@ public class ViewerPanel extends JPanel implements OverlayRenderer, TransformLis
options
=
optional
.
values
;
final
int
numGroups
=
10
;
final
int
numGroups
=
options
.
getNumSourceGroups
()
;
final
ArrayList
<
SourceGroup
>
groups
=
new
ArrayList
<>(
numGroups
);
for
(
int
i
=
0
;
i
<
numGroups
;
++
i
)
groups
.
add
(
new
SourceGroup
(
"group "
+
Integer
.
toString
(
i
+
1
)
)
);
...
...
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