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

fix: take into account storePointData setting #1733

Merged
merged 2 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions packages/tools/src/tools/annotation/EllipticalROITool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1134,16 +1134,18 @@ class EllipticalROITool extends AnnotationTool {
pixelUnitsOptions
);

const pointsInShape = voxelManager.forEach(
this.configuration.statsCalculator.statsCallback,
{
boundsIJK,
imageData,
isInObject: (pointLPS) =>
pointInEllipse(ellipseObj, pointLPS, { fast: true }),
returnPoints: this.configuration.storePointData,
}
);
const pointsInShape = this.configuration.storePointData
? voxelManager.forEach(
this.configuration.statsCalculator.statsCallback,
{
boundsIJK,
imageData,
isInObject: (pointLPS) =>
pointInEllipse(ellipseObj, pointLPS, { fast: true }),
returnPoints: this.configuration.storePointData,
}
)
: null;
sedghi marked this conversation as resolved.
Show resolved Hide resolved

const stats = this.configuration.statsCalculator.getStatistics();
cachedStats[targetId] = {
Expand Down
18 changes: 10 additions & 8 deletions packages/tools/src/tools/annotation/RectangleROITool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -945,14 +945,16 @@ class RectangleROITool extends AnnotationTool {
pixelUnitsOptions
);

const pointsInShape = voxelManager.forEach(
this.configuration.statsCalculator.statsCallback,
{
boundsIJK,
imageData,
returnPoints: this.configuration.storePointData,
}
);
const pointsInShape = this.configuration.storePointData
? voxelManager.forEach(
this.configuration.statsCalculator.statsCallback,
{
boundsIJK,
imageData,
returnPoints: this.configuration.storePointData,
}
)
: null;
const stats = this.configuration.statsCalculator.getStatistics();

cachedStats[targetId] = {
Expand Down
Loading