# HG changeset patch # User Sebastien Jodogne # Date 1620809617 -7200 # Node ID 073484e33bee06b9cc4e21f59d81720afa4f30cd # Parent a217140dd41a2dc891ae30741ada417920d77bfd fix offset of textures diff -r a217140dd41a -r 073484e33bee Applications/Samples/Common/RtViewerView.cpp --- 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 tmp(new DicomVolumeImageMPRSlicer(doseVolume)); + //boost::shared_ptr tmp(new DicomVolumeImageReslicer(doseVolume)); this->SetDoseVolumeSlicer(tmp, config.release()); } diff -r a217140dd41a -r 073484e33bee OrthancStone/Sources/Scene2D/TextureBaseSceneLayer.cpp --- 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); /**