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(viewer.js): Add bidirectional and ellipse annotations #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

igoroctaviano
Copy link
Collaborator

  • Adds Ellipse and Bidirectional annotations
  • Adds optical path fix / img type changes by @wayfarer3130

Screen Shot 2021-10-20 at 10 37 04

@igoroctaviano
Copy link
Collaborator Author

@hackermd I'm creating this PR as a draft because there's probably a ton of changes necessary to get this one merged.
I don't need to get this PR merged though, feel free to decide if it's worth reviewing/updating and merging it.

There's a new presentation state property in the ROI that you can ignore. It was used to store coordinates of the textbox.

Copy link
Collaborator

@hackermd hackermd left a comment

Choose a reason for hiding this comment

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

@igoroctaviano this looks really great and the functionality would be very useful to have in the library. I didn't yet delve into the implementations details, but only glanced over the changes to the public API and the coding style.

Some initial comments:

  • Please format the code according to our coding style guidelines based on standard. You can use npm run lint and npm run fmt.
  • We will need to find a different way of change the style without passing OpenLayers objects via the public API of the viewer.

I will take a closer look at the implementation of the markups and conduct a more comprehensive review next week.


import _MarkupManager from './markups/_MarkupManager'
import _MarkupManager from "./markups/_MarkupManager";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please revert these stylistic changes? They complicate the code review and are not in compliance with the coding style of the library (see Coding Style section in CONTRIBUTING).

Comment on lines +84 to +92
new dcmjs.sr.coding.CodedConcept({
meaning: "Long Axis",
value: "G-A185",
schemeDesignator: "SRT",
}),
new dcmjs.sr.coding.CodedConcept({
meaning: "Short Axis",
value: "G-A186",
schemeDesignator: "SRT",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use SCT rather than SRT codes.

Comment on lines +95 to +97
meaning: "AREA",
value: "G-D7FE",
schemeDesignator: "SRT",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use SCT rather than SRT codes.


const addOrUpdateMeasurement = (feature, measurement) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should probably be a private function, too.

Suggested change
const addOrUpdateMeasurement = (feature, measurement) => {
const _addOrUpdateMeasurement = (feature, measurement) => {

* @param {number[]} styleOptions.fill.color - RGBA color of the body
* @param {object} styleOptions.image - Style options for image
*/
setFeatureStyle (feature, styleOptions, optSilent = false) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The public API of the viewer should not expose any of the underlying OpenLayers types. We will need to be abstract this.

@igoroctaviano igoroctaviano changed the title Add bidirectional and ellipse annotations feat(viewer.js): Add bidirectional and ellipse annotations May 8, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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

Successfully merging this pull request may close these issues.

2 participants