Skip to content

Commit

Permalink
fix(rendering): fix image overflow issues by restoring data type check (
Browse files Browse the repository at this point in the history
  • Loading branch information
IbrahimCSAE authored Feb 18, 2025
1 parent 5c61d76 commit f5ff886
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/core/src/RenderingEngine/StackViewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1940,14 +1940,17 @@ class StackViewport extends Viewport {
imagePlaneModule.columnCosines,
columnCosines as Point3
);
const isDataTypeMatching =
dataType === image.voxelManager.getScalarData().constructor.name;

const result =
isXSpacingValid &&
isYSpacingValid &&
isXVoxelsMatching &&
isYVoxelsMatching &&
isRowCosinesMatching &&
isColumnCosinesMatching;
isColumnCosinesMatching &&
isDataTypeMatching;

return result;
}
Expand Down Expand Up @@ -2540,7 +2543,7 @@ class StackViewport extends Viewport {

private _getInitialVOIRange(image: IImage) {
if (this.voiRange && this.voiUpdatedWithSetProperties) {
return this.globalDefaultProperties.voiRange;
return this.voiRange;
}
const { windowCenter, windowWidth, voiLUTFunction } = image;

Expand Down

0 comments on commit f5ff886

Please # to comment.