Mercurial > hg > orthanc-stone
changeset 1770:073484e33bee
fix offset of textures
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 12 May 2021 10:53:37 +0200 |
parents | a217140dd41a |
children | f302bbddf94d |
files | Applications/Samples/Common/RtViewerView.cpp OrthancStone/Sources/Scene2D/TextureBaseSceneLayer.cpp |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Applications/Samples/Common/RtViewerView.cpp Wed May 12 10:26:13 2021 +0200 +++ b/Applications/Samples/Common/RtViewerView.cpp Wed May 12 10:53:37 2021 +0200 @@ -45,6 +45,7 @@ #include "../../../OrthancStone/Sources/StoneException.h" #include "../../../OrthancStone/Sources/StoneInitialization.h" #include "../../../OrthancStone/Sources/Volumes/DicomVolumeImageMPRSlicer.h" +#include "../../../OrthancStone/Sources/Volumes/DicomVolumeImageReslicer.h" #include "../../../OrthancStone/Sources/Volumes/VolumeSceneLayerSource.h" // Orthanc @@ -308,6 +309,7 @@ config->SetLookupTable(lut); boost::shared_ptr<IVolumeSlicer> tmp(new DicomVolumeImageMPRSlicer(doseVolume)); + //boost::shared_ptr<IVolumeSlicer> tmp(new DicomVolumeImageReslicer(doseVolume)); this->SetDoseVolumeSlicer(tmp, config.release()); }
--- a/OrthancStone/Sources/Scene2D/TextureBaseSceneLayer.cpp Wed May 12 10:26:13 2021 +0200 +++ b/OrthancStone/Sources/Scene2D/TextureBaseSceneLayer.cpp Wed May 12 10:53:37 2021 +0200 @@ -166,9 +166,9 @@ const Vector& pixelOffsetY) { double x0, y0, x1, y1, x2, y2; - cuttingPlane.ProjectPoint(x0, y0, origin); - cuttingPlane.ProjectPoint(x1, y1, origin + pixelOffsetX); - cuttingPlane.ProjectPoint(x2, y2, origin + pixelOffsetY); + cuttingPlane.ProjectPoint(x0, y0, origin + cuttingPlane.GetOrigin()); + cuttingPlane.ProjectPoint(x1, y1, origin + cuttingPlane.GetOrigin() + pixelOffsetX); + cuttingPlane.ProjectPoint(x2, y2, origin + cuttingPlane.GetOrigin() + pixelOffsetY); /**