Skip to content

Commit

Permalink
revert half voxel. there is probably some bug in rendering pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
bionoone committed Oct 26, 2022
1 parent 397cb86 commit cb8997d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core/src/RenderingEngine/Viewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,13 @@ class Viewport implements IViewport {
const transformToOriginTx = vtkMatrixBuilder
.buildFromRadian()
.multiply(imageData.getIndexToWorld())
.translate((size[0] - 1) / 2.0, (size[1] - 1) / 2.0, 0);
.translate(size[0] / 2.0, size[1] / 2.0, 0);

const transformBackFromOriginTx = vtkMatrixBuilder
.buildFromRadian()
.translate(-(size[0] - 1) / 2.0, -(size[1] - 1) / 2.0, 0)
.translate(-size[0] / 2.0, -size[1] / 2.0, 0)
.multiply(imageData.getWorldToIndex());

if (flipH) {
this.flipHorizontal = flipHorizontal;
flipHTx = vtkMatrixBuilder
Expand Down

0 comments on commit cb8997d

Please sign in to comment.