Comments (5)
@ctrueden That sounds very handy, but frankly here I'm just trying to make the UI look like something is happening, so that the user doesn't BoneJ has frozen. In any case most of the action happens inside ops, so the bar wouldn't be updated that often even it worked in finer detail than per subspace.
Is there a way to create a progress bar for a task with unknown number of iterations / time? Just something that darts back and forth while processing happens.
from bonej2.
I think there is opportunity to improve the SciJava core here. The StatusService
is a singleton progress bar and message, same as ImageJ1. There is now a TaskService
that lets you spawn new tasks and keep track of their progress individually. What I have wanted for a long time is to tie in the tasks to the StatusService
, so that you can do something like:
Task task = taskService.createTask("Processing subspaces");
for (int i=0; i<subspaceCount; i++) {
Task subtask = taskService.createTask("Processing subspace #" + i);
task.addSubtask(subtask);
}
subspaceProcessor.launch(task); // or launch each subtasks, if multithreaded
statusService.setTask(task);
And then the status bar would reflect the status of the running tasks, including messages and progress, automatically. Some day, the ImageJ UI could even be improved to provide a dropdown details view similar to Eclipse with its subtasks, so that you can see everything currently going on.
The above is very rough off the top of my head—see the org.scijava.download
package where I really used the TaskService
in practice.
The two things needed to make the above a reality:
- Adding API to the
StatusService
to tie in withTask
s. - Add API to the
Task
to allow for nested tasks.
What do you think @rimadoma? Does it make sense?
from bonej2.
Is there a way to create a progress bar for a task with unknown number of iterations / time?
No. ImageJ1 uses its own progress bar implementation which does not have an indeterminate mode, unlike Swing's JProgressBar
. And we are stuck with the ImageJ1 UI. The way ImageJ1 handles this is to simply keep updating the status message, with no visible progress bar.
from bonej2.
Maybe we can trick ImageJ1's "Double Progress Bar" into showing an indeterminate cycling dot?
from bonej2.
@imagejan Wow, that's crazy!
Relatedly: digging in the source, I realize I made a mistake: ij.gui.ProgressBar
extends java.awt.Canvas
—there is no java.awt.ProgressBar
. Sorry for steering people wrong there. I edited my message above to correct it.
from bonej2.
Related Issues (20)
- mvn test -P allTests fails with errors about NoClassDefFound HOT 2
- Move user documentation links from imagej.net/BoneJ to https://imagej.net/plugins/bonej HOT 10
- Add 3-3-2 surface colour regime so that 3D surfaces match 2D particle default LUT HOT 1
- Fractal Dimension creates thousands of zombie threads that crash ImageJ HOT 1
- Headless operation of IntertrabecularAngles is blocked by a a warning wanting a GUI
- Update copyright blurb
- Update scijava to 31.1.0
- Zenodo Webhook doesn't work HOT 1
- Migrate analytics from Universal to GA4 HOT 1
- Intertrabecular Angles Wrapper fails in Headless mode HOT 5
- Anisotropy, Is there a way to output a table of MIL vectors rather then the point cloud? HOT 1
- mvn -P allTests fails with a lot of "Actually, there were zero interactions with this mock" HOT 2
- Surface Area always complains about unmatching axis calibration even when they are perfectly matched
- BoneJ2 does not calculate volume fraction of interpolated ROIs in DICOM files HOT 2
- Implement Fast Local Thickness
- Update docs to contain recent changes
- Ellipsoid factor blows up if input image is bigger than Integer.MAX_VALUE pixels
- Scijava 36.0.0 breaks Mockito Wrapper tests HOT 12
- Slice Geometry doesn't respect ROIs and then complains there isn't an ROI when there is one
- Expand dictionary of bone names
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bonej2.