Skip to content

Commit

Permalink
fix: floodFill export in tools (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi authored Jan 13, 2023
1 parent 8e50a3f commit 700baa3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions common/reviews/api/tools.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1211,9 +1211,6 @@ const _default: {
getPointInLineOfSightWithCriteria: typeof getPointInLineOfSightWithCriteria;
};

// @public (undocumented)
function (getter: FloodFillGetter, seed: Types_2.Point2 | Types_2.Point3, options?: FloodFillOptions): FloodFillResult;

// @public (undocumented)
const _default_2: {
interpolateAnnotation: typeof interpolateAnnotation;
Expand Down Expand Up @@ -1671,6 +1668,9 @@ type FlipDirection = {
flipVertical?: boolean;
};

// @public (undocumented)
function floodFill(getter: FloodFillGetter, seed: Types_2.Point2 | Types_2.Point3, options?: FloodFillOptions): FloodFillResult;

// @public (undocumented)
type FloodFillGetter = FloodFillGetter2D | FloodFillGetter3D;

Expand Down Expand Up @@ -3864,7 +3864,7 @@ declare namespace segmentation_2 {
createLabelmapVolumeForViewport,
rectangleROIThresholdVolumeByRange,
triggerSegmentationRender,
default_2 as floodFill,
floodFill,
getBrushSizeForToolGroup,
setBrushSizeForToolGroup,
getBrushThresholdForToolGroup,
Expand Down
3 changes: 1 addition & 2 deletions packages/tools/src/tools/segmentation/PaintFillTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ import {
activeSegmentation,
segmentIndex as segmentIndexController,
} from '../../stateManagement/segmentation';
import { segmentation as segmentationUtils } from '../../utilities';
import floodFill from '../../utilities/segmentation/floodFill';
import { getSegmentation } from '../../stateManagement/segmentation/segmentationState';
import { FloodFillResult, FloodFillGetter } from '../../types';

const { transformWorldToIndex, isEqual } = csUtils;
const { floodFill } = segmentationUtils;

type PaintFillToolHelpers = {
getScalarDataPositionFromPlane: (x: number, y: number) => number;
Expand Down
4 changes: 3 additions & 1 deletion packages/tools/src/utilities/segmentation/floodFill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { Types } from '@cornerstonejs/core';
*
* @returns {Object}
*/
export default function (
function floodFill(
getter: FloodFillGetter,
seed: Types.Point2 | Types.Point3,
options: FloodFillOptions = {}
Expand Down Expand Up @@ -190,3 +190,5 @@ function lpad(string, character, length) {

return (pad + string).slice(-length);
}

export default floodFill;

0 comments on commit 700baa3

Please sign in to comment.