-
-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Progress reporting of async texture creation #184
Conversation
@SitronX Here's a PR for the issue we talked about. I have also removed |
Hello @mlavik1 half variant
float variant
The gradient reporting is great, i like that progress bar :) Also i have noticed weird scaling issue when not using simpleITK on one certain DICOM dataset. It is prolonged somehow, maybe you changed something recently? With SimpleITK, the scale is alright like shown here On sidenote. This is interesting code style, i didnt even know it is possible to throw away increment from for loop like this :D
|
Hi @SitronX
You're right, I should probably do it there as well. If I do it similar to how I did it in
Haha, thanks! 😁 I hesitated a bit about it, since it's not as intuitive, but do you think it's readable enough? It's probably a bit faster than the alternatives at least :)
Thanks for letting me know! I did change the openDICOM importer to do the same coordinate space conversion as the SimpleITK importer. I tested a few datasets and they looked the same as when imported with SimpleITK, so I'm not sure why this one looks like that.. Is it an open dataset that I can download somewhere maybe? :) |
I've updated the progress reporting now! And I've tried reproducing the issue with datasets having different scale in SimpleITK and OpenDICOM, but I've had no luck so far.. The ones I have get nearly the same scale. I did notice a small mistake in the importer (which is why they were only "nearly" the same. Can you try again now? If your dataset has very few slices then that might have been the cause. |
Yep, all good now. I tried it and it has correct scale now same as SimpleITK.
It was actually that huge 730 slice dataset that was having issues :D
When i look back on it now, it is nice compact solution, but when i read it first, it took me a while to get what is really going on :D It also kinda suprised me, cause i never saw for cycle used like that :D If it was me i would probably swap that first for cycle with while loop, cause it basically acts like it and would have that iterator variable somewhere else. But that is just personal preference i guess. And plus side, your solution teaches people that for cycle can also be used like that :D
Ye definetely, this is better, cause you are not checking the value everytime in that loop like me :) Although as i previously said somewhere, when i tested my variant, it added only negligable additional time (12s with reporting/10s without).
Yep, now it looks great, thanks. PR has my blessing now haha :D |
Great to hear! Thanks for testing :D
Yes that could work too! I'll look through all this again before I set up the next release, so I'll consider changing it then.
Yes, probably your progress reporting callback function is pretty fast then :) If it were slower it could be more of an issue. But I guess one callback per slice should be enough 😁
Thanks once again for your help! I'll merge this then! |
Changes:
ProgressHandler.Start
andProgressHandler.Finish
SetRenderModeAsync
SetTransferFunctionModeAsync
SetLightingEnabledAsync
SetTransferFunctionAsync
currentStageProgress
toIProgressView
#164