Skip to content

Commit

Permalink
update review
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi committed Feb 6, 2024
1 parent 72bb717 commit 576d524
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
23 changes: 20 additions & 3 deletions common/reviews/api/tools.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2336,7 +2336,7 @@ function getBoundingBoxAroundShapeIJK(points: Types_2.Point2[] | Types_2.Point3[
function getBoundingBoxAroundShapeWorld(points: Types_2.Point2[] | Types_2.Point3[], clipBounds?: Types_2.Point2 | Types_2.Point3): BoundingBox;

// @public (undocumented)
function getBoundsIJKFromRectangleAnnotations(annotations: any, referenceVolume: any, options?: Options): any;
function getBoundsIJKFromRectangleAnnotations(annotations: any, referenceVolume: any, options?: Options_3): any;

// @public (undocumented)
function getBrushSizeForToolGroup(toolGroupId: string, toolName?: string): void;
Expand Down Expand Up @@ -2426,6 +2426,9 @@ function getGlobalConfig_2(): SegmentationRepresentationConfig;
// @public (undocumented)
function getGlobalRepresentationConfig(representationType: SegmentationRepresentations): RepresentationConfig['LABELMAP'];

// @public (undocumented)
function getHoveredContourSegmentationAnnotation(segmentationId: any): number;

// @public (undocumented)
function getLineSegmentIntersectionsCoordinates(points: Types_2.Point2[], p1: Types_2.Point2, q1: Types_2.Point2, closed?: boolean): Types_2.Point2[];

Expand Down Expand Up @@ -2474,6 +2477,9 @@ function getPolyDataPoints(polyData: vtkPolyData): any[];
// @public (undocumented)
function getSegmentation(segmentationId: string): Segmentation | undefined;

// @public (undocumented)
function getSegmentationIdRepresentations(segmentationId: any): any[];

// @public (undocumented)
function getSegmentationRepresentationByUID(toolGroupId: string, segmentationRepresentationUID: string): ToolGroupSpecificRepresentation | undefined;

Expand All @@ -2493,7 +2499,10 @@ function getSegmentations(): Segmentation[] | [];
function getSegmentationVisibility(toolGroupId: string, segmentationRepresentationUID: string): boolean | undefined;

// @public (undocumented)
function getSegmentAtWorldPoint(viewport: Types_2.IViewport, worldPoint: Types_2.Point3, segmentationRepresentationUID: string): number;
function getSegmentAtLabelmapBorder(segmentationId: string, worldPoint: Types_2.Point3, { viewport, searchRadius }: Options_2): number;

// @public (undocumented)
function getSegmentAtWorldPoint(segmentationId: string, worldPoint: Types_2.Point3, options?: Options): number;

// @public (undocumented)
function getSegmentSpecificConfig(toolGroupId: string, segmentationRepresentationUID: string, segmentIndex: number): RepresentationConfig;
Expand Down Expand Up @@ -4531,7 +4540,9 @@ declare namespace segmentation_2 {
segmentContourAction,
invalidateBrushCursor,
getUniqueSegmentIndices,
getSegmentAtWorldPoint
getSegmentAtWorldPoint,
getSegmentAtLabelmapBorder,
getHoveredContourSegmentationAnnotation
}
}

Expand Down Expand Up @@ -4683,6 +4694,11 @@ export class SegmentSelectTool extends BaseTool {
// (undocumented)
onSetToolEnabled: () => void;
// (undocumented)
static SelectMode: {
Inside: string;
Border: string;
};
// (undocumented)
_setActiveSegment(evt?: EventTypes_2.InteractionEventType): void;
// (undocumented)
_setActiveSegmentForType(activeSegmentationReps: ToolGroupSpecificRepresentation, worldPoint: Types_2.Point3, viewport: Types_2.IStackViewport | Types_2.IVolumeViewport): void;
Expand Down Expand Up @@ -5064,6 +5080,7 @@ declare namespace state_3 {
getToolGroupIdsWithSegmentation,
getAllSegmentationRepresentations,
getSegmentationRepresentationByUID,
getSegmentationIdRepresentations,
addColorLUT,
getColorLUT,
getNextColorLUTIndex,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
getEnabledElementByIds,
Types,
StackViewport,
BaseVolumeViewport,
} from '@cornerstonejs/core';

import Representations from '../../../enums/SegmentationRepresentations';
Expand Down Expand Up @@ -81,7 +82,7 @@ async function render(

// this means we would like to use vtk actors for contour data

if (viewport instanceof StackViewport) {
if (!(viewport instanceof BaseVolumeViewport)) {
// We don't have a good way to handle stack viewports for contours at the moment.
// Plus, if we add a segmentation to one viewport, it gets added to all the viewports in the toolGroup too.
return;
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/src/tools/segmentation/SegmentSelectTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SegmentSelectTool extends BaseTool {
configuration: {
hoverTimeout: 100,
mode: SegmentSelectTool.SelectMode.Border,
searchRadius: 6, // search for border in a 10px radius
searchRadius: 6, // search for border in a 6px radius
},
}
) {
Expand Down

0 comments on commit 576d524

Please sign in to comment.