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!: refactor points and add absolute coords calculation #472

Merged

Conversation

EscapedGibbon
Copy link
Collaborator

close: #469

@EscapedGibbon EscapedGibbon linked an issue Jun 7, 2024 that may be closed by this pull request
@EscapedGibbon EscapedGibbon changed the title feat!: refactor points and calculate absolute coords feat!: refactor points and add absolute coords calculation Jun 7, 2024
@EscapedGibbon EscapedGibbon marked this pull request as ready for review June 7, 2024 15:08
src/roi/Roi.ts Outdated Show resolved Hide resolved
@targos
Copy link
Member

targos commented Jun 10, 2024

I didn't expect the generator to be a private method.
I thought we discussed:

  • .points(kind) generator function
  • .absolutePoints getter with cache
  • .relativePoints getter with cache

@EscapedGibbon
Copy link
Collaborator Author

I didn't expect the generator to be a private method. I thought we discussed:

  • .points(kind) generator function
  • .absolutePoints getter with cache
  • .relativePoints getter with cache

We decided that it would be easier that the generator would treat both cases for absolute and relative coordinates. And since the code for both getters became similar, we decided to put it into one getter with a parameter that lets the user choose what kind of coordinates one wants. The coordinates are still cached separately though.

@stropitek
Copy link
Contributor

stropitek commented Jun 11, 2024

We decided that it would be easier that the generator would treat both cases for absolute and relative coordinates.

That is not contradicting what @targos said. The point is that it should not be private.

And since the code for both getters became similar, we decided to put it into one getter with a parameter that lets the user choose what kind of coordinates one wants.

It's no longer a "getter" if it takes parameters. Let's go with the initial idea: relativePoints and absolutePoints getters. Otherwise we would have to find another name to differentiate the generator from the function returning the cached points.

src/roi/Roi.ts Outdated Show resolved Hide resolved
@stropitek
Copy link
Contributor

stropitek commented Jun 12, 2024

API SGTM but the documentation explanations related to the new fields don't seem clear enough to me. We should discuss it IRL.

@EscapedGibbon
Copy link
Collaborator Author

I wrote "Images/Masks" instead of "RoiMap" for absolute coordinates because RoiMap doesn't have origin property.

Copy link
Contributor

@stropitek stropitek left a comment

Choose a reason for hiding this comment

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

Can you do the relative / absolute tests with the same data? It's nice to be able to compare the result of each with one another.

@EscapedGibbon EscapedGibbon merged commit ad9f91d into main Jun 14, 2024
8 checks passed
@EscapedGibbon EscapedGibbon deleted the 469-improve-roi-points-absolutepoints-relativepoints branch June 14, 2024 07:04
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.

Improve ROI - points, absolutePoints, relativePoints
3 participants