Skip to content
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

Cornerstone getMetaData function #3

Open
norman-ma opened this issue Jun 17, 2022 · 0 comments
Open

Cornerstone getMetaData function #3

norman-ma opened this issue Jun 17, 2022 · 0 comments

Comments

@norman-ma
Copy link
Collaborator

norman-ma commented Jun 17, 2022

This is the function which gets the metaData. When invoked it iterates through the list of providers, ordered by their priority and returns the result from the first one to return a value based on the type parameter.

https://github.com/cornerstonejs/cornerstone/blob/56f51a0752955bab8a308bc900b95e28992cf3ea/src/metaData.js#L65

function getMetaData (type, imageId) {
  // Invoke each provider in priority order until one returns something
  for (let i = 0; i < providers.length; i++) {
    const result = providers[i].provider(type, imageId);

    if (result !== undefined) {
      return result;
    }
  }
}

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant