Skip to content

Feat(coordinate mapping) #2054

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

Merged

Conversation

rodrigobasilio2022
Copy link
Contributor

@rodrigobasilio2022 rodrigobasilio2022 commented May 7, 2025

Context

Changes & Results

Fixed coordinate conversions between slide coordinate system, image/pixel/index coordinates and canvas coordinates.

image

Given the points 1, 2 and 3

# Point (World Coordinates) Expected Canvas Result CS3D Canvas Result Difference
1 [5, 25, 0] [0, 74.02] [0, 778] [0, +703.98]
2 [12.5, 32.5, 0] [250, 250] [250, 602] [0, +352]
3 [20, 40, 0] [500, 426.02] [500, 426.02] [0, 0]

Also we implement the indexToWorld and worldToIndex functions

Testing

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • [] My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • [] "OS:
  • [] "Node version:
  • [] "Browser:

@rodrigobasilio2022 rodrigobasilio2022 changed the title [WIP] Feat(coordinate mapping) Feat(coordinate mapping) May 7, 2025
Copy link
Collaborator

@wayfarer3130 wayfarer3130 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of small changes and then I can merge.

Copy link
Member

@sedghi sedghi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the description to explain what's currently wrong or what this unlocks.

@rodrigobasilio2022
Copy link
Contributor Author

rodrigobasilio2022 commented May 9, 2025

@wayfarer3130 I think you approve on the wrong place...

@wayfarer3130 wayfarer3130 merged commit fe23258 into cornerstonejs:main May 27, 2025
9 checks passed
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

Successfully merging this pull request may close these issues.

3 participants