Skip to content

Commit 7a7d3e7

Browse files
bruyeretfinetjul
authored andcommitted
feat(cpr): useStretchedMode accepts null argument
1 parent 2eee66d commit 7a7d3e7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export interface vtkImageCPRMapper extends vtkAbstractMapper3D {
215215
* Configure the mapper and the centerline to be in strectched CPR mode
216216
* @param centerPoint The center point, optional, default to the first point of the centerline or [0, 0, 0]
217217
*/
218-
useStretchedMode(centerPoint?: vec3): void;
218+
useStretchedMode(centerPoint?: Nullable<vec3>): void;
219219

220220
/**
221221
* Set the polydata used as a centerline

Sources/Rendering/Core/ImageCPRMapper/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ function vtkImageCPRMapper(publicAPI, model) {
280280
publicAPI.useStretchedMode = (centerPoint) => {
281281
const centerline = publicAPI.getOrientedCenterline();
282282
// Set center point
283-
if (centerPoint === undefined) {
283+
if (!centerPoint) {
284284
// Get the first point of the centerline if there is one
285285
const centerlinePoints = centerline.getPoints();
286286
const newCenterPoint =

0 commit comments

Comments
 (0)