changeset 190:465b294a55f0 wasm

typo
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 16 Mar 2018 14:35:26 +0100
parents 964118e7e6de
children 46cb2eedc2e0
files Framework/Toolbox/ImageGeometry.cpp Framework/Toolbox/ImageGeometry.h
diffstat 2 files changed, 32 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Toolbox/ImageGeometry.cpp	Fri Mar 16 13:19:23 2018 +0100
+++ b/Framework/Toolbox/ImageGeometry.cpp	Fri Mar 16 14:35:26 2018 +0100
@@ -47,7 +47,7 @@
   }
   
   
-  bool GetPerpectiveTransformExtent(unsigned int& x1,
+  bool GetProjectiveTransformExtent(unsigned int& x1,
                                     unsigned int& y1,
                                     unsigned int& x2,
                                     unsigned int& y2,
@@ -201,7 +201,7 @@
 
     unsigned int x1, y1, x2, y2;
 
-    if (GetPerpectiveTransformExtent(x1, y1, x2, y2, a,
+    if (GetProjectiveTransformExtent(x1, y1, x2, y2, a,
                                      source.GetWidth(), source.GetHeight(),
                                      target.GetWidth(), target.GetHeight()))
     {
@@ -360,10 +360,10 @@
 
   template <Orthanc::PixelFormat Format,
             ImageInterpolation Interpolation>
-  static void ApplyPerspectiveInternal(Orthanc::ImageAccessor& target,
-                                       const Orthanc::ImageAccessor& source,
-                                       const Matrix& a,
-                                       const Matrix& inva)
+  static void ApplyProjectiveInternal(Orthanc::ImageAccessor& target,
+                                      const Orthanc::ImageAccessor& source,
+                                      const Matrix& a,
+                                      const Matrix& inva)
   {
     assert(target.GetFormat() == Format &&
            source.GetFormat() == Format);
@@ -377,7 +377,7 @@
     const float floatWidth = source.GetWidth();
     const float floatHeight = source.GetHeight();
 
-    if (GetPerpectiveTransformExtent(x1, y1, x2, y2, a,
+    if (GetProjectiveTransformExtent(x1, y1, x2, y2, a,
                                      source.GetWidth(), source.GetHeight(),
                                      target.GetWidth(), target.GetHeight()))
     {
@@ -403,7 +403,7 @@
           
           // Make sure no integer overflow will occur after truncation
           // (the static_cast<unsigned int> could otherwise throw an
-          // exception in WebAssembly if strong perspective effects)
+          // exception in WebAssembly if strong projective effects)
           if (sourceX < floatWidth &&
               sourceY < floatHeight)
           { 
@@ -423,10 +423,10 @@
   }
 
     
-  void ApplyPerspectiveTransform(Orthanc::ImageAccessor& target,
-                                 const Orthanc::ImageAccessor& source,
-                                 const Matrix& a,
-                                 ImageInterpolation interpolation)
+  void ApplyProjectiveTransform(Orthanc::ImageAccessor& target,
+                                const Orthanc::ImageAccessor& source,
+                                const Matrix& a,
+                                ImageInterpolation interpolation)
   {
     if (source.GetFormat() != target.GetFormat())
     {
@@ -452,7 +452,7 @@
       double w = a(2, 2);
       if (LinearAlgebra::IsCloseToZero(w))
       {
-        LOG(ERROR) << "Singular perspective matrix";
+        LOG(ERROR) << "Singular projective matrix";
         throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
       }
       else
@@ -486,13 +486,13 @@
         switch (interpolation)
         {
           case ImageInterpolation_Nearest:
-            ApplyPerspectiveInternal<Orthanc::PixelFormat_Grayscale8, 
-                                     ImageInterpolation_Nearest>(target, source, a, inva);
+            ApplyProjectiveInternal<Orthanc::PixelFormat_Grayscale8, 
+                                    ImageInterpolation_Nearest>(target, source, a, inva);
             break;
 
           case ImageInterpolation_Bilinear:
-            ApplyPerspectiveInternal<Orthanc::PixelFormat_Grayscale8, 
-                                     ImageInterpolation_Bilinear>(target, source, a, inva);
+            ApplyProjectiveInternal<Orthanc::PixelFormat_Grayscale8, 
+                                    ImageInterpolation_Bilinear>(target, source, a, inva);
             break;
 
           default:
@@ -504,13 +504,13 @@
         switch (interpolation)
         {
           case ImageInterpolation_Nearest:
-            ApplyPerspectiveInternal<Orthanc::PixelFormat_Grayscale16, 
-                                     ImageInterpolation_Nearest>(target, source, a, inva);
+            ApplyProjectiveInternal<Orthanc::PixelFormat_Grayscale16, 
+                                    ImageInterpolation_Nearest>(target, source, a, inva);
             break;
 
           case ImageInterpolation_Bilinear:
-            ApplyPerspectiveInternal<Orthanc::PixelFormat_Grayscale16, 
-                                     ImageInterpolation_Bilinear>(target, source, a, inva);
+            ApplyProjectiveInternal<Orthanc::PixelFormat_Grayscale16, 
+                                    ImageInterpolation_Bilinear>(target, source, a, inva);
             break;
 
           default:
@@ -522,13 +522,13 @@
         switch (interpolation)
         {
           case ImageInterpolation_Nearest:
-            ApplyPerspectiveInternal<Orthanc::PixelFormat_SignedGrayscale16, 
-                                     ImageInterpolation_Nearest>(target, source, a, inva);
+            ApplyProjectiveInternal<Orthanc::PixelFormat_SignedGrayscale16, 
+                                    ImageInterpolation_Nearest>(target, source, a, inva);
             break;
 
           case ImageInterpolation_Bilinear:
-            ApplyPerspectiveInternal<Orthanc::PixelFormat_SignedGrayscale16, 
-                                     ImageInterpolation_Bilinear>(target, source, a, inva);
+            ApplyProjectiveInternal<Orthanc::PixelFormat_SignedGrayscale16, 
+                                    ImageInterpolation_Bilinear>(target, source, a, inva);
             break;
 
           default:
@@ -540,8 +540,8 @@
         switch (interpolation)
         {
           case ImageInterpolation_Nearest:
-            ApplyPerspectiveInternal<Orthanc::PixelFormat_RGB24, 
-                                     ImageInterpolation_Nearest>(target, source, a, inva);
+            ApplyProjectiveInternal<Orthanc::PixelFormat_RGB24, 
+                                    ImageInterpolation_Nearest>(target, source, a, inva);
             break;
 
           default:
--- a/Framework/Toolbox/ImageGeometry.h	Fri Mar 16 13:19:23 2018 +0100
+++ b/Framework/Toolbox/ImageGeometry.h	Fri Mar 16 14:35:26 2018 +0100
@@ -32,7 +32,7 @@
   // Returns the "useful" portion of the target image when applying a
   // 3x3 perspective transform "a" (i.e. the bounding box where points
   // of the source image are mapped to)
-  bool GetPerpectiveTransformExtent(unsigned int& x1,
+  bool GetProjectiveTransformExtent(unsigned int& x1,
                                     unsigned int& y1,
                                     unsigned int& x2,
                                     unsigned int& y2,
@@ -52,8 +52,8 @@
                             double b2,
                             ImageInterpolation interpolation);
 
-  void ApplyPerspectiveTransform(Orthanc::ImageAccessor& target,
-                                 const Orthanc::ImageAccessor& source,
-                                 const Matrix& a,
-                                 ImageInterpolation interpolation);
+  void ApplyProjectiveTransform(Orthanc::ImageAccessor& target,
+                                const Orthanc::ImageAccessor& source,
+                                const Matrix& a,
+                                ImageInterpolation interpolation);
 }