Skip to content

Conversation

@wayfarer3130
Copy link
Collaborator

@wayfarer3130 wayfarer3130 commented Jan 6, 2026

Context

In CS3D 4.0, there was a change to update the size of the image area to use just the width/height. That contained a few bugs causing the sizing of some images to fail to be correct, but there are a lot of tests looking at the exact size.
This PR is compatible with that change for all stack views, but uses the correct sizing/location for MPR views.

Changes & Results

Distort the correct positioning just a tiny bit to agree with the new full-view display, but otherwise just use a single view calculation for displaying the image data.

Testing

Run
bun example resize

Turn off the "store Display Area" (it causes some problems when switching stored display areas - it can otherwise be used)

Use the various display areas to show the image in various locations/sizes - by default, the image should just touch the edges - this is incorrect by up to 2 pixels in a few cases.

Addresses: [#2317]

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:

@wayfarer3130 wayfarer3130 requested a review from sedghi January 6, 2026 20:39
viewUp,
viewPlaneNormal
));
const extent = imageData.getExtent();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The rest of this code is just temporary to show that the width world/height world are nearly exactly the same as the preivous calculation.

'1.3.6.1.4.1.14519.5.2.1.7009.2403.334240657131972136850343327463',
SeriesInstanceUID:
'1.3.6.1.4.1.14519.5.2.1.7009.2403.226151125820845824875394858561',
StudyInstanceUID: '1.3.6.1.4.1.25403.345050719074.3824.20170125095438.5',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Use a better example of a non-cube volume to show sizing of volumes.

@wayfarer3130
Copy link
Collaborator Author

@tblock79 and @IbrahimCSAE - does this PR address your concerns? I know it doesn't yet pass quite all the tests, still need to update a few, but it is mostly compatible as well as working correctly for multiple view orientations.

Copy link
Collaborator

@IbrahimCSAE IbrahimCSAE left a comment

Choose a reason for hiding this comment

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

Thanks

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