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: view ref performance in 1.x version #1763

Closed
wants to merge 3 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
38 changes: 32 additions & 6 deletions common/reviews/api/core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,22 @@ type FlipDirection = {
flipVertical?: boolean;
};

// @public (undocumented)
class FrameRangeUtils {
// (undocumented)
protected static frameRangeExtractor: RegExp;
// (undocumented)
protected static framesToImageId(imageId: string, range: FramesRange | string): string;
// (undocumented)
static framesToString(range: any): string;
// (undocumented)
static imageIdToFrameEnd(imageId: string): number;
// (undocumented)
protected static imageIdToFrames(imageId: string): FramesRange;
// (undocumented)
static imageIdToFrameStart(imageId: string): number;
}

// @public (undocumented)
function generateVolumePropsFromImageIds(imageIds: string[], volumeId: string): ImageVolumeProps;

Expand Down Expand Up @@ -3106,7 +3122,7 @@ type StackScrollOutOfBoundsEventDetail = {
};

// @public (undocumented)
export class StackViewport extends Viewport implements StackViewport, IImagesLoader {
export class StackViewport extends Viewport {
constructor(props: ViewportInput);
// (undocumented)
addActor: (actorEntry: ActorEntry) => void;
Expand Down Expand Up @@ -3148,7 +3164,7 @@ export class StackViewport extends Viewport implements StackViewport, IImagesLoa
// (undocumented)
getCornerstoneImage: () => IImage;
// (undocumented)
getCurrentImageId: () => string;
getCurrentImageId: (index?: number) => string;
// (undocumented)
getCurrentImageIdIndex: () => number;
// (undocumented)
Expand Down Expand Up @@ -3196,6 +3212,8 @@ export class StackViewport extends Viewport implements StackViewport, IImagesLoa
// (undocumented)
getSliceIndex: () => number;
// (undocumented)
getSliceIndexForImage(reference: string | ViewReference): number;
// (undocumented)
getTargetImageIdIndex: () => number;
// (undocumented)
getViewReference(viewRefSpecifier?: ViewReferenceSpecifier): ViewReference;
Expand Down Expand Up @@ -3509,6 +3527,7 @@ function updateVTKImageDataWithCornerstoneImage(sourceImageData: vtkImageData, i

declare namespace utilities {
export {
FrameRangeUtils as frameRangeUtils,
eventListener,
invertRgbTransferFunction,
createSigmoidRGBTransferFunction,
Expand Down Expand Up @@ -3629,7 +3648,7 @@ export class VideoViewport extends Viewport implements IVideoViewport {
// (undocumented)
getCamera(): ICamera;
// (undocumented)
getCurrentImageId(): string;
getCurrentImageId(index?: number): string;
// (undocumented)
getCurrentImageIdIndex(): number;
// (undocumented)
Expand Down Expand Up @@ -3696,6 +3715,8 @@ export class VideoViewport extends Viewport implements IVideoViewport {
// (undocumented)
getSliceIndex(): number;
// (undocumented)
getSliceIndexForImage(reference: string | ViewReference): number;
// (undocumented)
protected getTransform(): Transform;
// (undocumented)
getViewReference(viewRefSpecifier?: ViewReferenceSpecifier): ViewReference;
Expand Down Expand Up @@ -4089,19 +4110,24 @@ type ViewPresentationSelector = {

// @public (undocumented)
type ViewReference = {
FrameOfReferenceUID: string;
FrameOfReferenceUID?: string;
referencedImageId?: string;
referencedImageURI?: string;
multiSliceReference?: ReferencedImageRange;
cameraFocalPoint?: Point3;
viewPlaneNormal?: Point3;
viewUp?: Point3;
sliceIndex?: number | [number, number];
sliceIndex?: number;
endRangeImageURI?: string;
volumeId?: string;
bounds?: BoundsLPS;
};

// @public (undocumented)
type ViewReferenceSpecifier = {
sliceIndex?: number | [number, number];
sliceIndex?: number;
sliceRangeEnd?: number;
frameNumber?: number;
forFrameOfReference?: boolean;
points?: Point3[];
volumeId?: string;
Expand Down
45 changes: 24 additions & 21 deletions common/reviews/api/tools.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,25 +322,6 @@ export abstract class AnnotationDisplayTool extends BaseTool {
static toolName: any;
}

// @public (undocumented)
class AnnotationFrameRange {
// (undocumented)
protected static frameRangeExtractor: RegExp;
// (undocumented)
protected static framesToImageId(imageId: string, range: FramesRange | string): string;
// (undocumented)
static framesToString(range: any): string;
// (undocumented)
static getFrameRange(annotation: Annotation): number | [number, number];
// (undocumented)
protected static imageIdToFrames(imageId: string): FramesRange;
// (undocumented)
static setFrameRange(annotation: Annotation, range: FramesRange | string, eventBase?: {
viewportId: any;
renderingEngineId: any;
}): void;
}

// @public (undocumented)
class AnnotationGroup {
constructor();
Expand Down Expand Up @@ -419,6 +400,24 @@ type AnnotationModifiedEventDetail = {
// @public (undocumented)
type AnnotationModifiedEventType = Types_2.CustomEventType<AnnotationModifiedEventDetail>;

// @public (undocumented)
class AnnotationMultiSlice {
// (undocumented)
static getFrameRange(annotation: Annotation): number | [number, number];
// (undocumented)
static getFrameRangeStr(annotation: Annotation): string;
// (undocumented)
static setEndRange(viewport: any, annotation: any, endRange?: any): void;
// (undocumented)
static setRange(viewport: any, annotation: any, startRange?: number, endRange?: number): void;
// (undocumented)
static setSingle(viewport: any, annotation: any, current?: any): void;
// (undocumented)
static setStartRange(viewport: any, annotation: any, startRange?: any): void;
// (undocumented)
static setViewportFrameRange(viewport: any, specifier: any): void;
}

// @public (undocumented)
type AnnotationRemovedEventDetail = {
annotation: Annotation;
Expand Down Expand Up @@ -505,7 +504,7 @@ export abstract class AnnotationTool extends AnnotationDisplayTool {
// (undocumented)
static createAnnotation(...annotationBaseData: any[]): Annotation;
// (undocumented)
static createAnnotationForViewport(viewport: any, ...annotationBaseData: any[]): Annotation;
static createAnnotationForViewport<T extends Annotation>(viewport: any, ...annotationBaseData: any[]): T;
// (undocumented)
protected getAnnotationStyle(context: {
annotation: Annotation;
Expand Down Expand Up @@ -952,12 +951,16 @@ enum ChangeTypes {
// (undocumented)
HandlesUpdated = "HandlesUpdated",
// (undocumented)
History = "History",
// (undocumented)
InitialSetup = "InitialSetup",
// (undocumented)
Interaction = "Interaction",
// (undocumented)
InterpolationUpdated = "InterpolationUpdated",
// (undocumented)
MetadataReferenceModified = "MetadataReferenceModified",
// (undocumented)
StatsUpdated = "StatsUpdated"
}

Expand Down Expand Up @@ -6358,7 +6361,7 @@ declare namespace utilities {
pointToString,
polyDataUtils,
voi,
AnnotationFrameRange as annotationFrameRange,
AnnotationMultiSlice,
contourSegmentation,
annotationHydration,
getClosestImageIdForStackViewport
Expand Down
Loading