[med-svn] [Git][med-team/gdcm][upstream] New upstream version 2.8.7

Gert Wollny gitlab at salsa.debian.org
Sat Jun 30 11:08:22 BST 2018


Gert Wollny pushed to branch upstream at Debian Med / gdcm


Commits:
8537b443 by Gert Wollny at 2018-06-30T11:10:18+02:00
New upstream version 2.8.7
- - - - -


12 changed files:

- Applications/Cxx/gdcmdump.cxx
- Applications/Cxx/gdcmscu.cxx
- CMakeLists.txt
- Source/DataDictionary/gdcmPrivateDefaultDicts.cxx
- Source/MediaStorageAndFileFormat/gdcmIPPSorter.cxx
- Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx
- Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx
- Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx
- Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h
- Utilities/VTK/vtkGDCMPolyDataWriter.cxx
- Utilities/doxygen/CMakeLists.txt
- appveyor.yml


Changes:

=====================================
Applications/Cxx/gdcmdump.cxx
=====================================
--- a/Applications/Cxx/gdcmdump.cxx
+++ b/Applications/Cxx/gdcmdump.cxx
@@ -816,7 +816,7 @@ static int PrintPDB(const std::string & filename, bool verbose)
     }
   if( !found )
     {
-    std::cout << "no pdb tag found" << std::endl;
+    std::cerr << "no pdb tag found" << std::endl;
     ret = 1;
     }
 
@@ -901,7 +901,7 @@ static int PrintCSA(const std::string & filename)
     found = true;
     if( csa.GetFormat() == gdcm::CSAHeader::ZEROED_OUT )
       {
-      std::cout << "CSA Header has been zero-out (contains only 0)" << std::endl;
+      std::cerr << "CSA Header has been zero-out (contains only 0)" << std::endl;
       ret = 1;
       }
     else if( csa.GetFormat() == gdcm::CSAHeader::DATASET_FORMAT )
@@ -920,7 +920,7 @@ static int PrintCSA(const std::string & filename)
     found = true;
     if( csa.GetFormat() == gdcm::CSAHeader::ZEROED_OUT )
       {
-      std::cout << "CSA Header has been zero-out (contains only 0)" << std::endl;
+      std::cerr << "CSA Header has been zero-out (contains only 0)" << std::endl;
       ret = 1;
       }
     else if( csa.GetFormat() == gdcm::CSAHeader::DATASET_FORMAT )
@@ -939,7 +939,7 @@ static int PrintCSA(const std::string & filename)
     found = true;
     if( csa.GetFormat() == gdcm::CSAHeader::ZEROED_OUT )
       {
-      std::cout << "CSA Header has been zero-out (contains only 0)" << std::endl;
+      std::cerr << "CSA Header has been zero-out (contains only 0)" << std::endl;
       ret = 1;
       }
     else if( csa.GetFormat() == gdcm::CSAHeader::INTERFILE )
@@ -958,7 +958,7 @@ static int PrintCSA(const std::string & filename)
     }
   if( !found )
     {
-    std::cout << "no csa tag found" << std::endl;
+    std::cerr << "no csa tag found" << std::endl;
     ret = 1;
     }
 


=====================================
Applications/Cxx/gdcmscu.cxx
=====================================
--- a/Applications/Cxx/gdcmscu.cxx
+++ b/Applications/Cxx/gdcmscu.cxx
@@ -283,6 +283,7 @@ int main(int argc, char *argv[])
             std::string str;
             //ss >> str;
             std::getline(ss, str); // do not skip whitespace
+            if( str.size() % 2 == 1 ) str += " ";
             keys.push_back( std::make_pair(tag, str) );
           }
           else if( option_index == 20 ) /* port-scp */


