Skip to content

Commit

Permalink
fix(invalidated stack): GPU rendering - inheriting voiRange when recr…
Browse files Browse the repository at this point in the history
…eating the default actor (#598)

* bugfix - GPU rendering - inheriting voiRange when recreating the default actor

* use "stackInvalidated" flag instead

* change test truth image
  • Loading branch information
md-prog authored May 5, 2023
1 parent 94f2776 commit 457746a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
3 changes: 2 additions & 1 deletion packages/core/src/RenderingEngine/StackViewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,8 @@ class StackViewport extends Viewport implements IStackViewport {
this.voiRange &&
this.voiRange.lower === voiRange.lower &&
this.voiRange.upper === voiRange.upper &&
!forceRecreateLUTFunction
!forceRecreateLUTFunction &&
!this.stackInvalidated
) {
return;
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 0 additions & 29 deletions packages/core/test/stackViewport_gpu_render_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -814,35 +814,6 @@ describe('renderingCore -- Stack', () => {
done.fail(e);
}
});
});

describe('Calibration ', () => {
beforeEach(function () {
cache.purgeCache();
this.DOMElements = [];

this.renderingEngine = new RenderingEngine(renderingEngineId);
imageLoader.registerImageLoader('fakeImageLoader', fakeImageLoader);
metaData.addProvider(fakeMetaDataProvider, 10000);
metaData.addProvider(
calibratedPixelSpacingMetadataProvider.get.bind(
calibratedPixelSpacingMetadataProvider
),
11000
);
});

afterEach(function () {
cache.purgeCache();
this.renderingEngine.destroy();
metaData.removeProvider(fakeMetaDataProvider);
imageLoader.unregisterAllImageLoaders();
this.DOMElements.forEach((el) => {
if (el.parentNode) {
el.parentNode.removeChild(el);
}
});
});

it('Should be able to fire imageCalibrated event with expected data', function (done) {
const element = createViewport(this.renderingEngine, AXIAL, 256, 256);
Expand Down

0 comments on commit 457746a

Please sign in to comment.