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

rename: Remaining toolGroupById and synchronizerById references #22

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
48 changes: 24 additions & 24 deletions common/reviews/api/tools.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -848,10 +848,10 @@ function destroy_2(): void;
function destroy_3(): void;

// @public (undocumented)
function destroySynchronizerById(synchronizerId: string): void;
function destroySynchronizer(synchronizerId: string): void;

// @public (undocumented)
function destroyToolGroupById(toolGroupId: string): void;
function destroyToolGroup(toolGroupId: string): void;

// @public (undocumented)
function distanceToPoint(lineStart: Types_2.Point2, lineEnd: Types_2.Point2, point: Types_2.Point2): number;
Expand Down Expand Up @@ -943,14 +943,14 @@ declare namespace ellipse {
}

// @public (undocumented)
export class EllipticalRoiTool extends AnnotationTool {
export class EllipticalROITool extends AnnotationTool {
constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
// (undocumented)
_activateDraw: (element: any) => void;
// (undocumented)
_activateModify: (element: any) => void;
// (undocumented)
addNewAnnotation: (evt: EventTypes_2.MouseDownActivateEventType) => EllipticalRoiAnnotation;
addNewAnnotation: (evt: EventTypes_2.MouseDownActivateEventType) => EllipticalROIAnnotation;
// (undocumented)
_calculateCachedStats: (annotation: any, viewport: any, renderingEngine: any, enabledElement: any) => any;
// (undocumented)
Expand All @@ -977,15 +977,15 @@ export class EllipticalRoiTool extends AnnotationTool {
// (undocumented)
_getTextLines: (data: any, targetId: any) => any[];
// (undocumented)
handleSelectedCallback: (evt: EventTypes_2.MouseDownEventType, annotation: EllipticalRoiAnnotation, handle: ToolHandle, interactionType?: string) => void;
handleSelectedCallback: (evt: EventTypes_2.MouseDownEventType, annotation: EllipticalROIAnnotation, handle: ToolHandle, interactionType?: string) => void;
// (undocumented)
isDrawing: boolean;
// (undocumented)
isHandleOutsideImage: boolean;
// (undocumented)
_isInsideVolume: (index1: any, index2: any, dimensions: any) => boolean;
// (undocumented)
isPointNearTool: (element: HTMLElement, annotation: EllipticalRoiAnnotation, canvasCoords: Types_2.Point2, proximity: number) => boolean;
isPointNearTool: (element: HTMLElement, annotation: EllipticalROIAnnotation, canvasCoords: Types_2.Point2, proximity: number) => boolean;
// (undocumented)
mouseDragCallback: any;
// (undocumented)
Expand All @@ -1003,7 +1003,7 @@ export class EllipticalRoiTool extends AnnotationTool {
// (undocumented)
static toolName: string;
// (undocumented)
toolSelectedCallback: (evt: EventTypes_2.MouseDownEventType, annotation: EllipticalRoiAnnotation, interactionType: InteractionTypes) => void;
toolSelectedCallback: (evt: EventTypes_2.MouseDownEventType, annotation: EllipticalROIAnnotation, interactionType: InteractionTypes) => void;
// (undocumented)
touchDragCallback: any;
}
Expand Down Expand Up @@ -1299,19 +1299,19 @@ function getState(annotation?: Annotation): AnnotationStyleStates;
function getStyle(toolName?: string, annotation?: Record<string, unknown>): Settings;

// @public (undocumented)
function getSynchronizerById(synchronizerId: string): Synchronizer | void;
function getSynchronizer(synchronizerId: string): Synchronizer | void;

// @public (undocumented)
function getSynchronizers(renderingEngineId: string, viewportId: string): Array<Synchronizer>;
function getSynchronizersForViewport(viewportId: string, renderingEngineId: string): Array<Synchronizer>;

// @public (undocumented)
function getTextBoxCoordsCanvas(annotationCanvasPoints: Array<Types_2.Point2>): Types_2.Point2;

// @public (undocumented)
function getToolGroup(viewportId: string, renderingEngineId: string): IToolGroup | undefined;
function getToolGroup(toolGroupId: string): IToolGroup | undefined;

// @public (undocumented)
function getToolGroupById(toolGroupId: string): IToolGroup | undefined;
function getToolGroupForViewport(viewportId: string, renderingEngineId: string): IToolGroup | undefined;

// @public (undocumented)
function getToolGroupSpecificConfig(toolGroupId: string): SegmentationRepresentationConfig;
Expand Down Expand Up @@ -2383,7 +2383,7 @@ declare namespace rectangle {
}

// @public (undocumented)
export class RectangleRoiStartEndThresholdTool extends RectangleRoiTool {
export class RectangleROIStartEndThresholdTool extends RectangleROITool {
constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
// (undocumented)
addNewAnnotation: (evt: EventTypes_2.MouseDownActivateEventType) => {
Expand Down Expand Up @@ -2422,7 +2422,7 @@ export class RectangleRoiStartEndThresholdTool extends RectangleRoiTool {
// (undocumented)
_calculateCachedStatsTool(annotation: any, enabledElement: any): any;
// (undocumented)
_computeProjectionPoints(annotation: RectangleRoiStartEndThresholdAnnotation, imageVolume: Types_2.IImageVolume): void;
_computeProjectionPoints(annotation: RectangleROIStartEndThresholdAnnotation, imageVolume: Types_2.IImageVolume): void;
// (undocumented)
editData: {
annotation: any;
Expand All @@ -2446,7 +2446,7 @@ export class RectangleRoiStartEndThresholdTool extends RectangleRoiTool {
}

// @public (undocumented)
export class RectangleRoiThresholdTool extends RectangleRoiTool {
export class RectangleROIThresholdTool extends RectangleROITool {
constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
// (undocumented)
addNewAnnotation: (evt: EventTypes_2.MouseDownActivateEventType) => {
Expand Down Expand Up @@ -2496,14 +2496,14 @@ export class RectangleRoiThresholdTool extends RectangleRoiTool {
}

// @public (undocumented)
export class RectangleRoiTool extends AnnotationTool {
export class RectangleROITool extends AnnotationTool {
constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
// (undocumented)
_activateDraw: (element: any) => void;
// (undocumented)
_activateModify: (element: any) => void;
// (undocumented)
addNewAnnotation: (evt: EventTypes_2.MouseDownActivateEventType) => RectangleRoiAnnotation;
addNewAnnotation: (evt: EventTypes_2.MouseDownActivateEventType) => RectangleROIAnnotation;
// (undocumented)
_calculateCachedStats: (annotation: any, viewPlaneNormal: any, viewUp: any, renderingEngine: any, enabledElement: any) => any;
// (undocumented)
Expand Down Expand Up @@ -2531,15 +2531,15 @@ export class RectangleRoiTool extends AnnotationTool {
// (undocumented)
_getTextLines: (data: any, targetId: string) => any[];
// (undocumented)
handleSelectedCallback: (evt: EventTypes_2.MouseDownEventType, annotation: RectangleRoiAnnotation, handle: ToolHandle, interactionType?: string) => void;
handleSelectedCallback: (evt: EventTypes_2.MouseDownEventType, annotation: RectangleROIAnnotation, handle: ToolHandle, interactionType?: string) => void;
// (undocumented)
isDrawing: boolean;
// (undocumented)
isHandleOutsideImage: boolean;
// (undocumented)
_isInsideVolume: (index1: any, index2: any, dimensions: any) => boolean;
// (undocumented)
isPointNearTool: (element: HTMLElement, annotation: RectangleRoiAnnotation, canvasCoords: Types_2.Point2, proximity: number) => boolean;
isPointNearTool: (element: HTMLElement, annotation: RectangleROIAnnotation, canvasCoords: Types_2.Point2, proximity: number) => boolean;
// (undocumented)
_mouseDragCallback: (evt: EventTypes_2.MouseMoveEventType | EventTypes_2.MouseDragEventType) => void;
// (undocumented)
Expand All @@ -2551,7 +2551,7 @@ export class RectangleRoiTool extends AnnotationTool {
// (undocumented)
static toolName: string;
// (undocumented)
toolSelectedCallback: (evt: EventTypes_2.MouseDownEventType, annotation: RectangleRoiAnnotation, interactionType: InteractionTypes) => void;
toolSelectedCallback: (evt: EventTypes_2.MouseDownEventType, annotation: RectangleROIAnnotation, interactionType: InteractionTypes) => void;
}

// @public (undocumented)
Expand Down Expand Up @@ -3070,10 +3070,10 @@ declare namespace SynchronizerManager {
export {
createSynchronizer,
destroy_2 as destroy,
getSynchronizerById,
getSynchronizers,
getSynchronizer,
getSynchronizersForViewport,
getAllSynchronizers,
destroySynchronizerById
destroySynchronizer
}
}
export { SynchronizerManager }
Expand Down Expand Up @@ -3111,9 +3111,9 @@ declare namespace ToolGroupManager {
export {
createToolGroup,
destroy_3 as destroy,
destroyToolGroupById,
getToolGroupById,
destroyToolGroup,
getToolGroup,
getToolGroupForViewport,
getAllToolGroups
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import getModalityLUT from './getModalityLUT'
import getModalityLut from './getModalityLut'
import getVOILUT from './getVOILut'
import { IImage, CPUFallbackLUT } from '../../../../types'

Expand Down Expand Up @@ -36,7 +36,7 @@ export default function (

const lut = image.cachedLut.lutArray

const mlutfn = getModalityLUT(image.slope, image.intercept, modalityLUT)
const mlutfn = getModalityLut(image.slope, image.intercept, modalityLUT)
const vlutfn = getVOILUT(windowWidth, windowCenter, voiLUT)

if (invert === true) {
Expand Down
8 changes: 4 additions & 4 deletions packages/demo/src/ExampleSegmentationRender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
WindowLevelTool,
PanTool,
ZoomTool,
RectangleRoiTool,
RectangleROITool,
SegmentationDisplayTool,
} from '@cornerstonejs/tools'
import * as csTools3d from '@cornerstonejs/tools'
Expand Down Expand Up @@ -82,8 +82,8 @@ const toolsToUse = [
]
const labelmap1UID = 'boneAndSoftTissue'
const labelmap2UID = 'fatTissue'
const RECTANGLE_ROI_THRESHOLD = 'RectangleRoiThreshold'
const RECTANGLE_ROI_THRESHOLD_MANUAL = 'RectangleRoiStartEndThreshold'
const RECTANGLE_ROI_THRESHOLD = 'RectangleROIThreshold'
const RECTANGLE_ROI_THRESHOLD_MANUAL = 'RectangleROIStartEndThreshold'

class SegmentationExample extends Component {
_elementNodes = null
Expand Down Expand Up @@ -1174,7 +1174,7 @@ class SegmentationExample extends Component {
<div>{this.getSetToolModes()}</div>
{this.state.segmentationToolActive && (
<div style={{ marginTop: '15px' }}>
{this.state.ptCtLeftClickTool.includes(RectangleRoiTool.toolName)
{this.state.ptCtLeftClickTool.includes(RectangleROITool.toolName)
? this.getThresholdUID()
: this.getScissorsUI()}
<span> All global segmentations </span>
Expand Down
8 changes: 4 additions & 4 deletions packages/demo/src/ExampleToolDisplayConfiguration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import {
WindowLevelTool,
LengthTool,
BidirectionalTool,
RectangleRoiTool,
RectangleROITool,
ProbeTool,
EllipticalRoiTool,
EllipticalROITool,
} from '@cornerstonejs/tools'
import * as csTools3d from '@cornerstonejs/tools'

Expand Down Expand Up @@ -53,8 +53,8 @@ class ToolDisplayConfigurationExample extends Component {
WindowLevelTool.toolName,
LengthTool.toolName,
BidirectionalTool.toolName,
RectangleRoiTool.toolName,
EllipticalRoiTool.toolName,
RectangleROITool.toolName,
EllipticalROITool.toolName,
ProbeTool.toolName,
]

Expand Down
16 changes: 8 additions & 8 deletions packages/demo/src/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import {
CrosshairsTool,
LengthTool,
BidirectionalTool,
RectangleRoiTool,
EllipticalRoiTool,
RectangleROITool,
EllipticalROITool,
RectangleScissorsTool,
CircleScissorsTool,
SphereScissorsTool,
RectangleRoiThresholdTool,
RectangleRoiStartEndThresholdTool,
RectangleROIThresholdTool,
RectangleROIStartEndThresholdTool,
BrushTool,
} from '@cornerstonejs/tools'

Expand Down Expand Up @@ -94,17 +94,17 @@ const ANNOTATION_TOOLS = [
CrosshairsTool.toolName,
LengthTool.toolName,
BidirectionalTool.toolName,
RectangleRoiTool.toolName,
EllipticalRoiTool.toolName,
RectangleROITool.toolName,
EllipticalROITool.toolName,
]

// A string helper for the drop down.
const SEGMENTATION_TOOLS = [
RectangleScissorsTool.toolName,
CircleScissorsTool.toolName,
SphereScissorsTool.toolName,
RectangleRoiThresholdTool.toolName,
RectangleRoiStartEndThresholdTool.toolName,
RectangleROIThresholdTool.toolName,
RectangleROIStartEndThresholdTool.toolName,
BrushTool.toolName,
]

Expand Down
4 changes: 2 additions & 2 deletions packages/demo/src/helpers/getToolDetailForDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ export default function getToolDetailForDisplay(eventDetail) {
}
}

if (metadata.toolName === RectangleRoiTool.toolName) {
if (metadata.toolName === RectangleROITool.toolName) {
detail.stats[`${target}-area`] = stat.area
detail.stats[`${target}-mean`] = stat.mean
detail.stats[`${target}-std`] = stat.stdDev
}

if (metadata.toolName === EllipticalRoiTool.toolName) {
if (metadata.toolName === EllipticalROITool.toolName) {
detail.stats[`${target}-area`] = stat.area
detail.stats[`${target}-mean`] = stat.mean
detail.stats[`${target}-std`] = stat.stdDev
Expand Down
Loading