Skip to content

Commit

Permalink
api
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi committed Dec 10, 2024
1 parent 0b9f334 commit 783c60a
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 48 deletions.
21 changes: 18 additions & 3 deletions common/reviews/api/core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type vtkOpenGLTexture from '@kitware/vtk.js/Rendering/OpenGL/Texture';
import vtkPlane from '@kitware/vtk.js/Common/DataModel/Plane';
import type vtkRenderer from '@kitware/vtk.js/Rendering/Core/Renderer';
import type vtkVolume from '@kitware/vtk.js/Rendering/Core/Volume';
import type vtkVolumeMapper from '@kitware/vtk.js/Rendering/Core/VolumeMapper';
import vtkVolumeMapper from '@kitware/vtk.js/Rendering/Core/VolumeMapper';

// @public (undocumented)
interface AABB2 {
Expand Down Expand Up @@ -59,6 +59,13 @@ interface ActorEntry {
// (undocumented)
actor: Actor | VolumeActor | ImageActor | ICanvasActor;
// (undocumented)
blendMode?: BlendModes;
// (undocumented)
callbacks?: ({ volumeActor, volumeId, }: {
volumeActor: VolumeActor;
volumeId: string;
}) => void;
// (undocumented)
clippingFilter?: any;
// (undocumented)
referencedId?: string;
Expand Down Expand Up @@ -252,6 +259,8 @@ enum BlendModes {
// (undocumented)
COMPOSITE,
// (undocumented)
LABELMAP_EDGE_PROJECTION_BLEND,
// (undocumented)
MAXIMUM_INTENSITY_BLEND,
// (undocumented)
MINIMUM_INTENSITY_BLEND
Expand Down Expand Up @@ -439,6 +448,9 @@ enum ContourType {
OPEN_PLANAR = "OPEN_PLANAR"
}

// @public (undocumented)
export function convertMapperToNotSharedMapper(sharedMapper: vtkVolumeMapper): vtkVolumeMapper;

// @public (undocumented)
function convertStackToVolumeViewport({ viewport, options, }: {
viewport: StackViewport;
Expand Down Expand Up @@ -2474,6 +2486,7 @@ type IVolumeInput = {
callback?: VolumeInputCallback;
blendMode?: BlendModes;
slabThickness?: number;
useIndependentComponents?: boolean;
[key: string]: unknown;
};

Expand Down Expand Up @@ -2803,7 +2816,7 @@ class PointsManager<T> {
// (undocumented)
getPointArray(index: number): T;
// (undocumented)
getTypedArray(): Float32Array;
getTypedArray(): Float32Array<ArrayBufferLike>;
// (undocumented)
protected grow(additionalSize?: number, growSize?: number): void;
// (undocumented)
Expand Down Expand Up @@ -3169,7 +3182,7 @@ class RLEVoxelMap<T> {
// (undocumented)
getRun: (j: number, k: number) => RLERun<T>[];
// (undocumented)
static getScalarData: (ArrayType?: Uint8ClampedArrayConstructor) => Uint8ClampedArray;
static getScalarData: (ArrayType?: Uint8ClampedArrayConstructor) => Uint8ClampedArray<any>;
// (undocumented)
has(index: number): boolean;
// (undocumented)
Expand Down Expand Up @@ -4778,6 +4791,8 @@ export class VolumeViewport extends BaseVolumeViewport {
// (undocumented)
addVolumes(volumeInputArray: IVolumeInput[], immediate?: boolean, suppressEvents?: boolean): Promise<void>;
// (undocumented)
getBlendMode(filterActorUIDs?: string[]): BlendModes;
// (undocumented)
getCurrentImageId: () => string | undefined;
// (undocumented)
getCurrentImageIdIndex: (volumeId?: string, useSlabThickness?: boolean) => number;
Expand Down
2 changes: 1 addition & 1 deletion common/reviews/api/dicom-image-loader.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ percentComplete: number;
}> | Promise<{
contentType: string;
imageQualityStatus: ImageQualityStatus_2;
pixelData: Uint8Array;
pixelData: Uint8Array<any>;
extractDone?: undefined;
tokenIndex?: undefined;
responseHeaders?: undefined;
Expand Down
10 changes: 9 additions & 1 deletion common/reviews/api/tools.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1895,6 +1895,7 @@ const _default: {
getPointInLineOfSightWithCriteria: typeof getPointInLineOfSightWithCriteria;
isPlaneIntersectingAABB: (origin: any, normal: any, minX: any, minY: any, minZ: any, maxX: any, maxY: any, maxZ: any) => boolean;
filterAnnotationsWithinSamePlane: typeof filterAnnotationsWithinSamePlane;
getPointsInLineOfSight: typeof getPointsInLineOfSight;
};

// @public (undocumented)
Expand Down Expand Up @@ -2769,6 +2770,12 @@ function getPoint(points: any, idx: any): Types_2.Point3;
// @public (undocumented)
function getPointInLineOfSightWithCriteria(viewport: Types_2.IVolumeViewport, worldPos: Types_2.Point3, targetVolumeId: string, criteriaFunction: (intensity: number, point: Types_2.Point3) => Types_2.Point3, stepSize?: number): Types_2.Point3;

// @public (undocumented)
function getPointsInLineOfSight(viewport: Types_2.IVolumeViewport, worldPos: Types_2.Point3, { targetVolumeId, stepSize }: {
targetVolumeId: string;
stepSize: number;
}): Types_2.Point3[];

// @public (undocumented)
function getPolyDataPointIndexes(polyData: vtkPolyData): any[];

Expand Down Expand Up @@ -4140,7 +4147,8 @@ declare namespace planar_2 {
filterAnnotationsForDisplay,
getPointInLineOfSightWithCriteria,
isPlaneIntersectingAABB,
filterAnnotationsWithinSamePlane
filterAnnotationsWithinSamePlane,
getPointsInLineOfSight
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@babel/runtime": "7.21.5",
"@babel/runtime-corejs3": "^7.15.4",
"@cornerstonejs/calculate-suv": "1.0.3",
"@microsoft/api-extractor": "^7.47.2",
"@microsoft/api-extractor": "7.48.0",
"@microsoft/tsdoc": "^0.15.0",
"@playwright/test": "^1.48.0",
"@rollup/plugin-babel": "^6.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ async function computeLabelmapFromContourSegmentation(
segmentationId,
options: PolySegConversionOptions = {}
): Promise<LabelmapSegmentationDataVolume | LabelmapSegmentationDataStack> {
const isVolume = options.viewport instanceof VolumeViewport ?? true;
const isVolume = options.viewport
? options.viewport instanceof VolumeViewport
: true;

if (isVolume && !options.viewport) {
// Todo: we don't have support for volume viewport without providing the
Expand Down Expand Up @@ -103,7 +105,7 @@ async function computeLabelmapFromSurfaceSegmentation(
options: PolySegConversionOptions = {}
): Promise<LabelmapSegmentationDataVolume | LabelmapSegmentationDataStack> {
const { viewport } = options;
const isVolume = viewport instanceof VolumeViewport ?? true;
const isVolume = viewport ? viewport instanceof VolumeViewport : true;

const segmentIndices = options.segmentIndices?.length
? options.segmentIndices
Expand Down
85 changes: 45 additions & 40 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3969,27 +3969,27 @@
dependencies:
"@types/mdx" "^2.0.0"

"@microsoft/api-extractor-model@7.29.5":
version "7.29.5"
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.29.5.tgz#48452a5d74c969bdabcd1773bdfcefa15597bd0b"
integrity sha512-axMwj4pgtYH6/IclP9ly33laSwTym1kBwSUcoHElc2LYAE5NNlhGT78ucEpIZtqEZaGgA8yxGXIyS17XCC2Iuw==
dependencies:
"@microsoft/tsdoc" "~0.15.0"
"@microsoft/tsdoc-config" "~0.17.0"
"@rushstack/node-core-library" "5.6.0"

"@microsoft/api-extractor@^7.47.2":
version "7.47.6"
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.47.6.tgz#92f3d3b80c56a0a26cbbc01c5c0a120230666402"
integrity sha512-saI7n319+PdJ8PAePr14LWeIPOW2fHSr3KZfYFqJ2VUpIc1TTSh6ATFZfLPWI1LK7eZHun8+FpNsuxonyvxTgQ==
dependencies:
"@microsoft/api-extractor-model" "7.29.5"
"@microsoft/tsdoc" "~0.15.0"
"@microsoft/tsdoc-config" "~0.17.0"
"@rushstack/node-core-library" "5.6.0"
"@microsoft/api-extractor-model@7.30.0":
version "7.30.0"
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.30.0.tgz#18a0528350124015b2c08397474e9309a8b3c807"
integrity sha512-26/LJZBrsWDKAkOWRiQbdVgcfd1F3nyJnAiJzsAgpouPk7LtOIj7PK9aJtBaw/pUXrkotEg27RrT+Jm/q0bbug==
dependencies:
"@microsoft/tsdoc" "~0.15.1"
"@microsoft/tsdoc-config" "~0.17.1"
"@rushstack/node-core-library" "5.10.0"

"@microsoft/api-extractor@7.48.0":
version "7.48.0"
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.48.0.tgz#d87243bdafbfadcf87b336b2b4e5de71ecc7caab"
integrity sha512-FMFgPjoilMUWeZXqYRlJ3gCVRhB7WU/HN88n8OLqEsmsG4zBdX/KQdtJfhq95LQTQ++zfu0Em1LLb73NqRCLYQ==
dependencies:
"@microsoft/api-extractor-model" "7.30.0"
"@microsoft/tsdoc" "~0.15.1"
"@microsoft/tsdoc-config" "~0.17.1"
"@rushstack/node-core-library" "5.10.0"
"@rushstack/rig-package" "0.5.3"
"@rushstack/terminal" "0.13.4"
"@rushstack/ts-command-line" "4.22.5"
"@rushstack/terminal" "0.14.3"
"@rushstack/ts-command-line" "4.23.1"
lodash "~4.17.15"
minimatch "~3.0.3"
resolve "~1.22.1"
Expand All @@ -4007,12 +4007,12 @@
jju "~1.4.0"
resolve "~1.19.0"

"@microsoft/tsdoc-config@~0.17.0":
version "0.17.0"
resolved "https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.17.0.tgz#82605152b3c1d3f5cd4a11697bc298437484d55d"
integrity sha512-v/EYRXnCAIHxOHW+Plb6OWuUoMotxTN0GLatnpOb1xq0KuTNw/WI3pamJx/UbsoJP5k9MCw1QxvvhPcF9pH3Zg==
"@microsoft/tsdoc-config@~0.17.1":
version "0.17.1"
resolved "https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.17.1.tgz#e0f0b50628f4ad7fe121ca616beacfe6a25b9335"
integrity sha512-UtjIFe0C6oYgTnad4q1QP4qXwLhe6tIpNTRStJ2RZEPIkqQPREAwE5spzVxsdn9UaEMUqhh0AqSx3X4nWAKXWw==
dependencies:
"@microsoft/tsdoc" "0.15.0"
"@microsoft/tsdoc" "0.15.1"
ajv "~8.12.0"
jju "~1.4.0"
resolve "~1.22.2"
Expand All @@ -4022,7 +4022,12 @@
resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz#c3ec604a0b54b9a9b87e9735dfc59e1a5da6a5fb"
integrity sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==

"@microsoft/[email protected]", "@microsoft/tsdoc@^0.15.0", "@microsoft/tsdoc@~0.15.0":
"@microsoft/[email protected]", "@microsoft/tsdoc@~0.15.1":
version "0.15.1"
resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.15.1.tgz#d4f6937353bc4568292654efb0a0e0532adbcba2"
integrity sha512-4aErSrCR/On/e5G2hDP0wjooqDdauzEbIq8hIkIe5pXV0rtWJZvdCEKL0ykZxex+IxIwBp0eGeV48hQN07dXtw==

"@microsoft/tsdoc@^0.15.0":
version "0.15.0"
resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.15.0.tgz#f29a55df17cb6e87cfbabce33ff6a14a9f85076d"
integrity sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==
Expand Down Expand Up @@ -5362,10 +5367,10 @@
resolved "https://registry.yarnpkg.com/@rspack/lite-tapable/-/lite-tapable-1.0.1.tgz#d4540a5d28bd6177164bc0ba0bee4bdec0458591"
integrity sha512-VynGOEsVw2s8TAlLf/uESfrgfrq2+rcXB1muPJYBWbsm1Oa6r5qVQhjA5ggM6z/coYPrsVMgovl3Ff7Q7OCp1w==

"@rushstack/node-core-library@5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-5.6.0.tgz#8f71de4501a053fc19f4414aadc7c6b249368544"
integrity sha512-3ixIcEHseqU1sbnvoQkvxvfTYWbi1IIhnq/vexJcex7j6D8lnQCiYnd/E2oXbUH0Zv48CjtfslC/2MVFd71mpg==
"@rushstack/node-core-library@5.10.0":
version "5.10.0"
resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-5.10.0.tgz#84173c913761a7d1edef5c818ce03d9e22cab9d7"
integrity sha512-2pPLCuS/3x7DCd7liZkqOewGM0OzLyCacdvOe8j6Yrx9LkETGnxul1t7603bIaB8nUAooORcct9fFDOQMbWAgw==
dependencies:
ajv "~8.13.0"
ajv-draft-04 "~1.0.0"
Expand All @@ -5384,20 +5389,20 @@
resolve "~1.22.1"
strip-json-comments "~3.1.1"

"@rushstack/terminal@0.13.4":
version "0.13.4"
resolved "https://registry.yarnpkg.com/@rushstack/terminal/-/terminal-0.13.4.tgz#f564fe7defd8a7ffd0754126e741c8fc3f576054"
integrity sha512-h7g2RuffpqBCDKOijlUmvQ0b2O9kpIOK9TWCX9IR+2kvudp6MdtCYDu29zeqweWwCSWUnuAaUfB5HT88s0YCiw==
"@rushstack/terminal@0.14.3":
version "0.14.3"
resolved "https://registry.yarnpkg.com/@rushstack/terminal/-/terminal-0.14.3.tgz#eae0198e73eac56c901f6e00d0d4254c50a3f655"
integrity sha512-csXbZsAdab/v8DbU1sz7WC2aNaKArcdS/FPmXMOXEj/JBBZMvDK0+1b4Qao0kkG0ciB1Qe86/Mb68GjH6/TnMw==
dependencies:
"@rushstack/node-core-library" "5.6.0"
"@rushstack/node-core-library" "5.10.0"
supports-color "~8.1.1"

"@rushstack/ts-command-line@4.22.5":
version "4.22.5"
resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.22.5.tgz#1a88e607519a0b79d20314b495d2241f3d5a6f40"
integrity sha512-eFm+5DJboPHAy3epLNQtmG+hDlBzS950g26nZPbciMQeXmZ5shGGNe6ERjV77wnr5IuxfLhYGJ4ZjPy8Z56MBA==
"@rushstack/ts-command-line@4.23.1":
version "4.23.1"
resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.23.1.tgz#d5e33dbb1a016d9440b3a20010b82ccfe9abd34a"
integrity sha512-40jTmYoiu/xlIpkkRsVfENtBq4CW3R4azbL0Vmda+fMwHWqss6wwf/Cy/UJmMqIzpfYc2OTnjYP1ZLD3CmyeCA==
dependencies:
"@rushstack/terminal" "0.13.4"
"@rushstack/terminal" "0.14.3"
"@types/argparse" "1.0.38"
argparse "~1.0.9"
string-argv "~0.3.1"
Expand Down

0 comments on commit 783c60a

Please sign in to comment.