Skip to content

Commit 2dd7e3f

Browse files
bruyeretfinetjul
authored andcommitted
docs(CPR): replace | null with Nullable
1 parent 4d62ebc commit 2dd7e3f

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Sources/Common/DataModel/Line/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { quat } from 'gl-matrix';
2-
import { Vector3, Vector2 } from '../../../types';
2+
import { Vector3, Vector2, Nullable } from '../../../types';
33
import vtkCell from '../Cell';
44

55
export enum IntersectionState {
@@ -9,7 +9,7 @@ export enum IntersectionState {
99
}
1010

1111
export interface ILineInitialValues {
12-
orientations: quat[] | null;
12+
orientations: Nullable<quat[]>;
1313
}
1414

1515
export interface IIntersectWithLine {
@@ -36,13 +36,13 @@ export interface vtkLine extends vtkCell {
3636
* Get the list of orientations (a list of quat) for each point of the line.
3737
* Can be null if the line is not oriented
3838
*/
39-
getOrientations(): quat[] | null;
39+
getOrientations(): Nullable<quat[]>;
4040

4141
/**
4242
* @see getOrientations
4343
* @param orientations The list of orientation per point of the centerline
4444
*/
45-
setOrientations(orientations: quat[] | null): boolean;
45+
setOrientations(orientations: Nullable<quat[]>): boolean;
4646

4747
/**
4848
* Compute the intersection point of the intersection between line and line

Sources/Rendering/Core/ImageCPRMapper/index.d.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { mat3, mat4, quat, vec3 } from "gl-matrix";
2+
import { Nullable } from "../../../types";
3+
import { vtkOutputPort } from "../../../interfaces";
4+
import vtkAbstractMapper3D, { IAbstractMapper3DInitialValues } from "../AbstractMapper3D";
25
import vtkDataArray from "../../../Common/Core/DataArray";
36
import vtkImageData from "../../../Common/DataModel/ImageData";
47
import vtkPolyData from "../../../Common/DataModel/PolyData";
5-
import { vtkOutputPort } from "../../../interfaces";
6-
import vtkAbstractMapper3D, { IAbstractMapper3DInitialValues } from "../AbstractMapper3D";
78
import vtkPolyLine from "../../../Common/DataModel/PolyLine";
89

910
interface ICoincidentTopology {
@@ -18,7 +19,7 @@ export interface IImageCPRMapperInitialValues extends IAbstractMapper3DInitialVa
1819
uniformOrientation: TOrientation; // Don't use vec3 if possible
1920
useUniformOrientation: boolean;
2021
preferSizeOverAccuracy: boolean; // Whether to use halfFloat representation of float, when it is inaccurate
21-
orientationArrayName: string | null;
22+
orientationArrayName: Nullable<string>;
2223
tangentDirection: vec3;
2324
bitangentDirection: vec3;
2425
normalDirection: vec3;
@@ -83,13 +84,13 @@ export interface vtkImageCPRMapper extends vtkAbstractMapper3D {
8384
* The data array should be an array of mat4, mat3, quat or vec3 but using vec3 makes the CPRInteractor unusable
8485
* Default to null.
8586
*/
86-
getOrientationArrayName(): string | null;
87+
getOrientationArrayName(): Nullable<string>;
8788

8889
/**
8990
* @see getOrientationArrayName
9091
* @param arrayName
9192
*/
92-
setOrientationArrayName(arrayName: string | null): boolean;
93+
setOrientationArrayName(arrayName: Nullable<string>): boolean;
9394

9495
/**
9596
* For each point on the oriented centerline, the tangent direction is the direction in which the mapper will sample
@@ -144,7 +145,7 @@ export interface vtkImageCPRMapper extends vtkAbstractMapper3D {
144145
/**
145146
* Find the data array to use for orientation in the input polydata ( @see getOrientationArrayName )
146147
*/
147-
getOrientationDataArray(): null | vtkDataArray;
148+
getOrientationDataArray(): Nullable<vtkDataArray>;
148149

149150
/**
150151
* Recompute the oriented centerline from the input polydata if needed and return the result

0 commit comments

Comments
 (0)