-
Notifications
You must be signed in to change notification settings - Fork 334
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
Add config for getGPUTier method in cornerstone.init #633
Conversation
* 'main' of github.com:iamiota/cornerstone3D-beta: (59 commits) chore(release): publish [skip ci] fix(event): Interactions between double click and multi mouse button (cornerstonejs#616) chore(release): publish [skip ci] fix(windowLevel): should not double scale for window level (cornerstonejs#619) chore(release): publish [skip ci] fix(expose): api default mouse primary (cornerstonejs#622) chore(release): publish [skip ci] docs(typo): in imageLoader.md (cornerstonejs#629) chore(release): publish [skip ci] fix(husky): husky config (cornerstonejs#627) chore(release): publish [skip ci] feat(api): cornerstone3D (cornerstonejs#626) chore(release): publish [skip ci] feat(api)!: cornerstone3D version 1.0 (cornerstonejs#625) chore(release): publish [skip ci] feat(version1)!: publish version 1.0 (cornerstonejs#624) chore(release): publish [skip ci] fix(versioning): sync all versions (cornerstonejs#623) chore(release): publish [skip ci] fix(cpu): could not render if switched to cpu in the middle (cornerstonejs#615) ...
…rmation files in the Internet from within the local network(LAN).
✅ Deploy Preview for cornerstone-3d-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hey, sorry I was super busy with all the releases. the init function would be used like this
then inside our Let me know what you think. |
I'm sorry, I didn't express myself clearly. First, I looked at the So what I want to do is pass the I don't know if it's elegant to pass like this in the |
@iamiota I see ok makes sense. Looking back at this |
After careful consideration, I have resubmitted some code. Overall, the description of this PR is as follows:
|
type Cornerstone3DConfig = { | ||
detectGPU: any; | ||
gpuTier?: TierResult; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please add some documentation here for these two properties?
for gpuTier, that we use it if provided if not a network call is performed
more important one is the detectGPUConfig
with some reference to the detect-gpu repo of what confis are available
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, it has already been added.
You should run |
Context
When cornerstone3D is being initialized, the
getGPUTier
method fromdetect-gpu
will generate a network request, which will not be implemented within a LAN and at the same time will block the initialization of cornerstone3D.Move the parameter of
getGPUTier
to the parameter ofcornerstone3D.init
, users can configure the path of device information by themselves. For example, they can download the device information files to a specific path on the hard disk in advance, so that even in a LAN, files can still be requested.Perhaps the name
getGPUTierConfig
is not accurate enough, do you have any suggestions?Changes & Results
Before
After
Testing
Checklist
PR
semantic-release format and guidelines.
Code
[] My code has been well-documented (function documentation, inline comments,
etc.)
[] I have run the
yarn build:update-api
to update the API documentation, and havecommitted the changes to this PR. (Read more here https://www.cornerstonejs.org/docs/contribute/update-api)
Public Documentation Updates
additions or removals.
Tested Environment