Skip to content

Commit a3cb767

Browse files
committed
BUG: Fix distance encoded projection in Slice view
- Implicit plane function for calculating distance uses SliceXYToRAS, however the distance is scaled in the Z direction - Fixed by normalizing the plane normal used for distance encoded projection git-svn-id: http://svn.slicer.org/Slicer4/trunk@27946 3bd1e089-480b-0410-8dfb-8563597acbee
1 parent 5e823e8 commit a3cb767

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Libs/MRML/DisplayableManager/vtkMRMLModelSliceDisplayableManager.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ ::SetSlicePlaneFromMatrix(vtkMatrix4x4* sliceMatrix, vtkPlane* plane)
262262
origin[i] = sliceMatrix->GetElement(i,3);
263263
}
264264

265+
vtkMath::Normalize(normal);
265266
plane->SetNormal(normal);
266267
plane->SetOrigin(origin);
267268
}

Modules/Loadable/Segmentations/MRMLDM/vtkMRMLSegmentationsDisplayableManager2D.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ void vtkMRMLSegmentationsDisplayableManager2D::vtkInternal::SetSlicePlaneFromMat
421421
origin[i] = sliceMatrix->GetElement(i,3);
422422
}
423423

424+
vtkMath::Normalize(normal);
424425
plane->SetNormal(normal);
425426
plane->SetOrigin(origin);
426427
}

0 commit comments

Comments
 (0)