# HG changeset patch # User Sebastien Jodogne # Date 1621071718 -7200 # Node ID 748bfa7df18b0444251b210ae0f2b5fa0d9876e8 # Parent 58bebc9041910d4c20caf749a9cc2bed45a31f1c removing test code in DicomVolumeImageReslicer diff -r 58bebc904191 -r 748bfa7df18b OrthancStone/Sources/Volumes/DicomVolumeImageReslicer.cpp --- a/OrthancStone/Sources/Volumes/DicomVolumeImageReslicer.cpp Fri May 14 19:07:51 2021 +0200 +++ b/OrthancStone/Sources/Volumes/DicomVolumeImageReslicer.cpp Sat May 15 11:41:58 2021 +0200 @@ -78,46 +78,17 @@ const double s = reslicer.GetPixelSpacing(); -#if 1 const double x1 = reslicer.GetOutputExtent().GetX1(); - //const double x2 = reslicer.GetOutputExtent().GetX2(); const double y1 = reslicer.GetOutputExtent().GetY1(); - const double y2 = reslicer.GetOutputExtent().GetY2(); - const Vector p1 = cuttingPlane.MapSliceToWorldCoordinates(x1, y1); - const Vector p2 = cuttingPlane.MapSliceToWorldCoordinates(x1, y2); // The "0.5" shift is to move from the corner of voxel to the center of the voxel - if (1) - { - texture->SetCuttingPlaneTransform( - cuttingPlane, p1 + 0.5 * s * cuttingPlane.GetAxisX() + 0.5 * s * cuttingPlane.GetAxisY(), - s * cuttingPlane.GetAxisX(), - s * cuttingPlane.GetAxisY()); - } - else - { - /** - * TODO - ONE WAS TO SOMETIMES FLIP the Y axis. Is it also - * possible for the X axis? - **/ - - texture->SetCuttingPlaneTransform( - cuttingPlane, p2 + 0.5 * s * cuttingPlane.GetAxisX() + 0.5 * s * cuttingPlane.GetAxisY(), - s * cuttingPlane.GetAxisX(), - -s * cuttingPlane.GetAxisY()); - } + texture->SetCuttingPlaneTransform( + cuttingPlane, p1 + 0.5 * s * cuttingPlane.GetAxisX() + 0.5 * s * cuttingPlane.GetAxisY(), + s * cuttingPlane.GetAxisX(), + s * cuttingPlane.GetAxisY()); -#else - texture->SetPixelSpacing(s, s); - texture->SetOrigin(reslicer.GetOutputExtent().GetX1() + 0.5 * s, - reslicer.GetOutputExtent().GetY1() + 0.5 * s); - //texture->SetFlipY(true); - - // TODO - Angle!! -#endif - return texture.release(); } else