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

feat: reference lines #1482

Closed
wants to merge 12 commits into from

Conversation

arthur-miller
Copy link
Contributor

@arthur-miller arthur-miller commented Mar 4, 2020

Hello! I hope I'm not bothering you guys.

Here is my reference lines implementation, following @dannyrb 's guidelines (#619).
I will be very happy if you can share some of your thoughts on this with me.

Goals:

  • Avoid using a tool, use renderActiveReferenceLine.
  • Update reference lines when the viewport layout changes.
  • Update reference lines when the viewport render a new image.

Known limitations:

PR Checklist

  • Brief description of changes
  • Links to any relevant issues
  • Required status checks are passing
  • User cases if changes impact the user's experience
  • @mention a maintainer to request a review

@arthur-miller
Copy link
Contributor Author

@dannyrb, can you try this, please?

@codecov
Copy link

codecov bot commented Mar 4, 2020

Codecov Report

Merging #1482 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1482   +/-   ##
=======================================
  Coverage   11.73%   11.73%           
=======================================
  Files         276      276           
  Lines        7088     7088           
  Branches     1326     1326           
=======================================
  Hits          832      832           
  Misses       5075     5075           
  Partials     1181     1181           
Flag Coverage Δ
#core 16.54% <ø> (ø)
#viewer 0.96% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2412c08...7064daf. Read the comment docs.

@arthur-miller
Copy link
Contributor Author

@swederik and @JamesAPetts, I would also like to hear your opinion.

@dannyrb dannyrb self-requested a review March 4, 2020 14:49
@dannyrb dannyrb marked this pull request as ready for review March 4, 2020 14:49
@arthur-miller arthur-miller deleted the reference-lines-619 branch March 4, 2020 20:32
@arthur-miller arthur-miller restored the reference-lines-619 branch March 4, 2020 20:37
@arthur-miller arthur-miller reopened this Mar 4, 2020
@@ -275,3 +287,228 @@ const _connectToolsToMeasurementService = measurementService => {
}
);
};

const _enableReferenceLines = () => {
const waitForImageRendered = enabledElement =>
Copy link
Member

Choose a reason for hiding this comment

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

Is this your "null safety", but for making sure a cornerstoneElement has rendered an image?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exact. This value can be null If you choose a 2 x 1 viewport layout and change the image index of the first viewport before the image of the second viewport is rendered.

});

const renderReferenceLines = ({ detail: { enabledElement } }) => {
const { activeViewportIndex } = window.store.getState().viewports;
Copy link
Member

@dannyrb dannyrb Apr 1, 2020

Choose a reason for hiding this comment

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

This is the last window.store reference (if the other comments are addressed). I think we might have to keep it for now, but we should create a follow-up issue where we find a better way to provide this information to extensions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I agree.

@stale stale bot closed this Aug 31, 2020
@salimkanoun
Copy link
Contributor

Hi there, it there a reason this feature seems abandoned ?
It is a pretty nice feature really helpfull for many physiciens,

Best regards

Salim

@swederik swederik reopened this Sep 7, 2020
@stale stale bot removed the Stale 🥖 label Sep 7, 2020
@stale
Copy link

stale bot commented Sep 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale 🥖 label Sep 29, 2020
@karanbajaj
Copy link

any update on this? would really like to get this feature

@stale
Copy link

stale bot commented Oct 22, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale 🥖 label Oct 22, 2020
@stale
Copy link

stale bot commented Nov 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale 🥖 label Nov 13, 2020
@drsherifk
Copy link

Please merge this request.
We need this feature.

@stale
Copy link

stale bot commented Jun 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale 🥖 label Jun 26, 2021
@karanbajaj
Copy link

any update on this? would really like to get this feature

@stale stale bot removed the Stale 🥖 label Mar 22, 2022
@richsmith123 richsmith123 mentioned this pull request Apr 1, 2022
@mbilalsh
Copy link

mbilalsh commented Apr 2, 2022

@arthur-miller If you have working code. please share

@sedghi sedghi changed the base branch from master to v2-legacy June 19, 2023 13:12
@sedghi
Copy link
Member

sedghi commented Jun 19, 2023

base has changed, read more here #3477

@sedghi
Copy link
Member

sedghi commented Oct 3, 2023

reference lines are already in master branch for v3

@sedghi sedghi closed this Oct 3, 2023
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.

9 participants