diff --git a/Sources/Common/DataModel/ImageData/index.d.ts b/Sources/Common/DataModel/ImageData/index.d.ts index 9f66380cfd6..f9d9139dc56 100755 --- a/Sources/Common/DataModel/ImageData/index.d.ts +++ b/Sources/Common/DataModel/ImageData/index.d.ts @@ -9,6 +9,7 @@ export interface IImageDataInitialValues extends IDataSetInitialValues { spacing?: number[]; origin?: number[]; extent?: number[]; + direction?: number[]; } interface IComputeHistogram { diff --git a/Sources/Common/DataModel/ImageData/index.js b/Sources/Common/DataModel/ImageData/index.js index a6035f350a8..ec523b18d67 100644 --- a/Sources/Common/DataModel/ImageData/index.js +++ b/Sources/Common/DataModel/ImageData/index.js @@ -232,7 +232,9 @@ function vtkImageData(publicAPI, model) { vtkBoundingBox.transformBounds(bin, model.worldToIndex, bout); // Make sure the transform is correct - publicAPI.onModified(publicAPI.computeTransforms); + model._onOriginChanged = publicAPI.computeTransforms; + model._onDirectionChanged = publicAPI.computeTransforms; + model._onSpacingChanged = publicAPI.computeTransforms; publicAPI.computeTransforms(); publicAPI.getCenter = () => vtkBoundingBox.getCenter(publicAPI.getBounds());