import type { Types } from '@cornerstonejs/core'; import type vtkImageData from '@kitware/vtk.js/Common/DataModel/ImageData'; import type { Segmentation } from '../../../types/SegmentationStateTypes.js'; import type { LabelmapLayer, SegmentLabelmapBindingState } from '../../../types/LabelmapTypes.js'; import type { LabelmapRestoreStep } from '../../../utilities/segmentation/createLabelmapMemo.js'; type CrossLayerEraseRecord = { voxelManager: Types.IVoxelManager; labelValue: number; indices: number[]; }; type MoveSegmentToPrivateLabelmap = (segmentation: Segmentation, segmentIndex: number, options?: { moveStepCallback?: (step: LabelmapRestoreStep) => void; }) => LabelmapLayer | undefined; type BeginLabelmapEditTransactionOptions = { segmentIndex: number; overwriteSegmentIndices?: number[]; segmentationVoxelManager?: Types.IVoxelManager; segmentationImageData?: vtkImageData; isInObject?: (point: Types.Point3) => boolean; isInObjectBoundsIJK?: Types.BoundsIJK; moveSegmentToPrivateLabelmap?: MoveSegmentToPrivateLabelmap; }; type LabelmapEditTransaction = { segmentIndex: number; labelmapId?: string; labelValue: number; sourceLayer?: LabelmapLayer; activeLayer?: LabelmapLayer; overwriteSegmentIndices: number[]; protectedSegmentIndices: number[]; crossLayerEraseBindings: SegmentLabelmapBindingState[]; movedSegment: boolean; moveStep?: LabelmapRestoreStep; }; type ResolveLabelmapLayerEditTargetOptions = { viewport?: Types.IViewport; imageId?: string; sourceLayer?: LabelmapLayer; preferVolume?: boolean; }; type LabelmapLayerEditTarget = { imageId?: string; imageData?: vtkImageData; voxelManager?: Types.IVoxelManager; volume?: Types.IImageVolume; image?: Types.IImage; }; type EraseLabelmapEditTransactionOptions = { viewport: Types.IViewport; referenceImageData: vtkImageData; isInObject: (point: Types.Point3) => boolean; isInObjectBoundsIJK?: Types.BoundsIJK; imageId?: string; crossLayerEraseCallback?: (record: CrossLayerEraseRecord) => void; }; declare function getProtectedSegmentIndicesForLayer(segmentation: Segmentation, labelmapId: string, segmentIndex: number, overwriteSegmentIndices?: number[]): number[]; declare function hasProtectedSegmentOverwrite(segmentation: Segmentation, labelmapId: string, protectedSegmentIndices: number[], voxelManager?: Types.IVoxelManager, options?: Pick): boolean; declare function collectCrossLayerEraseBindings(segmentation: Segmentation, labelmapId: string | undefined, overwriteSegmentIndices?: number[]): SegmentLabelmapBindingState[]; declare function beginLabelmapEditTransaction(segmentation: Segmentation, options: BeginLabelmapEditTransactionOptions): LabelmapEditTransaction; declare function getLabelmapLayerImageId(layer: LabelmapLayer, options?: ResolveLabelmapLayerEditTargetOptions): string | undefined; declare function resolveLabelmapLayerEditTarget(layer: LabelmapLayer, options?: ResolveLabelmapLayerEditTargetOptions): LabelmapLayerEditTarget; declare function eraseLabelmapEditTransactionOverwrites(segmentation: Segmentation, transaction: LabelmapEditTransaction | undefined, options: EraseLabelmapEditTransactionOptions): number[]; export { beginLabelmapEditTransaction, collectCrossLayerEraseBindings, eraseLabelmapEditTransactionOverwrites, getLabelmapLayerImageId, getProtectedSegmentIndicesForLayer, hasProtectedSegmentOverwrite, resolveLabelmapLayerEditTarget, }; export type { BeginLabelmapEditTransactionOptions, CrossLayerEraseRecord, EraseLabelmapEditTransactionOptions, LabelmapEditTransaction, LabelmapLayerEditTarget, ResolveLabelmapLayerEditTargetOptions, };