changeset 1717:391c798e4dae

fix for KNIX sample dataset
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 01 Dec 2020 10:08:26 +0100
parents 6aadc7cbb8ea
children 65c03d33c345
files Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp OrthancStone/Sources/Toolbox/CoordinateSystem3D.cpp TODO
diffstat 3 files changed, 27 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp	Tue Dec 01 08:58:53 2020 +0100
+++ b/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp	Tue Dec 01 10:08:26 2020 +0100
@@ -1918,6 +1918,7 @@
                                "/frames/" + boost::lexical_cast<std::string>(frameNumber + 1) + "/rendered");
 
       std::map<std::string, std::string> headers, arguments;
+      // arguments["quality"] = "10";   // Low-level quality for test purpose
       arguments["window"] = (
         boost::lexical_cast<std::string>(windowingCenter_) + ","  +
         boost::lexical_cast<std::string>(windowingWidth_) + ",linear");
--- a/OrthancStone/Sources/Toolbox/CoordinateSystem3D.cpp	Tue Dec 01 08:58:53 2020 +0100
+++ b/OrthancStone/Sources/Toolbox/CoordinateSystem3D.cpp	Tue Dec 01 10:08:26 2020 +0100
@@ -33,24 +33,32 @@
 {
   void CoordinateSystem3D::CheckAndComputeNormal()
   {
-    // DICOM expects normal vectors to define the axes: "The row and
-    // column direction cosine vectors shall be normal, i.e., the dot
-    // product of each direction cosine vector with itself shall be
-    // unity."
-    // http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.6.2.html
+    /**
+     * DICOM expects normal vectors to define the axes: "The row and
+     * column direction cosine vectors shall be normal, i.e., the dot
+     * product of each direction cosine vector with itself shall be
+     * unity."
+     * http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.6.2.html
+     **/
     if (!LinearAlgebra::IsNear(boost::numeric::ublas::norm_2(axisX_), 1.0) ||
         !LinearAlgebra::IsNear(boost::numeric::ublas::norm_2(axisY_), 1.0))
     {
       LOG(WARNING) << "Invalid 3D geometry: Axes are not normal vectors";
       SetupCanonical();
     }
-
-    // The vectors within "Image Orientation Patient" must be
-    // orthogonal, according to the DICOM specification: "The row and
-    // column direction cosine vectors shall be orthogonal, i.e.,
-    // their dot product shall be zero."
-    // http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.6.2.html
-    else if (!LinearAlgebra::IsCloseToZero(boost::numeric::ublas::inner_prod(axisX_, axisY_)))
+    
+    /**
+     * The vectors within "Image Orientation Patient" must be
+     * orthogonal, according to the DICOM specification: "The row and
+     * column direction cosine vectors shall be orthogonal, i.e.,
+     * their dot product shall be zero."
+     * http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.6.2.html
+     *
+     * The "0.00001" threshold is needed for KNIX (on this sample
+     * image, the inner product equals "0.000003", which is rejected
+     * by "LinearAlgebra::IsCloseToZero()").
+     **/
+    else if (!LinearAlgebra::IsNear(0, boost::numeric::ublas::inner_prod(axisX_, axisY_), 0.00001))
     {
       LOG(WARNING) << "Invalid 3D geometry: Image orientation patient is not orthogonal";
       SetupCanonical();
--- a/TODO	Tue Dec 01 08:58:53 2020 +0100
+++ b/TODO	Tue Dec 01 10:08:26 2020 +0100
@@ -26,11 +26,17 @@
   (using pure DICOMweb). This could possible be done using the
   DICOMweb Bulk Data URI, and/or a dedicated JavaScript video player.
 
+* Debian packaging, which requires source-level build dependencies:
+  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975069#22
+
 * "Start the Viewer with a specific Dicom file and display the
   specific images. For example I start the Viewer with dicomFile and
   open slide1, slide4, slide8, slide12 ?"
   https://groups.google.com/g/orthanc-users/c/6KSe0WEEfco/m/nOIl57EzAAAJ
 
+* Configuration option related to the "DicomSource" class in order to
+  systematically request server-side transcoding.
+
 
 
 ==================================