=====================================
CMakeLists.txt
=====================================
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,7 +40,7 @@ set(GDCM_PACKAGE_CONTACT "GDCM Developers <gdcm-developers at lists.sourceforge.net
 #----------------------------------------------------------------------------
 set(GDCM_MAJOR_VERSION 2)
 set(GDCM_MINOR_VERSION 8)
-set(GDCM_BUILD_VERSION 6)
+set(GDCM_BUILD_VERSION 7)
 set(GDCM_VERSION
   "${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}.${GDCM_BUILD_VERSION}")
 # let advanced user the option to define GDCM_API_VERSION:


=====================================
Source/DataDictionary/gdcmPrivateDefaultDicts.cxx
=====================================
--- a/Source/DataDictionary/gdcmPrivateDefaultDicts.cxx
+++ b/Source/DataDictionary/gdcmPrivateDefaultDicts.cxx
@@ -1723,6 +1723,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
   {0x07a1,0x002b,"ELSCINT1",VR::CS,VM::VM1,"?",false },
   {0x07a1,0x0036,"ELSCINT1",VR::AE,VM::VM1,"Tamar Source Ae",false },
   {0x07a1,0x0040,"ELSCINT1",VR::CS,VM::VM1,"Tamar Study Body Part",false },
+  {0x07a1,0x0042,"ELSCINT1",VR::SH,VM::VM1,"?",false },
   {0x07a1,0x0043,"ELSCINT1",VR::IS,VM::VM1,"?",false },
   {0x07a1,0x0047,"ELSCINT1",VR::CS,VM::VM1,"?orientation?",false },
   {0x07a1,0x0050,"ELSCINT1",VR::US,VM::VM1,"Tamar Site Id",false },
@@ -1737,6 +1738,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
   {0x07a1,0x0088,"ELSCINT1",VR::US,VM::VM1,"?",false },
   {0x07a1,0x0098,"ELSCINT1",VR::US,VM::VM1,"?",false },
   {0x07a1,0x009f,"ELSCINT1",VR::CS,VM::VM1,"?",false },
+  {0x07a1,0x00d0,"ELSCINT1",VR::LO,VM::VM1,"?",false },
   {0x07a3,0x0001,"ELSCINT1",VR::LO,VM::VM1,"Tamar Exe Software Version",false },
   {0x07a3,0x0003,"ELSCINT1",VR::CS,VM::VM1,"Tamar Study Has Sticky Note",false },
   {0x07a3,0x0005,"ELSCINT1",VR::CS,VM::VM1,"?",false },
@@ -1750,16 +1752,22 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
   {0x07a3,0x001c,"ELSCINT1",VR::ST,VM::VM1,"?patient name?",false },
   {0x07a3,0x001d,"ELSCINT1",VR::ST,VM::VM1,"?radiologist name?",false },
   {0x07a3,0x001e,"ELSCINT1",VR::ST,VM::VM1,"?num?",false },
+  {0x07a3,0x001f,"ELSCINT1",VR::ST,VM::VM1,"?",false },
+  {0x07a3,0x0022,"ELSCINT1",VR::ST,VM::VM1,"?",false },
   {0x07a3,0x0023,"ELSCINT1",VR::ST,VM::VM1,"?+sign?",false },
+  {0x07a3,0x0024,"ELSCINT1",VR::ST,VM::VM1,"?",false },
   {0x07a3,0x0034,"ELSCINT1",VR::SH,VM::VM1,"Tamar Study Age",false },
   {0x07a3,0x0043,"ELSCINT1",VR::DS,VM::VM1_n,"?",false },
+  {0x07a3,0x0052,"ELSCINT1",VR::LO,VM::VM1,"?",false },
   {0x07a3,0x0055,"ELSCINT1",VR::SH,VM::VM1,"?",false },
+  {0x07a3,0x005c,"ELSCINT1",VR::ST,VM::VM1,"?",false },
   {0x07a3,0x0061,"ELSCINT1",VR::LT,VM::VM1,"?",false },
   {0x07a3,0x0062,"ELSCINT1",VR::SQ,VM::VM1,"?",false },
   {0x07a3,0x0063,"ELSCINT1",VR::SQ,VM::VM1,"?",false },
   {0x07a3,0x0064,"ELSCINT1",VR::IS,VM::VM1_n,"?",false },
   {0x07a3,0x0065,"ELSCINT1",VR::CS,VM::VM1_n,"?yes/no bool?",false },
   {0x07a3,0x0066,"ELSCINT1",VR::IS,VM::VM1,"?",false },
+  {0x07a3,0x008f,"ELSCINT1",VR::CS,VM::VM1,"?",false },
   {0x07a3,0x0099,"ELSCINT1",VR::CS,VM::VM1,"?yes/no bool?",false },
   {0x07a3,0x009c,"ELSCINT1",VR::CS,VM::VM1,"?yes/no bool?",false },
   {0x07a3,0x009f,"ELSCINT1",VR::CS,VM::VM1,"?",false },
@@ -1779,8 +1787,11 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
   {0x07a3,0x00cb,"ELSCINT1",VR::SQ,VM::VM1,"?network seq11?",false },
   {0x07a3,0x00cc,"ELSCINT1",VR::LO,VM::VM1,"Tamar Grid Token Version",false },
   {0x07a5,0x0000,"ELSCINT1",VR::LO,VM::VM1,"?",false },
+  {0x07a5,0x0054,"ELSCINT1",VR::DT,VM::VM1,"?",false },
   {0x07a5,0x0056,"ELSCINT1",VR::CS,VM::VM1,"?",false },
+  {0x07a5,0x0063,"ELSCINT1",VR::CS,VM::VM1_n,"?",false },
   {0x07a5,0x0069,"ELSCINT1",VR::LO,VM::VM1,"?",false },
+  {0x07a5,0x00c8,"ELSCINT1",VR::CS,VM::VM1,"?",false },
   {0x5001,0x0070,"ELSCINT1",VR::SQ,VM::VM1,"?",false },
   {0x5001,0x0071,"ELSCINT1",VR::SH,VM::VM1,"?",false },
   {0x5001,0x0080,"ELSCINT1",VR::SQ,VM::VM1,"?",false },
@@ -6045,7 +6056,9 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
   {0x200b,0x0099,"Philips RAD Imaging DD 097",VR::SH,VM::VM1,"?",false },
   {0x200b,0x009a,"Philips RAD Imaging DD 097",VR::FD,VM::VM1,"?",false },
   {0x200b,0x009b,"Philips RAD Imaging DD 097",VR::FD,VM::VM1,"?",false },
+  {0x200b,0x009f,"Philips RAD Imaging DD 097",VR::SQ,VM::VM1,"?",false },
   {0x200b,0x00a0,"Philips RAD Imaging DD 097",VR::LT,VM::VM1,"?",false },
+  {0x200b,0x00a1,"Philips RAD Imaging DD 097",VR::CS,VM::VM1,"?bool?",false },
   {0x0031,0x0030,"Philips US Imaging 60",VR::UL,VM::VM1,"Private data",false },
   {0x0031,0x0031,"Philips US Imaging 60",VR::UL,VM::VM1,"Private data",false },
   {0x200d,0x0005,"Philips US Imaging DD 017",VR::LO,VM::VM1,"?",false },


=====================================
Source/MediaStorageAndFileFormat/gdcmIPPSorter.cxx
=====================================
--- a/Source/MediaStorageAndFileFormat/gdcmIPPSorter.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmIPPSorter.cxx
@@ -37,6 +37,25 @@ inline double spacing_round(double n, int d) /* pow is defined as pow( double, d
   return floor(n * pow(10., d) + .5) / pow(10., d);
 }
 
+struct dircos_key {
+  double dircos[6];
+  void read( const std::string & str ) {
+    DirectionCosines dc;
+    dc.SetFromString( str.c_str() );
+    const double * ptr = dc;
+    memcpy( dircos, ptr, sizeof(dircos) );
+  }
+};
+
+struct dircos_comp {
+  bool operator()( dircos_key const & lhs, dircos_key const & rhs ) {
+    const double *iop1 = lhs.dircos;
+    const double *iop2 = rhs.dircos;
+    return std::lexicographical_compare(iop1, iop1+6,
+        iop2, iop2+6);
+  }
+};
+
 bool IPPSorter::Sort(std::vector<std::string> const & filenames)
 {
   // BUG: I cannot clear Filenames since input filenames could also be the output of ourself...
@@ -88,9 +107,20 @@ bool IPPSorter::Sort(std::vector<std::string> const & filenames)
     {
     if( iops.size() != 1 )
       {
-      gdcmDebugMacro( "More than one IOP (or no IOP): " << iops.size() );
-      //std::copy(iops.begin(), iops.end(), std::ostream_iterator<std::string>(std::cout, "\n"));
-      return false;
+      std::set< dircos_key, dircos_comp > s;
+      for( Scanner::ValuesType::const_iterator it = iops.begin(); it != iops.end(); ++it )
+      {
+        dircos_key dk;
+        dk.read( *it );
+        s.insert( dk );
+      }
+      // sometime we want to handle:
+      // iops = {[0] = "1\\0\\0\\0\\1\\-0", [1] = "1\\0\\0\\0\\1\\0 "} 
+      if( s.size() != 1 )
+        {
+        gdcmDebugMacro( "More than one IOP (or no IOP): " << iops.size() << ". Try changing DirCosTolerance"  );
+        return false;
+        }
       }
     }
   const size_t fsize = frames.size(); // Should I really tolerate issue with Frame of Reference UID ?


=====================================
Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx
=====================================
--- a/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx
@@ -773,12 +773,12 @@ std::vector<unsigned int> ImageHelper::GetDimensionsValue(const File& f)
 #endif
     {
       {
-      Attribute<0x0028,0x0011> at = { 0 };
+      Attribute<0x0028,0x0011> at = { 0 }; // Columns
       at.SetFromDataSet( ds );
       theReturn[0] = at.GetValue();
       }
       {
-      Attribute<0x0028,0x0010> at = { 0 };
+      Attribute<0x0028,0x0010> at = { 0 }; // Rows
       at.SetFromDataSet( ds );
       theReturn[1] = at.GetValue();
       }


=====================================
Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx
=====================================
--- a/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx
@@ -1032,7 +1032,7 @@ opj_image_t* rawtoimage(const char *inputbuffer, opj_cparameters_t *parameters,
     }
   assert( bitsallocated % 8 == 0 );
   // eg. fragment_size == 63532 and 181 * 117 * 3 * 8 == 63531 ...
-  assert( ((fragment_size + 1)/2 ) * 2 == ((image_height * image_width * numcomps * (bitsallocated/8) + 1)/ 2 )* 2 );
+  assert( ((fragment_size + 1)/2 ) * 2 == (((size_t)image_height * image_width * numcomps * (bitsallocated/8) + 1)/ 2 )* 2 );
   int subsampling_dx = parameters->subsampling_dx;
   int subsampling_dy = parameters->subsampling_dy;
 


=====================================
Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx
=====================================
--- a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.cxx
@@ -16,7 +16,6 @@
 #include "gdcmAttribute.h"
 #include "gdcmImageHelper.h"
 #include "gdcmDirectionCosines.h"
-#include "gdcmAnonymizer.h"
 
 #include <math.h>
 
@@ -48,7 +47,6 @@ static bool reorganize_mosaic(const unsigned short *input, const unsigned int *i
   return true;
 }
 
-#ifdef SNVINVERT
 static bool reorganize_mosaic_invert(const unsigned short *input, const unsigned int *inputdims,
   unsigned int square, const unsigned int *outputdims, unsigned short *output )
 {
@@ -67,7 +65,6 @@ static bool reorganize_mosaic_invert(const unsigned short *input, const unsigned
     }
   return true;
 }
-#endif
 
 }
 
@@ -76,13 +73,60 @@ void SplitMosaicFilter::SetImage(const Image& image)
   I = image;
 }
 
-bool SplitMosaicFilter::ComputeMOSAICDimensions( unsigned int dims[3] )
+bool SplitMosaicFilter::GetAcquisitionSize(unsigned int size[2], DataSet const & ds)
+{
+  bool found = true;
+  /*
+  Dimensions of the acquired frequency /phase data before reconstruction.
+  Multi-valued: frequency rows\frequency columns\phase rows\phase columns.
+   */
+  Attribute<0x0018, 0x1310> acquisitionMatrix;
+  acquisitionMatrix.SetFromDataSet( ds );
+  const unsigned short *pMat = acquisitionMatrix.GetValues();
+  /*
+  The axis of phase encoding with respect to the image.
+
+  Enumerated Values:
+
+  ROW
+  phase encoded in rows.
+
+  COL
+  phase encoded in columns.
+   */
+  Attribute<0x0018, 0x1312> inPlanePhaseEncodingDirection;
+  inPlanePhaseEncodingDirection.SetFromDataSet( ds );
+  CSComp val = inPlanePhaseEncodingDirection.GetValue();
+  std::string dir = val.Trim();
+  // http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.8.3.html
+  if( dir == "COL" )
+    {
+    /* pay attention that size is: { columns  , rows } */
+    // [256\0\0\134]
+    size[0] = pMat[3];
+    size[1] = pMat[0];
+    }
+  else if( dir == "ROW" )
+    {
+    // [0\512\213\0]
+    size[0] = pMat[1];
+    size[1] = pMat[2];
+    }
+  else
+    {
+    size[0] = size[1] = 0;
+    }
+  found = size[0] && size[1];
+  return found;
+}
+
+unsigned int SplitMosaicFilter::GetNumberOfImagesInMosaic( File const & file )
 {
+  unsigned int numberOfImagesInMosaic = 0;
+  DataSet const &ds = file.GetDataSet();
   CSAHeader csa;
-  DataSet& ds = GetFile().GetDataSet();
 
   const PrivateTag &t1 = csa.GetCSAImageHeaderInfoTag();
-  int numberOfImagesInMosaic = 0;
   if( csa.LoadFromDataElement( ds.GetDataElement( t1 ) ) )
   {
     if( csa.FindCSAElementByName( "NumberOfImagesInMosaic" ) )
@@ -96,7 +140,8 @@ bool SplitMosaicFilter::ComputeMOSAICDimensions( unsigned int dims[3] )
       }
     }
   }
-  else
+  // try harder:
+  if( !numberOfImagesInMosaic )
   {
     // Some weird anonymizer remove the private creator but leave the actual element.
     // oh well, let try harder:
@@ -116,14 +161,62 @@ bool SplitMosaicFilter::ComputeMOSAICDimensions( unsigned int dims[3] )
       }
     }
   }
+
+  std::vector<unsigned int> colrow =
+    ImageHelper::GetDimensionsValue( file );
+
+  // try super harder. Pay attention that trailing black image cannot be removed here.
+  if( !numberOfImagesInMosaic )
+  {
+    unsigned int mosaicSize[2];
+    if( GetAcquisitionSize(mosaicSize, ds) )
+    {
+      if( colrow[0] % mosaicSize[0] == 0 &&
+       colrow[1] % mosaicSize[1] == 0 )
+      {
+        numberOfImagesInMosaic = 
+          colrow[0] / mosaicSize[0] *
+          colrow[1] / mosaicSize[1];
+        // MultiFrame will contain trailing empty slices:
+        gdcmWarningMacro( "NumberOfImagesInMosaic was not found. Volume will be padded with black image." );
+      }
+      else
+      {
+        // assume interpolation:
+        unsigned int mosSize = std::max( mosaicSize[0], mosaicSize[1] );
+        if( colrow[0] % mosSize == 0 &&
+         colrow[1] % mosSize == 0 )
+        {
+          gdcmDebugMacro( "Matrix Acquisition does not match exactly. Using max value." );
+          numberOfImagesInMosaic = 
+            colrow[0] / mosSize *
+            colrow[1] / mosSize;
+          // MultiFrame will contain trailing empty slices:
+          gdcmWarningMacro( "NumberOfImagesInMosaic was not found. Volume will be padded with black image." );
+        }
+        else
+        {
+           gdcmErrorMacro( "NumberOfImagesInMosaic cannot be computed from Img Acq: " << mosaicSize[0] << "," << mosaicSize[1] );
+        }
+      }
+    }
+  }
+  return numberOfImagesInMosaic;
+}
+
+bool SplitMosaicFilter::ComputeMOSAICDimensions( unsigned int dims[3] )
+{
+  unsigned int numberOfImagesInMosaic = GetNumberOfImagesInMosaic( GetFile() );
+
   if( !numberOfImagesInMosaic )
   {
-    gdcmErrorMacro( "Could not find NumberOfImagesInMosaic" );
+    gdcmErrorMacro( "Could not find/compute NumberOfImagesInMosaic" );
     return false;
   }
 
   std::vector<unsigned int> colrow =
     ImageHelper::GetDimensionsValue( GetFile() );
+
   dims[0] = colrow[0];
   dims[1] = colrow[1];
 
@@ -171,12 +264,12 @@ bool SplitMosaicFilter::ComputeMOSAICSliceNormal( double slicenormalvector[3], b
     double z[3];
     dc.Cross (z);
     const double snv_dot = dc.Dot( normal, z );
-    if( (1. - snv_dot) < 1e-6 )
+    if( fabs(1. - snv_dot) < 1e-6 )
     {
       gdcmDebugMacro("Same direction");
       inverted = false;
     }
-    else if( (-1. - snv_dot) < 1e-6 )
+    else if( fabs(-1. - snv_dot) < 1e-6 )
     {
       gdcmWarningMacro("SliceNormalVector is opposite direction");
       inverted = true;
@@ -251,14 +344,19 @@ bool SplitMosaicFilter::Split()
   const unsigned int div = (unsigned int )ceil(sqrt( (double)dims[2]) );
   bool inverted;
   double normal[3];
+  bool hasOriginCSA = true;
+  bool hasNormalCSA = true;
   if( !ComputeMOSAICSliceNormal( normal, inverted ) )
   {
-    return false;
+    gdcmDebugMacro( "Normal will not be accurate" );
+    hasNormalCSA = false;
   }
+  (void)hasNormalCSA;
   double origin[3];
   if( !ComputeMOSAICSlicePosition( origin, inverted ) )
   {
-    return false;
+    gdcmWarningMacro( "Origin will not be accurate" );
+    hasOriginCSA = false;
   }
 
   const Image &inputimage = GetImage();
@@ -277,7 +375,6 @@ bool SplitMosaicFilter::Split()
   outbuf.resize(l);
 
   bool b;
-#ifdef SNVINVERT
   if( inverted )
   {
     b = details::reorganize_mosaic_invert(
@@ -285,7 +382,6 @@ bool SplitMosaicFilter::Split()
         (unsigned short*)&outbuf[0] );
   }
   else
-#endif
   {
     b = details::reorganize_mosaic(
         (unsigned short*)&buf[0], inputimage.GetDimensions(), div, dims,
@@ -312,6 +408,7 @@ bool SplitMosaicFilter::Split()
   image.SetDimension(2, dims[2] );
 
   // Fix origin (direction is ok since we reorganize the tiles):
+  if( hasOriginCSA )
   image.SetOrigin( origin );
 
   PhotometricInterpretation pi;


=====================================
Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h
=====================================
--- a/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h
+++ b/Source/MediaStorageAndFileFormat/gdcmSplitMosaicFilter.h
@@ -33,6 +33,12 @@ namespace gdcm
  * Siemens CSA Image Header
  * CSA:= Common Siemens Architecture, sometimes also known as Common syngo Architecture
  *
+ * \warning when private attributes are not found, the acquisition matrix is
+ * used to compute the NumberOfImagesInMosaic. This means trailing black slices
+ * will be considered in the volume (instead of discarded).
+ * CSA 0029,1010 is needed for correct NumberOfImagesInMosaic
+ * CSA 0029,1020 is needed to compute the correct origin
+ * without above info default are taken (may not be accurate).
  */
 class GDCM_EXPORT SplitMosaicFilter
 {
@@ -61,6 +67,12 @@ public:
   File &GetFile() { return *F; }
   const File &GetFile() const { return *F; }
 
+  /// Get the Acquisition Matrix (non zero value):
+  static bool GetAcquisitionSize(unsigned int size[2], DataSet const & ds);
+
+  /// Return the value for NumberOfImagesInMosaic, or compute it from Acquisition Size
+  static unsigned int GetNumberOfImagesInMosaic( File const & file );
+
 protected:
 
 private:


=====================================
Utilities/VTK/vtkGDCMPolyDataWriter.cxx
=====================================
--- a/Utilities/VTK/vtkGDCMPolyDataWriter.cxx
+++ b/Utilities/VTK/vtkGDCMPolyDataWriter.cxx
@@ -586,7 +586,11 @@ void vtkGDCMPolyDataWriter::WriteRTSTRUCTData(gdcm::File &file, int pdidx )
   if( darray )
     {
     double tuple[3];
+#if VTK_MAJOR_VERSION > 7 || (VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION >= 1)
+    darray->GetTypedTuple( 0, tuple );
+#else
     darray->GetTupleValue( 0, tuple );
+#endif
     intcolor[0] = (int32_t)(tuple[0] * 255.);
     intcolor[1] = (int32_t)(tuple[1] * 255.);
     intcolor[2] = (int32_t)(tuple[2] * 255.);
@@ -594,7 +598,11 @@ void vtkGDCMPolyDataWriter::WriteRTSTRUCTData(gdcm::File &file, int pdidx )
   else if( farray )
     {
     float ftuple[3];
+#if VTK_MAJOR_VERSION > 7 || (VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION >= 1)
+    farray->GetTypedTuple( 0, ftuple );
+#else
     farray->GetTupleValue( 0, ftuple );
+#endif
     intcolor[0] = (int32_t)(ftuple[0] * 255.);
     intcolor[1] = (int32_t)(ftuple[1] * 255.);
     intcolor[2] = (int32_t)(ftuple[2] * 255.);


=====================================
Utilities/doxygen/CMakeLists.txt
=====================================
--- a/Utilities/doxygen/CMakeLists.txt
+++ b/Utilities/doxygen/CMakeLists.txt
@@ -304,30 +304,30 @@ else()
 # -> http://stackoverflow.com/a/16605034/136285 ??
   endif()
 endif()
-if(XSLT_PROCESSOR)
-  configure_file(version.txt.in
-    version.txt @ONLY)
-foreach(docbook ${MANPAGES_XML})
-  add_custom_command(
-    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${docbook}.1
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/man/${docbook}.xml ${CMAKE_CURRENT_BINARY_DIR}/${docbook}.xml
-    COMMAND ${XSLT_PROCESSOR} ${XSLT_PROCESSOR_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${docbook}.xml
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/man/${docbook}.xml
-    )
-  list(APPEND MANPAGES
-    ${CMAKE_CURRENT_BINARY_DIR}/${docbook}.1
+  if(XSLT_PROCESSOR)
+    configure_file(version.txt.in
+      version.txt @ONLY)
+    foreach(docbook ${MANPAGES_XML})
+      add_custom_command(
+        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${docbook}.1
+        COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/man/${docbook}.xml ${CMAKE_CURRENT_BINARY_DIR}/${docbook}.xml
+        COMMAND ${XSLT_PROCESSOR} ${XSLT_PROCESSOR_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${docbook}.xml
+        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/man/${docbook}.xml
+        )
+    list(APPEND MANPAGES
+      ${CMAKE_CURRENT_BINARY_DIR}/${docbook}.1
+      )
+  endforeach()
+  add_custom_target(DOCBOOK_MANPAGES
+    ALL
+    DEPENDS ${MANPAGES}
+    COMMENT  "docbook manpages"
     )
-endforeach()
-add_custom_target(DOCBOOK_MANPAGES
-  ALL
-  DEPENDS ${MANPAGES}
-  COMMENT  "docbook manpages"
+  install(FILES
+    ${MANPAGES}
+    DESTINATION ${GDCM_INSTALL_MAN_DIR}/man1 COMPONENT DebugDevel
   )
-install(FILES
-  ${MANPAGES}
-  DESTINATION ${GDCM_INSTALL_MAN_DIR}/man1 COMPONENT DebugDevel
-)
-else()
-  message(WARNING "Cannot build man page from docbook (need an XSL processor)")
-endif()
+  else()
+    message(WARNING "Cannot build man page from docbook (need an XSL processor)")
+  endif()
 endif() # GDCM_BUILD_DOCBOOK_MANPAGES


=====================================
appveyor.yml
=====================================
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -97,6 +97,7 @@ install:
   - cmd: SET PATH=%PATH%;C:\Program Files (x86)\NSIS
 
 on_failure:
+  - ctest -D ExperimentalSubmit -C %CONFIG% -Q
   # Display error log file if generated
   - dir C:\projects\gdcm\bin
   - dir C:\projects\gdcm\bin\Release
@@ -104,7 +105,7 @@ on_failure:
 
 # scripts to run before build
 before_build:
-  - cmake -Wno-dev -G"%VS_GEN%" -DCMAKE_BUILD_TYPE=%CONFIG% -DGDCM_BUILD_TESTING:BOOL=ON -DGDCM_BUILD_APPLICATIONS:BOOL=ON -DGDCM_BUILD_EXAMPLES:BOOL=ON -DGDCM_BUILD_SHARED_LIBS:BOOL=ON -DBUILDNAME:STRING=%COMPUTERNAME%-%APPVEYOR_REPO_BRANCH%-%B_NAME% -DGDCM_WRAP_CSHARP:BOOL=ON -DGDCM_WRAP_JAVA:BOOL=ON -DGDCM_WRAP_PYTHON:BOOL=ON -DGDCM_USE_PVRG:BOOL=ON -DGDCM_LEGACY_SILENT:BOOL=ON -DCPACK_SYSTEM_NAME:STRING=%B_NAME% .
+  - cmake -Wno-dev -G"%VS_GEN%" -DCMAKE_BUILD_TYPE=%CONFIG% -DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF -DGDCM_BUILD_TESTING:BOOL=ON -DGDCM_BUILD_APPLICATIONS:BOOL=ON -DGDCM_BUILD_EXAMPLES:BOOL=ON -DGDCM_BUILD_SHARED_LIBS:BOOL=ON -DBUILDNAME:STRING=%COMPUTERNAME%-%APPVEYOR_REPO_BRANCH%-%B_NAME% -DGDCM_WRAP_CSHARP:BOOL=ON -DGDCM_WRAP_JAVA:BOOL=ON -DGDCM_WRAP_PYTHON:BOOL=ON -DGDCM_USE_PVRG:BOOL=ON -DGDCM_LEGACY_SILENT:BOOL=ON -DCPACK_SYSTEM_NAME:STRING=%B_NAME% .
   - ctest -D ExperimentalStart -C %CONFIG%
 
 # scripts to run after build



View it on GitLab: https://salsa.debian.org/med-team/gdcm/commit/8537b443779f97e5020d3adb7ebf7a710f04669c

-- 
View it on GitLab: https://salsa.debian.org/med-team/gdcm/commit/8537b443779f97e5020d3adb7ebf7a710f04669c
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20180630/0506d4ad/attachment-0001.html>


More information about the debian-med-commit mailing list